Skip to content

Commit 17c35ab

Browse files
committed
Only define NO_THREAD_SAFE_LOCALE for MSVC plperl when required
Latest versions of Strawberry Perl define USE_THREAD_SAFE_LOCALE, and we therefore get a handshake error when building against such instances. The solution is to perform a test to see if USE_THREAD_SAFE_LOCALE is defined and only define NO_THREAD_SAFE_LOCALE if it isn't. Backpatch the meson.build fix back to release 16 and apply the same logic to Mkvcbuild.pm in releases 12 through 16. Original report of the issue from Muralikrishna Bandaru.
1 parent e085789 commit 17c35ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/msvc/Mkvcbuild.pm

+3-1
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,9 @@ sub mkvcbuild
582582
push(@perl_embed_ccflags, 'PLPERL_HAVE_UID_GID');
583583
# prevent binary mismatch between MSVC built plperl and
584584
# Strawberry or msys ucrt perl libraries
585-
push(@perl_embed_ccflags, 'NO_THREAD_SAFE_LOCALE');
585+
my $perl_v = `$^X -V 2>&1`;
586+
push(@perl_embed_ccflags, 'NO_THREAD_SAFE_LOCALE')
587+
unless $perl_v =~ /USE_THREAD_SAFE_LOCALE/;
586588

587589
# Windows offers several 32-bit ABIs. Perl is sensitive to
588590
# sizeof(time_t), one of the ABI dimensions. To get 32-bit time_t,

0 commit comments

Comments
 (0)