From: Paul Eggert Date: Wed, 6 Nov 2024 20:51:38 +0000 (-0800) Subject: error: tune a bit for xstdopen X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=13ab059f86b1bf815fcf6d5c3cd42b05d0cd8f25;p=gnulib.git error: tune a bit for xstdopen * lib/error.c (flush_stdout): Also optimize if GNULIB_XSTDOPEN. --- diff --git a/ChangeLog b/ChangeLog index 41eb842f0f..97ef0310fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2024-11-06 Paul Eggert + error: tune a bit for xstdopen + * lib/error.c (flush_stdout): Also optimize if GNULIB_XSTDOPEN. + unistd-safer, xstdopen: indicate presence * modules/unistd-safer, modules/xstdopen (configure.ac): Add module indicator. diff --git a/lib/error.c b/lib/error.c index 6816805326..f4f21bf2a7 100644 --- a/lib/error.c +++ b/lib/error.c @@ -165,8 +165,8 @@ flush_stdout (void) #if !_LIBC int stdout_fd; -# if GNULIB_FREOPEN_SAFER - /* Use of gnulib's freopen-safer module normally ensures that +# if GNULIB_FREOPEN_SAFER || GNULIB_XSTDOPEN + /* Gnulib's freopen-safer and/or xstdopen modules normally ensure that fileno (stdout) == 1 whenever stdout is open. */ stdout_fd = STDOUT_FILENO;