[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
- [PATCH 1/9] Document xstdopen vs *-safer better, Paul Eggert, 2024/11/06
- [PATCH 2/9] xstdopen: indicate presence, Paul Eggert, 2024/11/06
- [PATCH 4/9] error: tune a bit for xstdopen,
Paul Eggert <=
- [PATCH 3/9] unistd-safer indicate presence, Paul Eggert, 2024/11/06
- [PATCH 8/9] getusershell: don’t depend on fopen-safer, Paul Eggert, 2024/11/06
- [PATCH 7/9] savewd: don’t depend on fcntl-safer, Paul Eggert, 2024/11/06
- [PATCH 5/9] save-cwd: don’t depend on fd-safer-flag, unistd-safer, Paul Eggert, 2024/11/06
- [PATCH 6/9] savedir: don’t depend on dirent-safer, Paul Eggert, 2024/11/06
- [PATCH 9/9] opendirat: don’t depend on openat-safer, Paul Eggert, 2024/11/06