diff options
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 95b0a5720..40339366c 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -646,9 +646,6 @@ dll_crt0_1 () user_data->threadinterface->Init0(); #endif - /* Set the os_being_run global. */ - set_os_type (); - /* Initialize the host dependent constants object. */ host_dependent.init (); @@ -811,6 +808,9 @@ _dll_crt0 () init_exceptions (&cygwin_except_entry); do_global_ctors (&__CTOR_LIST__, 1); + /* Set the os_being_run global. */ + set_os_type (); + #ifdef DEBUGGING char buf[80]; if (GetEnvironmentVariable ("CYGWIN_SLEEP", buf, sizeof (buf))) @@ -922,6 +922,9 @@ cygwin_dll_init () init_exceptions (&cygwin_except_entry); do_global_ctors (&__CTOR_LIST__, 1); + /* Set the os_being_run global. */ + set_os_type (); + user_data->heapbase = user_data->heapptr = user_data->heaptop = NULL; if (!DuplicateHandle (GetCurrentProcess (), GetCurrentProcess (), |