aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-01-01 19:15:11 +0000
committerChristopher Faylor <me@cgf.cx>2010-01-01 19:15:11 +0000
commit1afba8e5f2d18a46be048b82c068df9cc05c82e0 (patch)
tree2aad51820efadb84fecbfd2f2743218b304f408e
parent6684d8814f1e11fd0282095b6699cea6506f95f8 (diff)
downloadnewlib-1afba8e5f2d18a46be048b82c068df9cc05c82e0.zip
newlib-1afba8e5f2d18a46be048b82c068df9cc05c82e0.tar.gz
newlib-1afba8e5f2d18a46be048b82c068df9cc05c82e0.tar.bz2
* dcrt0.cc (dll_crt0_1): Move internal locale setting prior to potential
globify to prevent creation of unglobbed filenames in the wrong character set.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/dcrt0.cc5
2 files changed, 9 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a124124..5a90ae6 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-01 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * dcrt0.cc (dll_crt0_1): Move internal locale setting prior to
+ potential globify to prevent creation of unglobbed filenames in the
+ wrong character set.
+
2009-12-28 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_socket::wait_for_events): Drop parameter default
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index dfdc7d0..31ecd7f 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -853,6 +853,9 @@ dll_crt0_1 (void *)
/* Connect to tty. */
tty::init_session ();
+ /* Set internal locale to the environment settings. */
+ initial_setlocale ();
+
if (!__argc)
{
PWCHAR wline = GetCommandLineW ();
@@ -937,8 +940,6 @@ dll_crt0_1 (void *)
do this for noncygwin case since the signal thread is blocked due to
LoadLibrary serialization. */
ld_preload ();
- /* Set internal locale to the environment settings. */
- initial_setlocale ();
if (user_data->main)
cygwin_exit (user_data->main (__argc, __argv, *user_data->envptr));
__asm__ (" \n\