diff options
author | Karl Williamson <public@khwilliamson.com> | 2014-02-15 14:31:11 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2014-02-15 15:50:35 -0700 |
commit | c835d6be1e0eea17f47fce50f2a00877041e96b3 (patch) | |
tree | 4a102e505cafa93396f062dcf5f751c75876da8a /locale.c | |
parent | a782673dfe49a0ee690389b79c29633fb303cf33 (diff) | |
download | perl-c835d6be1e0eea17f47fce50f2a00877041e96b3.tar.gz |
Make sure LC_MONETARY is initialized
This is only an issue for those few platforms without LC_ALL, as that
is initialized, and includes LC_MONETARY. This commit extends the
proper initialization to those other platforms. Perl doesn't use
LC_MONETARY itself, but it should be properly initialized for modules
that do.
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -524,6 +524,14 @@ Perl_init_i18nl10n(pTHX_ int printwarn) setlocale_failure = TRUE; } # endif /* USE_LOCALE_MESSAGES */ +# ifdef USE_LOCALE_MONETARY + if (! my_setlocale(LC_MONETARY, + (!done && (lang || PerlEnv_getenv("LC_MONETARY"))) + ? setlocale_init : NULL)) + { + setlocale_failure = TRUE; + } +# endif /* USE_LOCALE_MONETARY */ } # endif /* LC_ALL */ @@ -600,6 +608,11 @@ Perl_init_i18nl10n(pTHX_ int printwarn) if (! (my_setlocale(LC_MESSAGES, trial_locale))) setlocale_failure = TRUE; #endif /* USE_LOCALE_MESSAGES */ +#ifdef USE_LOCALE_MONETARY + if (! (my_setlocale(LC_MONETARY, trial_locale))) + setlocale_failure = TRUE; +#endif /* USE_LOCALE_MONETARY */ + if (! setlocale_failure) { /* Success */ break; } |