diff --git a/embed.fnc b/embed.fnc index ebde32523a6c..53af3fd59080 100644 --- a/embed.fnc +++ b/embed.fnc @@ -3220,9 +3220,9 @@ ST |unsigned int|get_category_index|const int category|NULLOK const char * local S |const char*|switch_category_locale_to_template|const int switch_category|const int template_category|NULLOK const char * template_locale S |void |restore_switched_locale|const int category|NULLOK const char * const original_locale # ifdef HAS_NL_LANGINFO -ST |const char*|my_nl_langinfo|const nl_item item|bool toggle +ST |const char*|my_langinfo|const nl_item item|bool toggle # else -ST |const char*|my_nl_langinfo|const int item|bool toggle +ST |const char*|my_langinfo|const int item|bool toggle # endif iTR |const char *|save_to_buffer|NULLOK const char * string \ |NULLOK const char **buf \ diff --git a/embed.h b/embed.h index 6c63b3b8de52..83805f6a2f09 100644 --- a/embed.h +++ b/embed.h @@ -1505,7 +1505,7 @@ # if !(defined(HAS_NL_LANGINFO)) # if defined(PERL_IN_LOCALE_C) # if defined(USE_LOCALE) -#define my_nl_langinfo S_my_nl_langinfo +#define my_langinfo S_my_langinfo # endif # endif # endif @@ -1615,7 +1615,7 @@ # if defined(HAS_NL_LANGINFO) # if defined(PERL_IN_LOCALE_C) # if defined(USE_LOCALE) -#define my_nl_langinfo S_my_nl_langinfo +#define my_langinfo S_my_langinfo # endif # endif # endif diff --git a/locale.c b/locale.c index 076b92f3eda5..fa5e0d8943d1 100644 --- a/locale.c +++ b/locale.c @@ -1511,7 +1511,7 @@ S_set_numeric_radix(pTHX_ const bool use_locale) || defined(HAS_SOME_LANGINFO)) const char * radix = (use_locale) - ? my_nl_langinfo(RADIXCHAR, FALSE) + ? my_langinfo(RADIXCHAR, FALSE) /* FALSE => already in dest locale */ : C_decimal_point; @@ -1607,13 +1607,13 @@ S_new_numeric(pTHX_ const char *newnum) # ifndef TS_W32_BROKEN_LOCALECONV /* If its name isn't C nor POSIX, it could still be indistinguishable from - * them. But on broken Windows systems calling my_nl_langinfo() for + * them. But on broken Windows systems calling my_langinfo() for * THOUSEP can currently (but rarely) cause a race, so avoid doing that, * and just always change the locale if not C nor POSIX on those systems */ if (! PL_numeric_standard) { - PL_numeric_standard = cBOOL(strEQ(C_decimal_point, my_nl_langinfo(RADIXCHAR, + PL_numeric_standard = cBOOL(strEQ(C_decimal_point, my_langinfo(RADIXCHAR, FALSE /* Don't toggle locale */ )) - && strEQ(C_thousands_sep, my_nl_langinfo(THOUSEP, FALSE))); + && strEQ(C_thousands_sep, my_langinfo(THOUSEP, FALSE))); } # endif @@ -1993,7 +1993,7 @@ S_new_ctype(pTHX_ const char *newctype) Perl_sv_catpvf(aTHX_ PL_warn_locale, "; codeset=%s", /* parameter FALSE is a don't care here */ - my_nl_langinfo(CODESET, FALSE)); + my_langinfo(CODESET, FALSE)); # endif @@ -2944,7 +2944,7 @@ Perl_langinfo(const int item) #else - return my_nl_langinfo(item, TRUE); + return my_langinfo(item, TRUE); #endif @@ -2954,9 +2954,9 @@ Perl_langinfo(const int item) STATIC const char * # ifdef HAS_SOME_LANGINFO -S_my_nl_langinfo(const nl_item item, bool toggle) +S_my_langinfo(const nl_item item, bool toggle) # else -S_my_nl_langinfo(const int item, bool toggle) +S_my_langinfo(const int item, bool toggle) # endif { @@ -5033,7 +5033,7 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category) defective locale definition. XXX We should probably check for these in the Latin1 range and warn (but on glibc, requires iswalnum() etc. due to their not handling 80-FF correctly */ - const char *codeset = my_nl_langinfo(CODESET, FALSE); + const char *codeset = my_langinfo(CODESET, FALSE); /* FALSE => already in dest locale */ DEBUG_Lv(PerlIO_printf(Perl_debug_log, @@ -5103,7 +5103,7 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category) save_input_locale); bool only_ascii = FALSE; const U8 * currency_string - = (const U8 *) my_nl_langinfo(CRNCYSTR, FALSE); + = (const U8 *) my_langinfo(CRNCYSTR, FALSE); /* 2nd param not relevant for this item */ const U8 * first_variant; diff --git a/proto.h b/proto.h index 5fd2dc6766d0..65f24142391f 100644 --- a/proto.h +++ b/proto.h @@ -4220,8 +4220,8 @@ PERL_CALLCONV const char* Perl_langinfo(const int item); #if !(defined(HAS_NL_LANGINFO)) # if defined(PERL_IN_LOCALE_C) # if defined(USE_LOCALE) -STATIC const char* S_my_nl_langinfo(const int item, bool toggle); -#define PERL_ARGS_ASSERT_MY_NL_LANGINFO +STATIC const char* S_my_langinfo(const int item, bool toggle); +#define PERL_ARGS_ASSERT_MY_LANGINFO # endif # endif #endif @@ -4699,8 +4699,8 @@ PERL_CALLCONV I32 Perl_do_shmio(pTHX_ I32 optype, SV** mark, SV** sp); #if defined(HAS_NL_LANGINFO) # if defined(PERL_IN_LOCALE_C) # if defined(USE_LOCALE) -STATIC const char* S_my_nl_langinfo(const nl_item item, bool toggle); -#define PERL_ARGS_ASSERT_MY_NL_LANGINFO +STATIC const char* S_my_langinfo(const nl_item item, bool toggle); +#define PERL_ARGS_ASSERT_MY_LANGINFO # endif # endif #endif