| From 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e Mon Sep 17 00:00:00 2001 |
| From: Paul Eggert <eggert@cs.ucla.edu> |
| Date: Mon, 5 Mar 2018 10:56:29 -0800 |
| Subject: [PATCH 1/1] fflush: adjust to glibc 2.28 libio.h removal |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| Problem reported by Daniel P. Berrangé in: |
| https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html |
| * lib/fbufmode.c (fbufmode): |
| * lib/fflush.c (clear_ungetc_buffer_preserving_position) |
| (disable_seek_optimization, rpl_fflush): |
| * lib/fpending.c (__fpending): |
| * lib/fpurge.c (fpurge): |
| * lib/freadable.c (freadable): |
| * lib/freadahead.c (freadahead): |
| * lib/freading.c (freading): |
| * lib/freadptr.c (freadptr): |
| * lib/freadseek.c (freadptrinc): |
| * lib/fseeko.c (fseeko): |
| * lib/fseterr.c (fseterr): |
| * lib/fwritable.c (fwritable): |
| * lib/fwriting.c (fwriting): |
| Check _IO_EOF_SEEN instead of _IO_ftrylockfile. |
| * lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]: |
| Define if not already defined. |
| --- |
| lib/fseterr.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| [yann.morin.1998@free.fr: partially backport from upstream gnulib] |
| Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> |
| |
| diff --git a/lib/fseterr.c b/lib/fseterr.c |
| index 82649c3ac..adb637256 100644 |
| --- a/lib/fseterr.c |
| +++ b/lib/fseterr.c |
| @@ -29,7 +29,7 @@ fseterr (FILE *fp) |
| /* Most systems provide FILE as a struct and the necessary bitmask in |
| <stdio.h>, because they need it for implementing getc() and putc() as |
| fast macros. */ |
| -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ |
| +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ |
| fp->_flags |= _IO_ERR_SEEN; |
| #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ |
| /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ |
| -- |
| 2.14.1 |
| |