summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/POSIX/POSIX.xs6
-rw-r--r--intrpvar.h2
-rw-r--r--locale.c9
-rw-r--r--makedef.pl10
-rw-r--r--perl.c2
-rw-r--r--perl.h4
-rw-r--r--sv.c2
7 files changed, 11 insertions, 24 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index f6a56e7af8..efb8ab5a34 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -2132,7 +2132,7 @@ localeconv()
#else
struct lconv *lcbuf;
# if defined(USE_ITHREADS) \
- && defined(HAS_POSIX_2008_LOCALE) \
+ && defined(USE_POSIX_2008_LOCALE) \
&& defined(HAS_LOCALECONV_L) /* Prefer this thread-safe version */
bool do_free = FALSE;
locale_t cur = NULL;
@@ -2160,7 +2160,7 @@ localeconv()
RETVAL = newHV();
sv_2mortal((SV*)RETVAL);
# if defined(USE_ITHREADS) \
- && defined(HAS_POSIX_2008_LOCALE) \
+ && defined(USE_POSIX_2008_LOCALE) \
&& defined(HAS_LOCALECONV_L)
cur = uselocale((locale_t) 0);
@@ -2241,7 +2241,7 @@ localeconv()
}
}
# if defined(USE_ITHREADS) \
- && defined(HAS_POSIX_2008_LOCALE) \
+ && defined(USE_POSIX_2008_LOCALE) \
&& defined(HAS_LOCALECONV_L)
if (do_free) {
freelocale(cur);
diff --git a/intrpvar.h b/intrpvar.h
index 20ef1fc3aa..14f95150f9 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -818,7 +818,7 @@ PERLVARI(I, numeric_standard, int, TRUE)
PERLVAR(I, numeric_name, char *) /* Name of current numeric locale */
PERLVAR(I, numeric_radix_sv, SV *) /* The radix separator if not '.' */
-# ifdef HAS_POSIX_2008_LOCALE
+# ifdef USE_POSIX_2008_LOCALE
PERLVARI(I, underlying_numeric_obj, locale_t, NULL)
diff --git a/locale.c b/locale.c
index 81c42e0d0d..833dfe06c4 100644
--- a/locale.c
+++ b/locale.c
@@ -1162,7 +1162,7 @@ S_new_numeric(pTHX_ const char *newnum)
PL_numeric_underlying_is_standard = PL_numeric_standard;
-# ifdef HAS_POSIX_2008_LOCALE
+# ifdef USE_POSIX_2008_LOCALE
PL_underlying_numeric_obj = newlocale(LC_NUMERIC_MASK,
PL_numeric_name,
@@ -2286,7 +2286,7 @@ S_my_nl_langinfo(const int item, bool toggle)
#if defined(HAS_NL_LANGINFO) /* nl_langinfo() is available. */
# if ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L) \
- || ! defined(HAS_POSIX_2008_LOCALE)
+ || ! defined(USE_POSIX_2008_LOCALE)
/* Here, use plain nl_langinfo(), switching to the underlying LC_NUMERIC
* for those items dependent on it. This must be copied to a buffer before
@@ -5327,13 +5327,11 @@ Perl_thread_locale_term()
{
/* Called from a thread as it gets ready to terminate */
-#ifdef USE_THREAD_SAFE_LOCALE
+#ifdef USE_POSIX_2008_LOCALE
/* C starts the new thread in the global C locale. If we are thread-safe,
* we want to not be in the global locale */
-# ifndef WIN32
-
{ /* Free up */
locale_t cur_obj = uselocale(LC_GLOBAL_LOCALE);
if (cur_obj != LC_GLOBAL_LOCALE && cur_obj != PL_C_locale_obj) {
@@ -5341,7 +5339,6 @@ Perl_thread_locale_term()
}
}
-# endif
#endif
}
diff --git a/makedef.pl b/makedef.pl
index f5d98d1be1..4df490da43 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -413,16 +413,6 @@ unless ($define{USE_POSIX_2008_LOCALE})
++$skip{$_} foreach qw(
PL_C_locale_obj
PL_curlocales
- );
-}
-
-unless ( $define{'HAS_NEWLOCALE'}
- && $define{'HAS_FREELOCALE'}
- && $define{'HAS_USELOCALE'}
- && ! $define{'NO_POSIX_2008_LOCALE'})
-{
- ++$skip{$_} foreach qw(
- PL_C_locale_obj
PL_underlying_numeric_obj
);
}
diff --git a/perl.c b/perl.c
index 328bccd40c..f2419f0268 100644
--- a/perl.c
+++ b/perl.c
@@ -1079,7 +1079,7 @@ perl_destruct(pTHXx)
PL_curlocales[i] = NULL;
}
#endif
-#ifdef HAS_POSIX_2008_LOCALE
+#ifdef USE_POSIX_2008_LOCALE
{
/* This also makes sure we aren't using a locale object that gets freed
* below */
diff --git a/perl.h b/perl.h
index 55f91185db..3ce40ff5e6 100644
--- a/perl.h
+++ b/perl.h
@@ -6924,14 +6924,14 @@ 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_POSIX_2008_LOCALE) \
+# if defined(HAS_LOCALECONV) && ( ! defined(USE_POSIX_2008_LOCALE) \
|| ! defined(HAS_LOCALECONV_L) \
|| defined(TS_W32_BROKEN_LOCALECONV))
# define LOCALECONV_LOCK LOCALE_LOCK_
# define LOCALECONV_UNLOCK LOCALE_UNLOCK_
# endif
# if defined(HAS_NL_LANGINFO) && ( ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L) \
- || ! defined(HAS_POSIX_2008_LOCALE))
+ || ! defined(USE_POSIX_2008_LOCALE))
# define NL_LANGINFO_LOCK LOCALE_LOCK_
# define NL_LANGINFO_UNLOCK LOCALE_UNLOCK_
# endif
diff --git a/sv.c b/sv.c
index 82d80995a1..6a3645e3e4 100644
--- a/sv.c
+++ b/sv.c
@@ -15857,7 +15857,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_numeric_name = SAVEPV(proto_perl->Inumeric_name);
PL_numeric_radix_sv = sv_dup_inc(proto_perl->Inumeric_radix_sv, param);
-# if defined(HAS_POSIX_2008_LOCALE)
+# if defined(USE_POSIX_2008_LOCALE)
PL_underlying_numeric_obj = NULL;
# endif
#endif /* !USE_LOCALE_NUMERIC */