Paul Eggert wrote: > Adjust to 2021-03-07 change “Rename GNULIB_WCHAR_SINGLE to > GNULIB_WCHAR_SINGLE_LOCALE”. Apparently nobody noticed that > the module was broken.
Oh, indeed. The mistake goes back to 2020-08-08, when I documented in multithread.texi that "You may define the C macro GNULIB_WCHAR_SINGLE, if all the programs in your package are single-threaded and won't change the locale ..." So, I was under the impression that coreutils would define this macro as part of its AM_CPPFLAGS. The 2021-03-07 change was done in the same spirit. > Perhaps we should obsolete the module? No. No one noticed the mistake because coreutils is the only user of this module, and coreutils apparently has no automated performance test for things that involve mbrtowc and wcwidth. Instead, we need to fix the doc mistake: 2023-08-30 Bruno Haible <br...@clisp.org> doc: Mention the module 'wchar-single'. * doc/multithread.texi: Mention the module 'wchar-single'. diff --git a/doc/multithread.texi b/doc/multithread.texi index 87485e8580..7d8126e8f3 100644 --- a/doc/multithread.texi +++ b/doc/multithread.texi @@ -290,6 +290,8 @@ @end itemize This macro optimizes the functions @code{mbrtowc}, @code{mbrtoc32}, and @code{wcwidth}. +You can get this macro defined by including the Gnulib module +@code{wchar-single}. @item You may define the C macro @code{GNULIB_GETUSERSHELL_SINGLE_THREAD}, if all the programs in your package invoke the functions @code{setusershell},