diff --git a/perl.h b/perl.h index d967c494938f..65e54cbb9bc8 100644 --- a/perl.h +++ b/perl.h @@ -6755,17 +6755,10 @@ the plain locale pragma without a parameter (S>) is in effect. LOCALE_TERM_POSIX_2008_; \ } STMT_END #endif -#if ! ( defined(USE_LOCALE) \ +#if ( defined(USE_LOCALE) \ && defined(USE_LOCALE_THREADS) \ && ( ! defined(USE_THREAD_SAFE_LOCALE))) -/* The whole expression just above was complemented, so here we have no need - * for thread synchronization, most likely it would be that this isn't a - * threaded build. */ -# define LOCALE_READ_LOCK NOOP -# define LOCALE_READ_UNLOCK NOOP -#else - /* Here, we will need critical sections in locale handling, because one or * more of the above conditions are true. This could be because the * platform doesn't have thread-safe locales, or that at least one of the @@ -6845,6 +6838,11 @@ the plain locale pragma without a parameter (S>) is in effect. # define SETLOCALE_UNLOCK NOOP #endif +/* Currently, the read lock is an exclusive lock */ +#define LOCALE_READ_LOCK SETLOCALE_LOCK +#define LOCALE_READ_UNLOCK SETLOCALE_UNLOCK + + #ifndef LC_NUMERIC_LOCK # define LC_NUMERIC_LOCK(cond) NOOP # define LC_NUMERIC_UNLOCK NOOP