summaryrefslogtreecommitdiff
path: root/lib/nl_langinfo-lock.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* Put LGPLv2+ notices in source files where appropriate.Bruno Haible2021-06-041-7/+7
| | | | | * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* nl_langinfo: Make multithread-safe on Solaris 10 and Solaris 11.3.Bruno Haible2020-09-191-0/+150
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.