calling the application's main.
* syscalls.cc (internal_setlocale): Don't reset locale to "C here.
Change comment accordingly.
2010-01-14 Corinna Vinschen <corinna@vinschen.de>
+ * 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.
+
+2010-01-14 Corinna Vinschen <corinna@vinschen.de>
+
* cygwin.din (dup3): Export.
(pipe2): Export.
* dtable.cc (dtable::dup_worker): Take additional flags parameter.
do this for noncygwin case since the signal thread is blocked due to
LoadLibrary serialization. */
ld_preload ();
+ /* Per POSIX set the default application locale back to "C". */
+ _setlocale_r (_REENT, LC_CTYPE, "C");
if (user_data->main)
cygwin_exit (user_data->main (__argc, __argv, *user_data->envptr));
__asm__ (" \n\
}
}
-/* 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 ()
{
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