summaryrefslogtreecommitdiff
path: root/lib/freading.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-10-11 15:24:52 +0200
committerBruno Haible <bruno@clisp.org>2020-10-11 15:24:52 +0200
commit075ded5020ef1dddd60a4e5c6d4a369fecefceb2 (patch)
tree4cdb2599db503e18bd17ee8a698a54a56966936c /lib/freading.h
parentfd76df5d12d6710fc94a78b91cc554b64f077c70 (diff)
downloadgnulib-075ded5020ef1dddd60a4e5c6d4a369fecefceb2.tar.gz
stdioext: Avoid compilation errors on UnixWare 7.
Reported by Tim Rice <tim@multitalents.net> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00127.html>. * lib/fbufmode.c: Don't include <stdio_ext.h> if it does not exist. * lib/fpurge.c: Likewise. * lib/freadable.h: Likewise. * lib/freading.h: Likewise. * lib/fwritable.h: Likewise. * lib/fwriting.h: Likewise. * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether <stdio_ext.h> exists. * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise. * m4/freadable.m4 (gl_FUNC_FREADABLE): Likewise. * m4/freading.m4 (gl_FUNC_FREADING): Likewise. * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Likewise. * m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise.
Diffstat (limited to 'lib/freading.h')
-rw-r--r--lib/freading.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/freading.h b/lib/freading.h
index 1891f5af4f..7bef18ede9 100644
--- a/lib/freading.h
+++ b/lib/freading.h
@@ -35,7 +35,9 @@
#if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
/* Solaris >= 7, Cygwin >= 1.7.34, Android API >= 29, not glibc >= 2.2, but glibc >= 2.7, or musl libc */
-# include <stdio_ext.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
# define freading(stream) (__freading (stream) != 0)
#else