diff --git a/locale.c b/locale.c index 27df22a885be..7d207cf5a1cf 100644 --- a/locale.c +++ b/locale.c @@ -3857,9 +3857,9 @@ S_my_langinfo_i(pTHX_ orig_switched_locale = toggle_locale_i(cat_index, locale); } - NL_LANGINFO_LOCK; + gwLOCALE_LOCK; retval = save_to_buffer(nl_langinfo(item), retbufp, retbuf_sizep); - NL_LANGINFO_UNLOCK; + gwLOCALE_UNLOCK; restore_toggled_locale_i(cat_index, orig_switched_locale); diff --git a/perl.h b/perl.h index 38aad320e29a..531aeb286714 100644 --- a/perl.h +++ b/perl.h @@ -6759,9 +6759,7 @@ the plain locale pragma without a parameter (S>) is in effect. && ( ! defined(USE_THREAD_SAFE_LOCALE) \ || ( defined(HAS_LOCALECONV) \ && ( ! defined(HAS_LOCALECONV_L) \ - || defined(TS_W32_BROKEN_LOCALECONV))) \ - || ( defined(HAS_NL_LANGINFO) \ - && ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L)))) + || defined(TS_W32_BROKEN_LOCALECONV))))) /* The whole expression just above was complemented, so here we have no need * for thread synchronization, most likely it would be that this isn't a @@ -6770,8 +6768,6 @@ the plain locale pragma without a parameter (S>) is in effect. # define LOCALECONV_UNLOCK NOOP # define LOCALE_READ_LOCK NOOP # define LOCALE_READ_UNLOCK NOOP -# define NL_LANGINFO_LOCK NOOP -# define NL_LANGINFO_UNLOCK NOOP # define SETLOCALE_LOCK NOOP # define SETLOCALE_UNLOCK NOOP #else @@ -6815,11 +6811,6 @@ the plain locale pragma without a parameter (S>) is in effect. # define LOCALECONV_LOCK LOCALE_LOCK_(0) # define LOCALECONV_UNLOCK LOCALE_UNLOCK_ # endif -# if defined(HAS_NL_LANGINFO) && ( ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L) \ - || ! defined(USE_POSIX_2008_LOCALE)) -# define NL_LANGINFO_LOCK LOCALE_LOCK_(0) -# define NL_LANGINFO_UNLOCK LOCALE_UNLOCK_ -# endif # if defined(USE_THREAD_SAFE_LOCALE) /* There may be instance core where we this is invoked yet should do