diff options
author | Christopher Faylor <me@cgf.cx> | 2010-10-02 23:08:21 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-10-02 23:08:21 +0400 |
commit | f0b04035b14216f492c906a69f16be6783a8e066 (patch) | |
tree | 6fe835fccb8d89abd47ebe2a9818e2c39b1dfca9 | |
parent | 1da77c2678b3f69f2bc212e79df6432a9fffb61c (diff) |
* dcrt0.cc (dll_crt0_0): Move _main_tls initialization here.
(__dll_crt0): Only initialize _main_tls if it changes.
* fhandler_console.cc (fhandler_console::write): Fix debugging output.
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 8 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 2 |
3 files changed, 13 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a0b5bbe38..9c0e08dcc 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2010-10-02 Christopher Faylor <me+cygwin@cgf.cx> + + * dcrt0.cc (dll_crt0_0): Move _main_tls initialization here. + (__dll_crt0): Only initialize _main_tls if it changes. + * fhandler_console.cc (fhandler_console::write): Fix debugging output. + 2010-09-02 Corinna Vinschen <corinna@vinschen.de> * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Simplify. diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 12ab22464..13dc33d17 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -771,6 +771,8 @@ dll_crt0_0 () disable_dep (); #endif + _main_tls = &_my_tls; + /* Initialize signal processing here, early, in the hopes that the creation of a thread early in the process will cause more predictability in memory layout for the main thread. */ @@ -970,9 +972,11 @@ _dll_crt0 () { main_environ = user_data->envptr; if (in_forkee) - fork_info->alloc_stack (); + { + fork_info->alloc_stack (); + _main_tls = &_my_tls; + } - _main_tls = &_my_tls; _main_tls->call ((DWORD (*) (void *, void *)) dll_crt0_1, NULL); } diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index d0c4d6ac4..05a0310a5 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1987,7 +1987,7 @@ fhandler_console::write (const void *vsrc, size_t len) } } - syscall_printf ("%d = fhandler_console::write (\".20s\")", len, vsrc); + syscall_printf ("%d = fhandler_console::write (...)", len); return len; } |