From: Bruno Haible Date: Sun, 7 Mar 2021 01:36:31 +0000 (+0100) Subject: readutmp: Optimize stdio accesses. X-Git-Tag: v1.0~3038 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=d26b0a2672f5adec9658ac606661b2f3b24c0336;p=gnulib.git readutmp: Optimize stdio accesses. * lib/readutmp.c: Include unlocked-io.h unconditionally. * modules/readutmp (Depends-on): Add unlocked-io-internal. --- diff --git a/ChangeLog b/ChangeLog index 1159ee8005..47f68070bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-03-06 Bruno Haible + + 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 mountlist: Optimize stdio accesses. 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