summaryrefslogtreecommitdiff
path: root/doc/multithread.texi
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-03-07 10:45:58 +0100
committerBruno Haible <bruno@clisp.org>2021-03-07 11:02:00 +0100
commit2a200f4eb4754823c5674580bb0b68a88fd35077 (patch)
treeb87e5a47fae25f5d30e9be9b97f5158e21ae72f8 /doc/multithread.texi
parentcd057fa80c74dcf1d0a74290cb5ad6cdc3136428 (diff)
downloadgnulib-2a200f4eb4754823c5674580bb0b68a88fd35077.tar.gz
Rename GNULIB_WCHAR_SINGLE to GNULIB_WCHAR_SINGLE_LOCALE.
* lib/lc-charset-dispatch.c: Test GNULIB_WCHAR_SINGLE_LOCALE instead of GNULIB_WCHAR_SINGLE. * lib/wcwidth.c: Likewise. * tests/test-wcwidth.c: Likewise. * doc/multithread.texi: Document GNULIB_WCHAR_SINGLE_LOCALE instead of GNULIB_WCHAR_SINGLE. * NEWS: Document the change.
Diffstat (limited to 'doc/multithread.texi')
-rw-r--r--doc/multithread.texi13
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/multithread.texi b/doc/multithread.texi
index b28d1de73c..eef724d2ae 100644
--- a/doc/multithread.texi
+++ b/doc/multithread.texi
@@ -279,9 +279,16 @@ programs in your package invoke the functions @code{mbrtowc}, @code{mbrtoc32},
and the functions of the @code{regex} module only from a single thread. (The
@code{regex} module uses @code{mbrtowc} under the hood.)
@item
-You may define the C macro @code{GNULIB_WCHAR_SINGLE}, if all the programs in
-your package are single-threaded and won't change the locale after it has
-been initialized. This macro optimizes the functions @code{mbrtowc} and
+You may define the C macro @code{GNULIB_WCHAR_SINGLE_LOCALE}, if all the
+programs in your package set the locale early and
+@itemize
+@item
+don't change the locale after it has been initialized, and
+@item
+don't call locale sensitive functions (@code{mbrtowc}, @code{wcwidth}, etc.@:)
+before the locale has been initialized.
+@end itemize
+This macro optimizes the functions @code{mbrtowc}, @code{mbrtoc32}, and
@code{wcwidth}.
@item
You may define the C macro @code{GNULIB_GETUSERSHELL_SINGLE_THREAD}, if all the