diff options
author | Karl Williamson <public@khwilliamson.com> | 2014-02-15 12:58:07 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2014-02-15 15:50:35 -0700 |
commit | b385bb4ddcb252e69a1044d702646741e2e489fb (patch) | |
tree | b8e382f127fa164b5d29c6833e2fcf534e28377d /embed.fnc | |
parent | 97dffe50643dd18f87b33b7ec6f8b55bbfd1fd74 (diff) | |
download | perl-b385bb4ddcb252e69a1044d702646741e2e489fb.tar.gz |
Emulate POSIX locale setting on Windows
Locale initialization and setting on Windows haven't been as
described in perllocale for setting locales to "". This is because that
tells Windows to use the system default locale, as set through the
Control Panel, but on POSIX systems, it means to look at various
environment variables.
This commit creates a wrapper for setlocale, used only on Windows, that
looks for the appropriate environment variables when called with a ""
input locale. If none are found, it continues to use the system default
locale.
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1069,6 +1069,11 @@ ApdO |AV* |get_av |NN const char *name|I32 flags ApdO |HV* |get_hv |NN const char *name|I32 flags ApdO |CV* |get_cv |NN const char* name|I32 flags Apd |CV* |get_cvn_flags |NN const char* name|STRLEN len|I32 flags +#ifdef WIN32 +ApPM |char* |my_setlocale |int category|NULLOK const char* locale +#else +AmPM |char* |my_setlocale |int category|NULLOK const char* locale +#endif ApOM |int |init_i18nl10n |int printwarn ApOM |int |init_i18nl14n |int printwarn ApOM |void |new_collate |NULLOK const char* newcoll |