diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-01-14 18:56:24 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-01-14 18:56:24 +0000 |
commit | 41d184bb62b3960530c93a98a876eb2896f98d7b (patch) | |
tree | 03d1404d9c3780958d655edbd9b6469b77f999a1 /winsup/cygwin/syscalls.cc | |
parent | 37671b5114b5b3614580a5cf1308d3c2e38bd8d3 (diff) | |
download | cygnal-41d184bb62b3960530c93a98a876eb2896f98d7b.tar.gz cygnal-41d184bb62b3960530c93a98a876eb2896f98d7b.tar.bz2 cygnal-41d184bb62b3960530c93a98a876eb2896f98d7b.zip |
* dcrt0.cc (dll_crt0_1): Reset locale to "C" at the last moment before
calling the application's main.
* syscalls.cc (internal_setlocale): Don't reset locale to "C here.
Change comment accordingly.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index bd3308a42..fb39a5d77 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -4362,10 +4362,11 @@ internal_setlocale () } } -/* Called from dll_crt0_1, before calling the application's main(). +/* Called from dll_crt0_1, before fetching the command line from Windows. Set the internal charset according to the environment locale settings. Check if a required codepage is available, and only switch internal - charset if so. Afterwards, reset application locale to "C" per POSIX. */ + charset if so. + Make sure to reset the application locale to "C" per POSIX. */ void initial_setlocale () { @@ -4373,7 +4374,6 @@ initial_setlocale () if (ret && check_codepage (ret) && strcmp (cygheap->locale.charset, __locale_charset ()) != 0) internal_setlocale (); - _setlocale_r (_REENT, LC_CTYPE, "C"); } /* Like newlib's setlocale, but additionally check if the charset needs |