diff options
Diffstat (limited to 'lib/fflush.c')
-rw-r--r-- | lib/fflush.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/fflush.c b/lib/fflush.c index 8ac5dea..5547d54 100644 --- a/lib/fflush.c +++ b/lib/fflush.c @@ -33,7 +33,8 @@ #undef fflush -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 +/* GNU libc, BeOS, Haiku, Linux libc5 */ /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ static void @@ -71,7 +72,8 @@ clear_ungetc_buffer (FILE *fp) #endif -#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) +#if ! (defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1) +/* GNU libc, BeOS, Haiku, Linux libc5 */ # if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ @@ -145,7 +147,8 @@ rpl_fflush (FILE *stream) if (stream == NULL || ! freading (stream)) return fflush (stream); -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 + /* GNU libc, BeOS, Haiku, Linux libc5 */ clear_ungetc_buffer_preserving_position (stream); |