From 95fb10e3ebf3fdbf96dcdfc0451fb783423445aa Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 10 Mar 2020 15:28:38 -0600 Subject: [PATCH] No need to use locale_r with thread-safe locales These use a completely different mechanism. --- reentr.h | 6 ++++++ regen/reentr.pl | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/reentr.h b/reentr.h index cf41900..78b8518 100644 --- a/reentr.h +++ b/reentr.h @@ -41,6 +41,12 @@ #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). diff --git a/regen/reentr.pl b/regen/reentr.pl index f2c1d7c..f5788c7 100644 --- a/regen/reentr.pl +++ b/regen/reentr.pl @@ -91,6 +91,12 @@ print $h <