diff options
author | Bruno Haible <bruno@clisp.org> | 2019-09-29 10:37:51 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-09-29 10:37:51 +0200 |
commit | 17cccbf76f01479de3f45a519a69eb02695eb1d6 (patch) | |
tree | 0cb5044340965c579934a51c24e871c1121ed9bf /lib | |
parent | 325321ef5c5f60bc75d757ce8048f86a597c7479 (diff) | |
download | gnulib-17cccbf76f01479de3f45a519a69eb02695eb1d6.tar.gz |
fbufmode: Fix compilation error on glibc >= 2.28 systems.
* lib/stdio-impl.h (_IO_UNBUFFERED): Define fallback on glibc >= 2.28.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stdio-impl.h | 13 |
1 files changed, 9 insertions, 4 deletions
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. */ |