diff options
author | Karl Williamson <khw@cpan.org> | 2022-10-01 11:20:04 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-10-18 06:22:16 -0600 |
commit | d52dd969e613d078943e8c99baec94ae5c4aef53 (patch) | |
tree | fea320c4b01f8295e508759314c554eb82a9abb3 /perl.h | |
parent | 7d6b94bd41d6d1ff762b10b7f7f43889321d3a3f (diff) | |
download | perl-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.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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. */ |