bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/9] error: tune a bit for xstdopen


From: Paul Eggert
Subject: [PATCH 4/9] error: tune a bit for xstdopen
Date: Wed, 6 Nov 2024 13:49:45 -0800

* lib/error.c (flush_stdout): Also optimize if GNULIB_XSTDOPEN.
---
 ChangeLog   | 3 +++
 lib/error.c | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 41eb842f0f..97ef0310fe 100644
--- 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.
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;
-- 
2.43.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]