]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
sort: not a special case for mbrtowc
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 22 Sep 2023 16:49:41 +0000 (09:49 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Sep 2023 07:28:27 +0000 (00:28 -0700)
* configure.ac (GNULIB_MBRTOWC_SINGLE_THREAD): Define.

configure.ac

index a3e5b22016e31beb7e4a6133311fffbceef4cb09..eec1107906a4cb441f832a33d5765d94956999b6 100644 (file)
@@ -70,11 +70,11 @@ AC_DEFINE([GNULIB_EXCLUDE_SINGLE_THREAD], [1],
   [Define to 1 if apps call 'exclude' functions from a single thread.])
 AC_DEFINE([GNULIB_REGEX_SINGLE_THREAD], [1],
   [Define to 1 if apps call 'regex' functions from a single thread.])
-# This is unsafe, since 'sort' uses mbrtowc indirectly, possibly from
-# multiple threads.
-AC_DEFINE([GNULIB_MBRTOWC_SINGLE_THREAD], [1],
-  [Define to 1 if apps call mbrtowc, mbrtoc32, and 'regex' functions
-   from a single thread.])
+# Although 'sort' is multithreaded and can use these functions,
+# it uses them only from the main thread.
+AC_DEFINE([GNULIB_MBRTOWC_SINGLE_THREAD], [1],
+  [Define to 1 if apps call mbrtowc, mbrtoc32, and 'regex' functions
+   from a single thread.])
 # This is safe, since all apps set locale early.
 AC_DEFINE([GNULIB_WCHAR_SINGLE_LOCALE], [1],
   [Define to 1 if apps don't set the locale after calling