summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-11-19 13:59:56 -0700
committerKarl Williamson <khw@cpan.org>2018-11-19 14:53:11 -0700
commite1895adcbd5ea43def0c89e1b0bff0628af49687 (patch)
tree770b1bb39c5dd092e96a8a4a2b61c0273929f2af /perl.h
parentbc55cddf915d70f806feda38506788f4c61a2574 (diff)
downloadperl-e1895adcbd5ea43def0c89e1b0bff0628af49687.tar.gz
Allow forcing use of POSIX 2008 locale fcns
These thread-safe functions are not normally used on unthreaded builds, retaining the use of the library functions that have long been used. But, it is now possible to tell Configure to use them on unthreaded builds.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl.h b/perl.h
index ffa0e038c4..e436e03899 100644
--- a/perl.h
+++ b/perl.h
@@ -775,11 +775,16 @@
# define HAS_POSIX_2008_LOCALE
# endif
-# if defined(USE_ITHREADS) \
+ /* If compiled with
+ * -DUSE_THREAD_SAFE_LOCALE, will do so even
+ * on unthreaded builds */
+# if (defined(USE_ITHREADS) || defined(USE_THREAD_SAFE_LOCALE)) \
&& ( defined(HAS_POSIX_2008_LOCALE) \
|| (defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400)) \
&& ! defined(NO_THREAD_SAFE_LOCALE)
-# define USE_THREAD_SAFE_LOCALE
+# ifndef USE_THREAD_SAFE_LOCALE
+# define USE_THREAD_SAFE_LOCALE
+# endif
# ifdef HAS_POSIX_2008_LOCALE
# define USE_POSIX_2008_LOCALE
# endif