From c30c97ca727b8321c4b3d3b8b0732ae648a072ac Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 27 Feb 2021 05:59:56 -0700 Subject: [PATCH] locale.c: Add a convenience #define This makes it clear if we are using an array that currently only happens on non-querylocale systems, but that will change in future commits. --- locale.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/locale.c b/locale.c index d37823bc1eb6..519dd04c4f21 100644 --- a/locale.c +++ b/locale.c @@ -418,6 +418,9 @@ S_category_name(const int category) # define querylocale_c(cat) querylocale_i(cat##_INDEX_) # define querylocale_r(cat) querylocale_i(get_category_index(cat,NULL)) +# ifndef HAS_QUERYLOCALE +# define USE_PL_CURLOCALES +# endif # if ! defined(__GLIBC__) || ! defined(USE_LOCALE_MESSAGES) # define FIX_GLIBC_LC_MESSAGES_BUG(i) @@ -3329,7 +3332,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn) PL_numeric_radix_sv = newSVpvs("."); # endif -# if defined(USE_POSIX_2008_LOCALE) && ! defined(HAS_QUERYLOCALE) +# ifdef USE_PL_CURLOCALES /* Initialize our records. If we have POSIX 2008, we have LC_ALL */ do_setlocale_c(LC_ALL, porcelain_setlocale(LC_ALL, NULL));