]> Savannah Git Hosting - gnulib.git/commitdiff
error: tune a bit for xstdopen
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Nov 2024 20:51:38 +0000 (12:51 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Nov 2024 21:49:37 +0000 (13:49 -0800)
* lib/error.c (flush_stdout): Also optimize if GNULIB_XSTDOPEN.

ChangeLog
lib/error.c

index 41eb842f0fda431a425691e2790fcd703f284af5..97ef0310fefb550203e8de804a996f93bb7bc7a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2024-11-06  Paul Eggert  <eggert@cs.ucla.edu>
 
+       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.
index 6816805326a0efcf23816fda5977f37d356d5c75..f4f21bf2a7134a13b43b6b9e3359690e37eba328 100644 (file)
@@ -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;