]> Savannah Git Hosting - gnulib.git/commit
nl_langinfo: Fix multithread-safety bug on mingw and MSVC.
authorBruno Haible <bruno@clisp.org>
Tue, 17 Dec 2019 13:00:59 +0000 (14:00 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 17 Dec 2019 13:03:23 +0000 (14:03 +0100)
commit5dbb9992fe9c872b3fb57b79a8a74161d05ea50b
treed7b3637bbbf2081837b194d82f341bc67f892788
parent9accf385430eabe2874a81121d7781943ca7a292
nl_langinfo: Fix multithread-safety bug on mingw and MSVC.

* lib/nl_langinfo.c (ctype_codeset, rpl_nl_langinfo): Use a
stack-allocated buffer to assemble each result and different static
buffers to return it.
* tests/test-nl_langinfo-mt.c: New file.
* modules/nl_langinfo-tests (Files): Add it.
(Depends-on): Add thread, nanosleep.
(Makefile.am): Build test-nl_langinfo-mt test.
ChangeLog
lib/nl_langinfo.c
modules/nl_langinfo-tests
tests/test-nl_langinfo-mt.c [new file with mode: 0644]