* lib/fpending.c: Update comments.
* lib/fpurge.c: Likewise.
* lib/freadable.h: Likewise.
* lib/freadable.c: Likewise.
* lib/freading.h: Likewise.
* lib/freading.c: Likewise.
* lib/fwritable.h: Likewise.
* lib/fwritable.c: Likewise.
* lib/fwriting.h: Likewise.
* lib/fwriting.c: Likewise.
+2020-10-11 Bruno Haible <bruno@clisp.org>
+
+ stdioext: Update comments regarding Cygwin.
+ * lib/fpending.c: Update comments.
+ * lib/fpurge.c: Likewise.
+ * lib/freadable.h: Likewise.
+ * lib/freadable.c: Likewise.
+ * lib/freading.h: Likewise.
+ * lib/freading.c: Likewise.
+ * lib/fwritable.h: Likewise.
+ * lib/fwritable.c: Likewise.
+ * lib/fwriting.h: Likewise.
+ * lib/fwriting.c: Likewise.
+
2020-10-11 KO Myung-Hun <komh78@gmail.com>
Fix "warning: implicit declaration of function 'pthread_sigmask'".
#include "stdio-impl.h"
/* This file is not used on systems that already have the __fpending function,
- namely glibc >= 2.2, Solaris >= 7, Android API >= 23. */
+ namely glibc >= 2.2, Solaris >= 7, Cygwin >= 1.7.34, Android API >= 23. */
/* Return the number of pending (aka buffered, unflushed)
bytes on the stream, FP, that is open for writing. */
/* GNU libc, BeOS, Haiku, Linux libc5 */
return fp->_IO_write_ptr - fp->_IO_write_base;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix 3, Android */
return fp->_p - fp->_bf._base;
#elif defined __EMX__ /* emx+gcc */
return fp->_ptr - fp->_buffer;
/* Specification. */
#include <stdio.h>
-#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Android API >= 23 */
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Cygwin >= 1.7.10, Android API >= 23 */
# include <stdio_ext.h>
#endif
#include <stdlib.h>
int
fpurge (FILE *fp)
{
-#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Android API >= 23, musl libc */
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Cygwin >= 1.7.10, Android API >= 23, musl libc */
__fpurge (fp);
/* The __fpurge function does not have a return value. */
return 0;
-#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin 1.7 */
+#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin >= 1.7 */
/* Call the system's fpurge function. */
# undef fpurge
#endif
/* This file is not used on systems that have the __freadable function,
- namely glibc >= 2.2, Solaris >= 7, Android API >= 23, musl libc. */
+ namely glibc >= 2.2, Solaris >= 7, Cygwin >= 1.7.34, Android API >= 23,
+ musl libc. */
bool
freadable (FILE *fp)
/* GNU libc, BeOS, Haiku, Linux libc5 */
return (fp->_flags & _IO_NO_READS) == 0;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix 3, Android */
return (fp_->_flags & (__SRW | __SRD)) != 0;
#elif defined __EMX__ /* emx+gcc */
return (fp->_flags & (_IORW | _IOREAD)) != 0;
STREAM must not be wide-character oriented.
The result doesn't change until the stream is closed or re-opened. */
-#if HAVE___FREADABLE /* glibc >= 2.2, Solaris >= 7, Android API >= 23, musl libc */
+#if HAVE___FREADABLE /* glibc >= 2.2, Solaris >= 7, Cygwin >= 1.7.34, Android API >= 23, musl libc */
# include <stdio_ext.h>
# define freadable(stream) (__freadable (stream) != 0)
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
&& fp->_IO_read_base != NULL));
# elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix 3, Android */
return (fp_->_flags & __SRD) != 0;
# elif defined __EMX__ /* emx+gcc */
return (fp->_flags & _IOREAD) != 0;
STREAM must not be wide-character oriented. */
#if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
-/* Solaris >= 7, Android API >= 29, not glibc >= 2.2, but glibc >= 2.7, or musl libc */
+/* Solaris >= 7, Cygwin >= 1.7.34, Android API >= 29, not glibc >= 2.2, but glibc >= 2.7, or musl libc */
# include <stdio_ext.h>
# define freading(stream) (__freading (stream) != 0)
#endif
/* This file is not used on systems that have the __fwritable function,
- namely glibc >= 2.2, Solaris >= 7, Android API >= 23, musl libc. */
+ namely glibc >= 2.2, Solaris >= 7, Cygwin >= 1.7.34, Android API >= 23,
+ musl libc. */
bool
fwritable (FILE *fp)
/* GNU libc, BeOS, Haiku, Linux libc5 */
return (fp->_flags & _IO_NO_WRITES) == 0;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix 3, Android */
return (fp_->_flags & (__SRW | __SWR)) != 0;
#elif defined __EMX__ /* emx+gcc */
return (fp->_flags & (_IORW | _IOWRT)) != 0;
STREAM must not be wide-character oriented.
The result doesn't change until the stream is closed or re-opened. */
-#if HAVE___FWRITABLE /* glibc >= 2.2, Solaris >= 7, Android API >= 23, musl libc */
+#if HAVE___FWRITABLE /* glibc >= 2.2, Solaris >= 7, Cygwin >= 1.7.34, Android API >= 23, musl libc */
# include <stdio_ext.h>
# define fwritable(stream) (__fwritable (stream) != 0)
#include "stdio-impl.h"
-/* This file is not used on systems that have the __fwritable function,
- namely glibc >= 2.2, Solaris >= 7, Android API >= 29, musl libc. */
+/* This file is not used on systems that have the __fwriting function,
+ namely glibc >= 2.2, Solaris >= 7, Cygwin >= 1.7.34, Android API >= 29,
+ musl libc. */
bool
fwriting (FILE *fp)
/* GNU libc, BeOS, Haiku, Linux libc5 */
return (fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) != 0;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin < 1.7.34, Minix 3, Android */
return (fp_->_flags & __SWR) != 0;
#elif defined __EMX__ /* emx+gcc */
return (fp->_flags & _IOWRT) != 0;
STREAM must not be wide-character oriented. */
-#if HAVE___FWRITING /* glibc >= 2.2, Solaris >= 7, Android API >= 29, musl libc */
+#if HAVE___FWRITING /* glibc >= 2.2, Solaris >= 7, Cygwin >= 1.7.34, Android API >= 29, musl libc */
# include <stdio_ext.h>
# define fwriting(stream) (__fwriting (stream) != 0)