Skip to content

Commit

Permalink
perl.h: Also recognize -DNO_THREAD_SAFE_LOCALE
Browse files Browse the repository at this point in the history
It would be a reasonable Configure option to say
-Accflags=-DNO_THREAD_SAFE_LOCALE
  • Loading branch information
khwilliamson committed May 6, 2023
1 parent 80556e4 commit b2e1c9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions makedef.pl
Expand Up @@ -161,14 +161,14 @@ BEGIN
}

if ( $define{HAS_POSIX_2008_LOCALE}
&& ( ! $define{HAS_SETLOCALE} || ( $define{USE_LOCALE_THREADS}
&& ! $define{NO_POSIX_2008_LOCALE})))
&& (! $define{HAS_SETLOCALE} || ( $define{USE_LOCALE_THREADS}
&& ! $define{NO_POSIX_2008_LOCALE})
&& ! $define{NO_THREAD_SAFE_LOCALE}))
{
$define{USE_POSIX_2008_LOCALE} = 1;
}

if ($define{USE_LOCALE_THREADS} && ! $define{NO_THREAD_SAFE_LOCALE})
{
if ($define{USE_LOCALE_THREADS} && ! $define{NO_THREAD_SAFE_LOCALE}) {
if ( $define{USE_POSIX_2008_LOCALE}
|| ($define{WIN32} && ( ($cctype !~ /\D/ && $cctype >= 80))
|| $define{UCRT_USED}))
Expand Down
8 changes: 5 additions & 3 deletions perl.h
Expand Up @@ -1263,9 +1263,11 @@ typedef enum {
/* Use POSIX 2008 locales if available, and no alternative exists
* ('setlocale()' is the alternative); or is threaded and not forbidden to
* use them */
# if defined(HAS_POSIX_2008_LOCALE) && ( ! defined(HAS_SETLOCALE) \
|| ( defined(USE_LOCALE_THREADS) \
&& ! defined(NO_POSIX_2008_LOCALE)))
# if ( defined(HAS_POSIX_2008_LOCALE) \
&& ( ! defined(HAS_SETLOCALE) \
|| ( defined(USE_LOCALE_THREADS) \
&& ! defined(NO_POSIX_2008_LOCALE))) \
&& ! defined(NO_THREAD_SAFE_LOCALE))
# define USE_POSIX_2008_LOCALE
# endif

Expand Down

0 comments on commit b2e1c9e

Please sign in to comment.