I've attached a patch to address the fact that UnixWare does not have stdio_ext.h but has some __X() stdio helper functions.
Wrap "#include <stdio_ext.h>" in HAVE_STDIO_EXT_H insead of HAVE___X -- Tim Rice Multitalents t...@multitalents.net
diff --git a/ChangeLog b/ChangeLog index 5c4d8f849..51e074bd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2020-09-24 Tim Rice <t...@multitalents.net> + UnixWare does not have stdio_ext.h but has some __X() stdio + helper functions. + * lib/fbufmode.c: Wrap "#include <stdio_ext.h>" in HAVE_STDIO_EXT_H + * lib/fpurge.c: Likewise. + * lib/freadable.h: Likewise. + * lib/freadahead.h: Likewise. + * lib/freading.h: Likewise. + * lib/freadptr.h: Likewise. + * lib/fseterr.h: Likewise. + * lib/fwritable.h: Likewise. + * lib/fwriting.h: Likewise. + 2020-09-23 Paul Eggert <egg...@cs.ucla.edu> regex: fix ignore-case Turkish bug diff --git a/lib/fbufmode.c b/lib/fbufmode.c index 65a5cfc82..ec8afd510 100644 --- a/lib/fbufmode.c +++ b/lib/fbufmode.c @@ -19,7 +19,7 @@ /* Specification. */ #include "fbufmode.h" -#if HAVE___FLBF +#if HAVE_STDIO_EXT_H # include <stdio_ext.h> #endif @@ -61,7 +61,7 @@ fbufmode (FILE *fp) else return _IONBF; # else -# if HAVE___FLBF /* Solaris >= 7 */ +# if HAVE___FLBF /* Solaris >= 7, UnixWare 7.1.4 >= MP4 */ if (__flbf (fp)) return _IOLBF; # else diff --git a/lib/fpurge.c b/lib/fpurge.c index f05da5abb..2af81a605 100644 --- a/lib/fpurge.c +++ b/lib/fpurge.c @@ -19,7 +19,7 @@ /* Specification. */ #include <stdio.h> -#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Android API >= 23 */ +#if HAVE_STDIO_EXT_H /* glibc >= 2.2, Haiku, Solaris >= 7, Android API >= 23 */ # include <stdio_ext.h> #endif #include <stdlib.h> @@ -29,7 +29,7 @@ int fpurge (FILE *fp) { -#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Android API >= 23, musl libc */ +#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Android API >= 23, musl libc, UnixWare 7.1.4 >= MP4 */ __fpurge (fp); /* The __fpurge function does not have a return value. */ diff --git a/lib/freadable.h b/lib/freadable.h index 5a17e4a03..c664b7d26 100644 --- a/lib/freadable.h +++ b/lib/freadable.h @@ -22,9 +22,11 @@ STREAM must not be wide-character oriented. The result doesn't change until the stream is closed or re-opened. */ -#if HAVE___FREADABLE /* glibc >= 2.2, Solaris >= 7, Android API >= 23, musl libc */ +#if HAVE___FREADABLE /* glibc >= 2.2, Solaris >= 7, Android API >= 23, musl libc, UnixWare 7.1.4 >= MP4 */ -# 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/freadahead.h b/lib/freadahead.h index b971d5a06..d76b306ac 100644 --- a/lib/freadahead.h +++ b/lib/freadahead.h @@ -29,7 +29,9 @@ #if HAVE___FREADAHEAD /* musl libc */ -# include <stdio_ext.h> +# if HAVE_STDIO_EXT_H +# include <stdio_ext.h> +# endif # define freadahead(stream) __freadahead (stream) #else diff --git a/lib/freading.h b/lib/freading.h index 6c5592ec0..11deadc2d 100644 --- a/lib/freading.h +++ b/lib/freading.h @@ -33,9 +33,11 @@ STREAM must not be wide-character oriented. */ #if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) -/* Solaris >= 7, Android API >= 29, not glibc >= 2.2, but glibc >= 2.7, or musl libc */ +/* Solaris >= 7, Android API >= 29, not glibc >= 2.2, but glibc >= 2.7, or musl libc, UnixWare 7.1.4 >= MP4 */ -# 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/freadptr.h b/lib/freadptr.h index 07d2d727d..fc91a0b32 100644 --- a/lib/freadptr.h +++ b/lib/freadptr.h @@ -30,7 +30,9 @@ #if HAVE___FREADPTR /* musl libc */ -# include <stdio_ext.h> +# if HAVE_STDIO_EXT_H +# include <stdio_ext.h> +# endif # define freadptr(stream,sizep) __freadptr (stream, sizep) #else diff --git a/lib/fseterr.h b/lib/fseterr.h index bbeb6619f..81ca5b4d2 100644 --- a/lib/fseterr.h +++ b/lib/fseterr.h @@ -25,7 +25,9 @@ #if HAVE___FSETERR /* musl libc */ -# include <stdio_ext.h> +# if HAVE_STDIO_EXT_H +# include <stdio_ext.h> +# endif # define fseterr(fp) __fseterr (fp) #else diff --git a/lib/fwritable.h b/lib/fwritable.h index 44c760cf3..d8a705d34 100644 --- a/lib/fwritable.h +++ b/lib/fwritable.h @@ -22,9 +22,11 @@ STREAM must not be wide-character oriented. The result doesn't change until the stream is closed or re-opened. */ -#if HAVE___FWRITABLE /* glibc >= 2.2, Solaris >= 7, Android API >= 23, musl libc */ +#if HAVE___FWRITABLE /* glibc >= 2.2, Solaris >= 7, Android API >= 23, musl libc, UnixWare 7.1.4 >= MP4 */ -# 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 111e3dcb5..961e8a963 100644 --- a/lib/fwriting.h +++ b/lib/fwriting.h @@ -33,9 +33,11 @@ STREAM must not be wide-character oriented. */ -#if HAVE___FWRITING /* glibc >= 2.2, Solaris >= 7, Android API >= 29, musl libc */ +#if HAVE___FWRITING /* glibc >= 2.2, Solaris >= 7, Android API >= 29, musl libc, UnixWare 7.1.4 >= MP4 */ -# include <stdio_ext.h> +# if HAVE_STDIO_EXT_H +# include <stdio_ext.h> +# endif # define fwriting(stream) (__fwriting (stream) != 0) #else