summaryrefslogtreecommitdiff
path: root/makedef.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-02-10 07:09:06 -0700
committerKarl Williamson <khw@cpan.org>2022-06-16 06:18:39 -0600
commit8751a11f7fafc4d656fe8f44ebc8b5233e437153 (patch)
treebcb103174a02cb8e30e5a361a769ab21b6a8ced0 /makedef.pl
parent4fd76d49315684898364ca6c6de3d730748e85d4 (diff)
downloadperl-8751a11f7fafc4d656fe8f44ebc8b5233e437153.tar.gz
Add USE_LOCALE_THREADS #define
This is in preparation for supporting configurations where there threads are available, but the locale handling code should ignore that fact. This stems from the unusual locale handling of z/OS, where any attempt is ignored to change locales after the first thread is created.
Diffstat (limited to 'makedef.pl')
-rw-r--r--makedef.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/makedef.pl b/makedef.pl
index b1663b31e3..f5d98d1be1 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -140,11 +140,14 @@ if (! $define{NO_LOCALE}) {
# https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering
my $cctype = $ARGS{CCTYPE} =~ s/MSVC//r;
+if ($define{USE_ITHREADS} && ! $define{NO_LOCALE_THREADS}) {
+ $define{USE_LOCALE_THREADS} = 1;
+}
if (! $define{HAS_SETLOCALE} && $define{HAS_POSIX_2008_LOCALE}) {
$define{USE_POSIX_2008_LOCALE} = 1;
$define{USE_THREAD_SAFE_LOCALE} = 1;
}
-elsif ( ($define{USE_ITHREADS} || $define{USE_THREAD_SAFE_LOCALE})
+elsif ( ($define{USE_LOCALE_THREADS} || $define{USE_THREAD_SAFE_LOCALE})
&& ( $define{HAS_POSIX_2008_LOCALE}
|| ($ARGS{PLATFORM} eq 'win32' && ( $cctype !~ /\D/
&& $cctype >= 80)))
@@ -405,8 +408,7 @@ unless ($define{'USE_ITHREADS'}) {
);
}
-if ( $define{NO_LOCALE}
- || (! $define{USE_ITHREADS} && ! $define{USE_THREAD_SAFE_LOCALE}))
+unless ($define{USE_POSIX_2008_LOCALE})
{
++$skip{$_} foreach qw(
PL_C_locale_obj