From: Bruno Haible Date: Sun, 29 Sep 2019 08:37:51 +0000 (+0200) Subject: fbufmode: Fix compilation error on glibc >= 2.28 systems. X-Git-Tag: v1.0~4642 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=17cccbf76f01479de3f45a519a69eb02695eb1d6;p=gnulib.git fbufmode: Fix compilation error on glibc >= 2.28 systems. * lib/stdio-impl.h (_IO_UNBUFFERED): Define fallback on glibc >= 2.28. --- diff --git a/ChangeLog b/ChangeLog index 51812c5650..df438e96da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-09-29 Bruno Haible + + 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 Update comments that refer to POSIX. diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 4260468b61..d49625780b 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h @@ -18,11 +18,16 @@ 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. */