summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog18
-rw-r--r--lib/fbufmode.c4
-rw-r--r--lib/fpurge.c6
-rw-r--r--lib/freadable.h4
-rw-r--r--lib/freading.h4
-rw-r--r--lib/fwritable.h4
-rw-r--r--lib/fwriting.h4
-rw-r--r--m4/fbufmode.m43
-rw-r--r--m4/fpurge.m43
-rw-r--r--m4/freadable.m43
-rw-r--r--m4/freading.m43
-rw-r--r--m4/fwritable.m43
-rw-r--r--m4/fwriting.m43
13 files changed, 49 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index defa84ad2a..070929e37c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
2020-10-11 Bruno Haible <bruno@clisp.org>
+ 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.
+
+2020-10-11 Bruno Haible <bruno@clisp.org>
+
stdioext: Update comments regarding Cygwin.
* lib/fpending.c: Update comments.
* lib/fpurge.c: Likewise.
diff --git a/lib/fbufmode.c b/lib/fbufmode.c
index 65a5cfc821..a528a63e35 100644
--- a/lib/fbufmode.c
+++ b/lib/fbufmode.c
@@ -20,7 +20,9 @@
#include "fbufmode.h"
#if HAVE___FLBF
-# include <stdio_ext.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
#endif
#include "stdio-impl.h"
diff --git a/lib/fpurge.c b/lib/fpurge.c
index fc88646ca4..9469ce43ca 100644
--- a/lib/fpurge.c
+++ b/lib/fpurge.c
@@ -19,8 +19,10 @@
/* Specification. */
#include <stdio.h>
-#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Cygwin >= 1.7.10, Android API >= 23 */
-# include <stdio_ext.h>
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Cygwin >= 1.7.10, Android API >= 23, musl libc */
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
#endif
#include <stdlib.h>
diff --git a/lib/freadable.h b/lib/freadable.h
index f05e5fb397..9139865023 100644
--- a/lib/freadable.h
+++ b/lib/freadable.h
@@ -24,7 +24,9 @@
#if HAVE___FREADABLE /* glibc >= 2.2, Solaris >= 7, Cygwin >= 1.7.34, Android API >= 23, musl libc */
-# include <stdio_ext.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
# define freadable(stream) (__freadable (stream) != 0)
#else
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
diff --git a/lib/fwritable.h b/lib/fwritable.h
index 509e069528..fb9c871efa 100644
--- a/lib/fwritable.h
+++ b/lib/fwritable.h
@@ -24,7 +24,9 @@
#if HAVE___FWRITABLE /* glibc >= 2.2, Solaris >= 7, Cygwin >= 1.7.34, Android API >= 23, musl libc */
-# include <stdio_ext.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
# define fwritable(stream) (__fwritable (stream) != 0)
#else
diff --git a/lib/fwriting.h b/lib/fwriting.h
index 2d16f42d47..3aa5d7f0ee 100644
--- a/lib/fwriting.h
+++ b/lib/fwriting.h
@@ -35,7 +35,9 @@
#if HAVE___FWRITING /* glibc >= 2.2, Solaris >= 7, Cygwin >= 1.7.34, Android API >= 29, musl libc */
-# include <stdio_ext.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
# define fwriting(stream) (__fwriting (stream) != 0)
#else
diff --git a/m4/fbufmode.m4 b/m4/fbufmode.m4
index 87e76e0d7b..e2a146fa29 100644
--- a/m4/fbufmode.m4
+++ b/m4/fbufmode.m4
@@ -1,4 +1,4 @@
-# fbufmode.m4 serial 2
+# fbufmode.m4 serial 3
dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,5 +7,6 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FBUFMODE],
[
dnl Prerequisites of lib/fbufmode.c.
+ AC_CHECK_HEADERS_ONCE([stdio_ext.h])
AC_CHECK_FUNCS_ONCE([__flbf __fbufsize])
])
diff --git a/m4/fpurge.m4 b/m4/fpurge.m4
index 0796a6f0ed..9a486e00a4 100644
--- a/m4/fpurge.m4
+++ b/m4/fpurge.m4
@@ -1,4 +1,4 @@
-# fpurge.m4 serial 11
+# fpurge.m4 serial 12
dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,7 @@ AC_DEFUN([gl_FUNC_FPURGE],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_HEADERS_ONCE([stdio_ext.h])
AC_CHECK_FUNCS_ONCE([fpurge])
AC_CHECK_FUNCS_ONCE([__fpurge])
AC_CHECK_DECLS([fpurge], , , [[#include <stdio.h>]])
diff --git a/m4/freadable.m4 b/m4/freadable.m4
index 3237effe02..e988054374 100644
--- a/m4/freadable.m4
+++ b/m4/freadable.m4
@@ -1,4 +1,4 @@
-# freadable.m4 serial 2
+# freadable.m4 serial 3
dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,5 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FREADABLE],
[
+ AC_CHECK_HEADERS_ONCE([stdio_ext.h])
AC_CHECK_FUNCS_ONCE([__freadable])
])
diff --git a/m4/freading.m4 b/m4/freading.m4
index 440c241e47..6eb25abfa2 100644
--- a/m4/freading.m4
+++ b/m4/freading.m4
@@ -1,4 +1,4 @@
-# freading.m4 serial 1
+# freading.m4 serial 2
dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,5 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FREADING],
[
+ AC_CHECK_HEADERS_ONCE([stdio_ext.h])
AC_CHECK_FUNCS_ONCE([__freading])
])
diff --git a/m4/fwritable.m4 b/m4/fwritable.m4
index dbe887e886..55db08f87e 100644
--- a/m4/fwritable.m4
+++ b/m4/fwritable.m4
@@ -1,4 +1,4 @@
-# fwritable.m4 serial 2
+# fwritable.m4 serial 3
dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,5 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FWRITABLE],
[
+ AC_CHECK_HEADERS_ONCE([stdio_ext.h])
AC_CHECK_FUNCS_ONCE([__fwritable])
])
diff --git a/m4/fwriting.m4 b/m4/fwriting.m4
index 4d7cd3ede1..fe2f10ea27 100644
--- a/m4/fwriting.m4
+++ b/m4/fwriting.m4
@@ -1,4 +1,4 @@
-# fwriting.m4 serial 2
+# fwriting.m4 serial 3
dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,5 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FWRITING],
[
+ AC_CHECK_HEADERS_ONCE([stdio_ext.h])
AC_CHECK_FUNCS_ONCE([__fwriting])
])