summaryrefslogtreecommitdiff
path: root/modules/setlocale-null
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-09-19 12:37:14 +0200
committerBruno Haible <bruno@clisp.org>2020-09-19 12:37:14 +0200
commit3d87a9ada8e2cf75cac9d969d76c5f2ac0b9b38d (patch)
tree4860971456e082208c11fbbd74ca58142d55de28 /modules/setlocale-null
parent875dff5812cb9de949727e1aa399a06b07a886a9 (diff)
downloadgnulib-3d87a9ada8e2cf75cac9d969d76c5f2ac0b9b38d.tar.gz
nl_langinfo: Make multithread-safe on Solaris 10 and Solaris 11.3.
Reported for Solaris 10 by Dagobert Michelsen via Paul Eggert in <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00023.html> and for Solaris 11.3 by Jeffrey Walton <noloader@gmail.com> in <https://lists.gnu.org/archive/html/bug-grep/2020-06/msg00013.html>. * lib/nl_langinfo-lock.c: New file, based on lib/setlocale_null-lock.c. * lib/nl_langinfo.c: Include <stdlib.h> and <windows.h> or <pthread.h> or <threads.h>. (ITEMS, MAX_RESULT_LEN): New macros. (nl_langinfo_unlocked): New function. (gl_get_nl_langinfo_lock): New declaration. (nl_langinfo_with_lock): New function, based on lib/setlocale_null.c. (rpl_nl_langinfo): Use nl_langinfo_with_lock instead of nl_langinfo. * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Require gl_PTHREADLIB. Define HAVE_THREADS_H. Set NL_LANGINFO_MTSAFE. If setting it to 0, also set REPLACE_NL_LANGINFO. (gl_PREREQ_NL_LANGINFO_LOCK): New macro. * modules/nl_langinfo (Files): Add lib/nl_langinfo-lock.c, lib/windows-initguard.h, m4/threadlib.m4, m4/visibility.m4. (configure.ac): Compile nl_langinfo-lock.c when NL_LANGINFO_MTSAFE is 0. * doc/posix-functions/nl_langinfo.texi: Mention the Solaris bug.
Diffstat (limited to 'modules/setlocale-null')
0 files changed, 0 insertions, 0 deletions