diff options
author | Bruno Haible <bruno@clisp.org> | 2021-03-07 02:36:31 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-03-07 11:01:58 +0100 |
commit | d26b0a2672f5adec9658ac606661b2f3b24c0336 (patch) | |
tree | ed06bbb504b60f8df858b0354ae4ecb712da4051 | |
parent | 895c6f0664d19f754fe3905bae1bae83aee46bd0 (diff) | |
download | gnulib-d26b0a2672f5adec9658ac606661b2f3b24c0336.tar.gz gnulib-d26b0a2672f5adec9658ac606661b2f3b24c0336.tar.bz2 |
readutmp: Optimize stdio accesses.
* lib/readutmp.c: Include unlocked-io.h unconditionally.
* modules/readutmp (Depends-on): Add unlocked-io-internal.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/readutmp.c | 5 | ||||
-rw-r--r-- | modules/readutmp | 1 |
3 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,11 @@ 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. * lib/mountlist.c: Include unlocked-io.h unconditionally. * modules/mountlist (Depends-on): Add unlocked-io-internal. diff --git a/lib/readutmp.c b/lib/readutmp.c index 26ad815438..73db856c5d 100644 --- a/lib/readutmp.c +++ b/lib/readutmp.c @@ -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" diff --git a/modules/readutmp b/modules/readutmp index e88897c999..18cdad10f8 100644 --- a/modules/readutmp +++ b/modules/readutmp @@ -12,6 +12,7 @@ xalloc stdbool stdint fopen-gnu +unlocked-io-internal configure.ac: gl_READUTMP |