X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Ffpurge.c;h=cc230fb1cda27e7f528251b7fb98e74a2f6c3f6c;hb=1146b210ba48607a5a29ea516a5cda3d5afa6542;hp=eb18b76840d75f86e69eb44db072f7cef2664528;hpb=555c3d668283df0cb7d4d29463db275cff9acecd;p=gnulib.git
diff --git a/lib/fpurge.c b/lib/fpurge.c
index eb18b7684..cc230fb1c 100644
--- a/lib/fpurge.c
+++ b/lib/fpurge.c
@@ -1,19 +1,18 @@
/* Flushing buffers of a FILE stream.
Copyright (C) 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
#include
@@ -104,6 +103,16 @@ fpurge (FILE *fp)
fp->__bufpos = fp->__bufread;
# endif
return 0;
+# elif defined __QNX__ /* QNX */
+ fp->_Rback = fp->_Back + sizeof (fp->_Back);
+ fp->_Rsave = NULL;
+ if (fp->_Mode & 0x2000 /* _MWRITE */)
+ /* fp->_Buf <= fp->_Next <= fp->_Wend */
+ fp->_Next = fp->_Buf;
+ else
+ /* fp->_Buf <= fp->_Next <= fp->_Rend */
+ fp->_Rend = fp->_Next;
+ return 0;
# else
#error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."
# endif