summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-10-01 11:20:04 -0600
committerKarl Williamson <khw@cpan.org>2022-10-18 06:22:16 -0600
commitd52dd969e613d078943e8c99baec94ae5c4aef53 (patch)
treefea320c4b01f8295e508759314c554eb82a9abb3 /perl.h
parent7d6b94bd41d6d1ff762b10b7f7f43889321d3a3f (diff)
downloadperl-d52dd969e613d078943e8c99baec94ae5c4aef53.tar.gz
Don't #define USE_THREAD_SAFE LOCALE unless threaded
If there aren't threads, yes locales are trivially thread-safe, but the code that gets executed to make them so doesn't need to get compiled, and that is controlled by this #define.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl.h b/perl.h
index 4d3861d310..31120f7c94 100644
--- a/perl.h
+++ b/perl.h
@@ -1223,7 +1223,7 @@ violations are fatal.
# endif
# if ! defined(HAS_SETLOCALE) && defined(HAS_POSIX_2008_LOCALE)
# define USE_POSIX_2008_LOCALE
-# ifndef USE_THREAD_SAFE_LOCALE
+# ifdef USE_LOCALE_THREADS
# define USE_THREAD_SAFE_LOCALE
# endif
/* If compiled with
@@ -7030,7 +7030,7 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect.
} \
} STMT_END
-# ifndef USE_THREAD_SAFE_LOCALE
+# if defined(USE_THREADS) && ! defined(USE_THREAD_SAFE_LOCALE)
/* By definition, a thread-unsafe locale means we need a critical
* section. */