This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Don't use numeric unless LC_NUMERIC
authorKarl Williamson <khw@cpan.org>
Thu, 29 Nov 2018 18:53:58 +0000 (11:53 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 29 Nov 2018 19:02:37 +0000 (12:02 -0700)
This commit #ifdef's a usage of a variable that isn't valid unless the
system has LC_NUMERIC

locale.c

index 0c94042..ea8b6f9 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -3322,8 +3322,12 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
 
 #  endif
 
+#  ifdef USE_LOCALE_NUMERIC
+
     PL_numeric_radix_sv = newSVpvs(".");
 
+#  endif
+
 #  if defined(USE_POSIX_2008_LOCALE) && ! defined(HAS_QUERYLOCALE)
 
     /* Initialize our records.  If we have POSIX 2008, we have LC_ALL */