From d52dd969e613d078943e8c99baec94ae5c4aef53 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 1 Oct 2022 11:20:04 -0600 Subject: 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. --- perl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl.h') 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>) 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. */ -- cgit v1.2.1