From: Bruno Haible Date: Wed, 8 Feb 2023 22:44:33 +0000 (+0100) Subject: nl_langinfo: Add comment regarding per-thread locales. X-Git-Tag: v1.0~1694 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3348dad8cd44857138662568b8cc076c3331903e;p=gnulib.git nl_langinfo: Add comment regarding per-thread locales. * lib/nl_langinfo.c (ctype_codeset): Add comment. --- diff --git a/ChangeLog b/ChangeLog index a6b0d2eef7..97f810d1fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2023-02-08 Bruno Haible + nl_langinfo: Add comment regarding per-thread locales. + * lib/nl_langinfo.c (ctype_codeset): Add comment. + nl_langinfo tests: Add another test. * tests/test-nl_langinfo2.c: New file. * tests/test-nl_langinfo2.sh: New file. diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c index 131166fd71..f872c6d5e2 100644 --- a/lib/nl_langinfo.c +++ b/lib/nl_langinfo.c @@ -70,6 +70,8 @@ static char * ctype_codeset (void) { + /* This function is only used on platforms which don't have uselocale(). + Therefore we don't need to look at the per-thread locale first, here. */ static char result[2 + 10 + 1]; char buf[2 + 10 + 1]; char locale[SETLOCALE_NULL_MAX];