diff options
author | Christopher Faylor <me@cgf.cx> | 2006-01-02 15:48:29 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-01-02 15:48:29 +0000 |
commit | 29b35f7a84967a39222dfd90a14fcbc8ef9371fa (patch) | |
tree | 1c94632ca2ece95f6b5486508fae747c0f88267b | |
parent | 8584a9df5f3767dcc060188718c6dae92e14807b (diff) | |
download | newlib-29b35f7a84967a39222dfd90a14fcbc8ef9371fa.zip newlib-29b35f7a84967a39222dfd90a14fcbc8ef9371fa.tar.gz newlib-29b35f7a84967a39222dfd90a14fcbc8ef9371fa.tar.bz2 |
* dcrt0.cc (_dll_crt0): Move more leftover debugging stuff.
(cygwin_dll_init): Remove unneeded initializations. Call _dll_crt0 rather than
dll_crt0_1.
* dcrt0.cc (_dll_crt0): Move more leftover debugging stuff.
(cygwin_dll_init): Remove unneeded initializations. Call _dll_crt0 rather than
dll_crt0_1.
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 18 |
2 files changed, 7 insertions, 17 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 789620a..e7c1806 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2006-01-02 Christopher Faylor <cgf@timesys.com> + + * dcrt0.cc (_dll_crt0): Move more leftover debugging stuff. + (cygwin_dll_init): Remove unneeded initializations. Call _dll_crt0 + rather than dll_crt0_1. + 2006-01-02 Corinna Vinschen <corinna@vinschen.de> * syslog.cc: Include sys/un.h instead of sys/socket.h. diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index f5354a5..bfb671a 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -964,13 +964,9 @@ _dll_crt0 () system_printf ("internal error: couldn't determine location of thread function on stack. Expect signal problems."); main_environ = user_data->envptr; -#if 0 - *main_environ = NULL; -#endif char padding[CYGTLS_PADSIZE]; -debug_printf ("in_forkee %d, fork_info %p", in_forkee, fork_info); if (in_forkee) alloc_stack (fork_info); else @@ -1006,24 +1002,12 @@ cygwin_dll_init () static char **envp; static int _fmode; - if (!DuplicateHandle (GetCurrentProcess (), GetCurrentProcess (), - GetCurrentProcess (), &hMainProc, 0, FALSE, - DUPLICATE_SAME_ACCESS)) - hMainProc = GetCurrentProcess (); - - DuplicateHandle (hMainProc, GetCurrentThread (), hMainProc, - &hMainThread, 0, FALSE, DUPLICATE_SAME_ACCESS); user_data->magic_biscuit = sizeof (per_process); user_data->envptr = &envp; user_data->fmode_ptr = &_fmode; - main_environ = user_data->envptr; -#if 0 - *main_environ = NULL; -#endif - initialize_main_tls((char *)&_my_tls); - dll_crt0_1 (NULL); + _dll_crt0 (); } extern "C" void |