Skip to content

Commit

Permalink
locale.c: Only define string constant on platforms that need it
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed May 31, 2023
1 parent 623996b commit db0b9a1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions locale.c
Expand Up @@ -394,7 +394,12 @@ S_mortalized_pv_copy(pTHX_ const char * const pv)
#define C_codeset "ANSI_X3.4-1968" /* Only in some Configurations, and usually
a single instance, so is a #define */
static const char C_decimal_point[] = ".";

#if (defined(USE_LOCALE_NUMERIC) && ! defined(TS_W32_BROKEN_LOCALECONV)) \
|| ! ( defined(USE_LOCALE_NUMERIC) \
&& (defined(HAS_SOME_LANGINFO) || defined(HAS_LOCALECONV)))
static const char C_thousands_sep[] = "";
#endif

/* Is the C string input 'name' "C" or "POSIX"? If so, and 'name' is the
* return of setlocale(), then this is extremely likely to be the C or POSIX
Expand Down Expand Up @@ -2928,8 +2933,6 @@ S_new_numeric(pTHX_ const char *newnum, bool force)
}
Safefree(scratch_buffer);

# else
PERL_UNUSED_VAR(C_thousands_sep);
# endif

PL_numeric_standard = PL_numeric_underlying_is_standard;
Expand Down

0 comments on commit db0b9a1

Please sign in to comment.