This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
No need to use locale_r with thread-safe locales
authorKarl Williamson <khw@cpan.org>
Tue, 10 Mar 2020 21:28:38 +0000 (15:28 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 30 Jul 2020 22:37:34 +0000 (16:37 -0600)
These use a completely different mechanism.

reentr.h
regen/reentr.pl

index cf41900..78b8518 100644 (file)
--- a/reentr.h
+++ b/reentr.h
 
 #ifdef USE_REENTRANT_API
 
+/* For thread-safe builds, alternative methods are used to make calls to this
+ * safe. */
+#ifdef USE_THREAD_SAFE_LOCALE
+#   undef HAS_SETLOCALE_R
+#endif
 /* Deprecations: some platforms have the said reentrant interfaces
  * but they are declared obsolete and are not to be used.  Often this
  * means that the platform has threadsafed the interfaces (hopefully).
index f2c1d7c..f5788c7 100644 (file)
@@ -91,6 +91,12 @@ print $h <<EOF;
 
 #ifdef USE_REENTRANT_API
 
+/* For thread-safe builds, alternative methods are used to make calls to this
+ * safe. */
+#ifdef USE_THREAD_SAFE_LOCALE
+#   undef HAS_SETLOCALE_R
+#endif
 /* Deprecations: some platforms have the said reentrant interfaces
  * but they are declared obsolete and are not to be used.  Often this
  * means that the platform has threadsafed the interfaces (hopefully).