This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix freebsd/netbsd builds
authorKarl Williamson <khw@cpan.org>
Wed, 9 Dec 2020 00:09:04 +0000 (17:09 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 9 Dec 2020 00:18:40 +0000 (17:18 -0700)
These have an inconsistent configuration in which several functions exist
for thread-safe locales, but the crucial one doesn't show up in our
Configure probe.  The code this commit fixes assumed that all or nothing
would be present.

perl.h

diff --git a/perl.h b/perl.h
index 1241983..a839ef9 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -6564,8 +6564,9 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect.
     * separate mutexes for some of them, the only changes needed are here.
     * Define just the necessary macros.  The compiler should then croak if the
     * #ifdef's in the code are incorrect */
-#  if defined(HAS_LOCALECONV) && ( ! defined(HAS_LOCALECONV_L)              \
-                                  || defined(TS_W32_BROKEN_LOCALECONV))
+#  if defined(HAS_LOCALECONV) && (  ! defined(HAS_POSIX_2008_LOCALE)        \
+                                 || ! defined(HAS_LOCALECONV_L)             \
+                                 ||   defined(TS_W32_BROKEN_LOCALECONV))
 #    define LOCALECONV_LOCK   LOCALE_LOCK_
 #    define LOCALECONV_UNLOCK LOCALE_UNLOCK_
 #  endif