+2024-09-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ fflush: NetBSD, OpenBSD can’t fflush input
+ * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Guess no on NetBSD and
+ OpenBSD; they document fflush to fail unless the stream is open
+ for writing.
+
2024-09-16 Bruno Haible <bruno@clisp.org>
unictype/category-of: Fix integer overflow in generated table.
@code{fflush} on an input stream right after @code{ungetc} does not discard
the @code{ungetc} buffer, on some platforms:
macOS 14, FreeBSD 6.0, NetBSD 10.0, OpenBSD 7.5, Cygwin 1.5.25-10.
+@item
+@code{fflush} fails with @code{EBADF} if the stream is not open for writing:
+NetBSD 10.0, OpenBSD 7.5.
@end itemize
Portability problems not fixed by Gnulib:
# fflush.m4
-# serial 19
+# serial 20
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[gl_cv_func_fflush_stdin=yes],
[gl_cv_func_fflush_stdin=no],
[case "$host_os" in
- # Guess no on native Windows.
- mingw* | windows*) gl_cv_func_fflush_stdin="guessing no" ;;
+ # Guess no on NetBSD, OpenBSD, native Windows.
+ netbsd* | openbsd* | mingw* | windows*)
+ gl_cv_func_fflush_stdin="guessing no" ;;
*) gl_cv_func_fflush_stdin=cross ;;
esac
])
*) gl_func_fflush_stdin='(-1)' ;;
esac
AC_DEFINE_UNQUOTED([FUNC_FFLUSH_STDIN], [$gl_func_fflush_stdin],
- [Define to 1 if fflush is known to work on stdin as per POSIX.1-2008,
- 0 if fflush is known to not work, -1 if unknown.])
+ [Define to 1 if fflush is known to work on stdin as per POSIX.1-2008
+ or later, 0 if fflush is known to not work, -1 if unknown.])
])
# Prerequisites of lib/fflush.c.