]> Savannah Git Hosting - gnulib.git/commitdiff
fbufmode: Fix compilation error on glibc >= 2.28 systems.
authorBruno Haible <bruno@clisp.org>
Sun, 29 Sep 2019 08:37:51 +0000 (10:37 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 29 Sep 2019 08:37:51 +0000 (10:37 +0200)
* lib/stdio-impl.h (_IO_UNBUFFERED): Define fallback on glibc >= 2.28.

ChangeLog
lib/stdio-impl.h

index 51812c5650c8ab98edefb7ad129daf77ed30df57..df438e96da98268c4a7acdedb6a7d4ecfa6c663b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-29  Bruno Haible  <bruno@clisp.org>
+
+       fbufmode: Fix compilation error on glibc >= 2.28 systems.
+       * lib/stdio-impl.h (_IO_UNBUFFERED): Define fallback on glibc >= 2.28.
+
 2019-09-28  Bruno Haible  <bruno@clisp.org>
 
        Update comments that refer to POSIX.
index 4260468b612e80bb0452efc3c337f8a7edd81a5b..d49625780bbde650544cf05cde1c8b47a84ecb21 100644 (file)
    the same implementation of stdio extension API, except that some fields
    have different naming conventions, or their access requires some casts.  */
 
-/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
-   problem by defining it ourselves.  FIXME: Do not rely on glibc
+/* Glibc 2.28 made _IO_UNBUFFERED and _IO_IN_BACKUP private.  For now, work
+   around this problem by defining them ourselves.  FIXME: Do not rely on glibc
    internals.  */
-#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
-# define _IO_IN_BACKUP 0x100
+#if defined _IO_EOF_SEEN
+# if !defined _IO_UNBUFFERED
+#  define _IO_UNBUFFERED 0x2
+# endif
+# if !defined _IO_IN_BACKUP
+#  define _IO_IN_BACKUP 0x100
+# endif
 #endif
 
 /* BSD stdio derived implementations.  */