summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-02-05 22:11:51 -0700
committerKarl Williamson <khw@cpan.org>2018-02-18 15:44:23 -0700
commite9bc6d6b34afc0063cc5181b59f77eeb81b1182d (patch)
tree1028b01c95db9ebdc6d78340ca1f00aad07fe922 /sv.c
parentddd5ebe0cadc81a0360ad8007674490fda89ee88 (diff)
downloadperl-e9bc6d6b34afc0063cc5181b59f77eeb81b1182d.tar.gz
Add thread-safe locale handling
This (large) commit allows locales to be used in threaded perls on platforms that support it. This includes recent Windows and Posix 2008 ones.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 2c3da0fb7f..1aa5966489 100644
--- a/sv.c
+++ b/sv.c
@@ -15549,6 +15549,13 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_subname = sv_dup_inc(proto_perl->Isubname, param);
+#if defined(USE_POSIX_2008_LOCALE) \
+ && defined(USE_THREAD_SAFE_LOCALE) \
+ && ! defined(HAS_QUERYLOCALE)
+ for (i = 0; i < (int) C_ARRAY_LENGTH(PL_curlocales); i++) {
+ PL_curlocales[i] = savepv("."); /* An illegal value */
+ }
+#endif
#ifdef USE_LOCALE_CTYPE
/* Should we warn if uses locale? */
PL_warn_locale = sv_dup_inc(proto_perl->Iwarn_locale, param);