summaryrefslogtreecommitdiff
path: root/perlvars.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-07-25 12:46:00 -0600
committerKarl Williamson <khw@cpan.org>2017-08-12 22:53:11 -0600
commit5acc3fa5267fc7ad812f1bcfa7638acb4fd45c13 (patch)
tree83a0d820cf768e5c31939b47a825af45d8da632c /perlvars.h
parentf1d2176bc7ecf5a51b9faeb6e2a2b2e6c900283e (diff)
downloadperl-5acc3fa5267fc7ad812f1bcfa7638acb4fd45c13.tar.gz
Initialize locale object even in unthreaded perls
This commit will now initialize the thread-safe C locale object if the POSIX 2008 functions are available, regardless of whether the perl is threaded or not. This will allow for a future commit that uses them, and which is a win on unthreaded builds.
Diffstat (limited to 'perlvars.h')
-rw-r--r--perlvars.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/perlvars.h b/perlvars.h
index bdc8467902..b184b89419 100644
--- a/perlvars.h
+++ b/perlvars.h
@@ -101,10 +101,11 @@ PERLVARI(G, mmap_page_size, IV, 0)
PERLVAR(G, hints_mutex, perl_mutex) /* Mutex for refcounted he refcounting */
PERLVAR(G, locale_mutex, perl_mutex) /* Mutex for setlocale() changing */
-# ifdef HAS_NEWLOCALE
-PERLVAR(G, C_locale_obj, locale_t)
-# endif
+#endif
+/* Proxy for HAS_POSIX_2008_LOCALE, since that is not defined in time for this */
+#if defined(HAS_NEWLOCALE) && ! defined(NO_POSIX_2008_LOCALE)
+PERLVAR(G, C_locale_obj, locale_t)
#endif
#ifdef DEBUGGING