]> Savannah Git Hosting - gnulib.git/commitdiff
readutmp: Optimize stdio accesses.
authorBruno Haible <bruno@clisp.org>
Sun, 7 Mar 2021 01:36:31 +0000 (02:36 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 7 Mar 2021 10:01:58 +0000 (11:01 +0100)
* lib/readutmp.c: Include unlocked-io.h unconditionally.
* modules/readutmp (Depends-on): Add unlocked-io-internal.

ChangeLog
lib/readutmp.c
modules/readutmp

index 1159ee80056e2ccce9538b4881dee6a8dfdb726c..47f68070bf446d4f4be952f017643be59e8de6d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-03-06  Bruno Haible  <bruno@clisp.org>
+
+       readutmp: Optimize stdio accesses.
+       * lib/readutmp.c: Include unlocked-io.h unconditionally.
+       * modules/readutmp (Depends-on): Add unlocked-io-internal.
+
 2021-03-06  Bruno Haible  <bruno@clisp.org>
 
        mountlist: Optimize stdio accesses.
index 26ad815438792ad25f2be09ca233fbd76f4943fe..73db856c5d71ae9b2990ee4dff8d35623105975c 100644 (file)
@@ -34,9 +34,8 @@
 
 #include "xalloc.h"
 
-#if USE_UNLOCKED_IO
-# include "unlocked-io.h"
-#endif
+/* Each of the FILE streams in this file is only used in a single thread.  */
+#include "unlocked-io.h"
 
 #if 8 <= __GNUC__
 # pragma GCC diagnostic ignored "-Wsizeof-pointer-memaccess"
index e88897c999a9ffd8141dc7d8f65fafd922a8ece8..18cdad10f88bc5d47701ca3f50b4aca3b264adc8 100644 (file)
@@ -12,6 +12,7 @@ xalloc
 stdbool
 stdint
 fopen-gnu
+unlocked-io-internal
 
 configure.ac:
 gl_READUTMP