summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-03-07 02:42:24 +0100
committerBruno Haible <bruno@clisp.org>2021-03-07 11:01:59 +0100
commitf4bf3936b988eb65361e04b0ca3898681b787c58 (patch)
tree2a207af76565f4dd565775739bb765fb65f58a45
parentd26b0a2672f5adec9658ac606661b2f3b24c0336 (diff)
downloadgnulib-f4bf3936b988eb65361e04b0ca3898681b787c58.tar.gz
gnulib-f4bf3936b988eb65361e04b0ca3898681b787c58.tar.bz2
exclude: Allow stdio optimization independently of 'unlocked-io'.
* lib/exclude.c: Test GNULIB_EXCLUDE_SINGLE_THREAD instead of USE_UNLOCKED_IO. * modules/exclude (Depends-on): Add unlocked-io-internal. * doc/multithread.texi: Document GNULIB_EXCLUDE_SINGLE_THREAD.
-rw-r--r--ChangeLog8
-rw-r--r--doc/multithread.texi4
-rw-r--r--lib/exclude.c2
-rw-r--r--modules/exclude1
4 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 47f68070bf..d2ffff05af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2021-03-06 Bruno Haible <bruno@clisp.org>
+ exclude: Allow stdio optimization independently of 'unlocked-io'.
+ * lib/exclude.c: Test GNULIB_EXCLUDE_SINGLE_THREAD instead of
+ USE_UNLOCKED_IO.
+ * modules/exclude (Depends-on): Add unlocked-io-internal.
+ * doc/multithread.texi: Document GNULIB_EXCLUDE_SINGLE_THREAD.
+
+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.
diff --git a/doc/multithread.texi b/doc/multithread.texi
index a63d3ee0fa..082ccb05b5 100644
--- a/doc/multithread.texi
+++ b/doc/multithread.texi
@@ -278,4 +278,8 @@ been initialized. This macro optimizes the functions @code{mbrtowc} and
You may define the C macro @code{GNULIB_GETUSERSHELL_SINGLE_THREAD}, if all the
programs in your package invoke the functions @code{setusershell},
@code{getusershell}, @code{endusershell} only from a single thread.
+@item
+You may define the C macro @code{GNULIB_EXCLUDE_SINGLE_THREAD}, if all the
+programs in your package invoke the functions of the @code{exclude} module
+only from a single thread.
@end itemize
diff --git a/lib/exclude.c b/lib/exclude.c
index a9c4e68aae..4ef4e08f13 100644
--- a/lib/exclude.c
+++ b/lib/exclude.c
@@ -42,7 +42,7 @@
#include "verify.h"
#include "filename.h"
-#if USE_UNLOCKED_IO
+#if GNULIB_EXCLUDE_SINGLE_THREAD
# include "unlocked-io.h"
#endif
diff --git a/modules/exclude b/modules/exclude
index 2529027218..13871bd635 100644
--- a/modules/exclude
+++ b/modules/exclude
@@ -14,6 +14,7 @@ mbscasecmp
mbuiter
regex
stdbool
+unlocked-io-internal
verify
xalloc

Return to:

Send suggestions and report system problems to the System administrator.