* lib/_cygwin_crt0_common.cc: Revert patch from 2004-09-16. Brakes

newly built DLLs.
This commit is contained in:
Corinna Vinschen 2004-09-27 16:30:44 +00:00
parent 3e6d5933e2
commit 2b94cfce89
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2004-09-27 Corinna Vinschen <corinna@vinschen.de>
* lib/_cygwin_crt0_common.cc: Revert patch from 2004-09-16. Brakes
newly built DLLs.
2004-09-24 Christopher Faylor <cgf@timesys.com> 2004-09-24 Christopher Faylor <cgf@timesys.com>
Sergey Ivanov <seriv@parkheights.dyndns.org> Sergey Ivanov <seriv@parkheights.dyndns.org>

View File

@ -15,6 +15,9 @@ details. */
#include <reent.h> #include <reent.h>
#include <stdlib.h> #include <stdlib.h>
/* Avoid an info message from linker when linking applications. */
extern __declspec(dllimport) struct _reent *_impure_ptr;
#undef environ #undef environ
extern "C" extern "C"
@ -60,6 +63,10 @@ _cygwin_crt0_common (MainFunc f, per_process *u)
u->ctors = &__CTOR_LIST__; u->ctors = &__CTOR_LIST__;
u->dtors = &__DTOR_LIST__; u->dtors = &__DTOR_LIST__;
u->envptr = &environ; u->envptr = &environ;
if (uwasnull)
_impure_ptr = u->impure_ptr; /* Use field initialized in newer DLLs. */
else
u->impure_ptr_ptr = &_impure_ptr; /* Older DLLs need this. */
u->forkee = 0; /* This should only be set in dcrt0.cc u->forkee = 0; /* This should only be set in dcrt0.cc
when the process is actually forked */ when the process is actually forked */