summaryrefslogtreecommitdiff
path: root/lib/hard-locale.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-12-18 16:30:09 +0100
committerBruno Haible <bruno@clisp.org>2019-12-18 16:33:48 +0100
commit3a310962887322e0b94708984886de643f94f8a5 (patch)
treed17f7545cbae02461db7cc47a219396a6faf7a33 /lib/hard-locale.c
parentf7efd84ea3e6ff2be5932b5213ac60c5c022f5b9 (diff)
downloadgnulib-3a310962887322e0b94708984886de643f94f8a5.tar.gz
setlocale-null: Make API more useful.
* lib/locale.in.h (setlocale_null_r): Renamed from setlocale_null. All callers changed. (setlocale_null): New declaration. * lib/setlocale_null.c (setlocale_null_androidfix): New function, extracted from setlocale_null_unlocked. (setlocale_null_unlocked): Invoke it. (setlocale_null_r): Renamed from setlocale_null. (setlocale_null): New function, extracted from setlocale_mtsafe in setlocale.c. * lib/setlocale.c: Don't include <errno.h>. (setlocale_mtsafe): Invoke setlocale_null. * lib/setlocale-lock.c: Update comments. * doc/posix-functions/setlocale.texi: Mention both functions.
Diffstat (limited to 'lib/hard-locale.c')
-rw-r--r--lib/hard-locale.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hard-locale.c b/lib/hard-locale.c
index 4a2adabb7e..5eaa7b69a2 100644
--- a/lib/hard-locale.c
+++ b/lib/hard-locale.c
@@ -28,7 +28,7 @@ hard_locale (int category)
{
char locale[SETLOCALE_NULL_MAX];
- if (setlocale_null (category, locale, sizeof (locale)))
+ if (setlocale_null_r (category, locale, sizeof (locale)))
return false;
return !(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0);