From: Bruno Haible Date: Sun, 7 Mar 2021 01:31:45 +0000 (+0100) Subject: mountlist: Optimize stdio accesses. X-Git-Tag: v1.0~3039 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=895c6f0664d19f754fe3905bae1bae83aee46bd0;p=gnulib.git mountlist: Optimize stdio accesses. * lib/mountlist.c: Include unlocked-io.h unconditionally. * modules/mountlist (Depends-on): Add unlocked-io-internal. --- diff --git a/ChangeLog b/ChangeLog index d6e8d542de..1159ee8005 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-03-06 Bruno Haible + + mountlist: Optimize stdio accesses. + * lib/mountlist.c: Include unlocked-io.h unconditionally. + * modules/mountlist (Depends-on): Add unlocked-io-internal. + 2021-03-06 Bruno Haible getusershell: Optimize stdio accesses when possible. diff --git a/lib/mountlist.c b/lib/mountlist.c index fae5b601ba..27989d271c 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -149,9 +149,8 @@ # define MNT_IGNORE(M) 0 #endif -#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" /* The results of opendir() in this file are not used with dirfd and fchdir, therefore save some unnecessary work in fchdir.c. */ diff --git a/modules/mountlist b/modules/mountlist index 7542048e45..8ec4793355 100644 --- a/modules/mountlist +++ b/modules/mountlist @@ -11,6 +11,7 @@ Depends-on: fopen-gnu getline open +unlocked-io-internal stdbool stdint strstr-simple