Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2004-09-27 20:30:44 +0400
committerCorinna Vinschen <corinna@vinschen.de>2004-09-27 20:30:44 +0400
commit2b94cfce8932fdf3a1f88b8a909cb0fb65bcb9b7 (patch)
tree7068f359fca0f2ef2155c6b5dab86a9a0131be68 /winsup/cygwin/lib/_cygwin_crt0_common.cc
parent3e6d5933e2f7e61ffcba25ad5c18a51f8c8770d8 (diff)
* lib/_cygwin_crt0_common.cc: Revert patch from 2004-09-16. Brakes
newly built DLLs.
Diffstat (limited to 'winsup/cygwin/lib/_cygwin_crt0_common.cc')
-rw-r--r--winsup/cygwin/lib/_cygwin_crt0_common.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc
index 51be98003..935b84f31 100644
--- a/winsup/cygwin/lib/_cygwin_crt0_common.cc
+++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc
@@ -15,6 +15,9 @@ details. */
#include <reent.h>
#include <stdlib.h>
+/* Avoid an info message from linker when linking applications. */
+extern __declspec(dllimport) struct _reent *_impure_ptr;
+
#undef environ
extern "C"
@@ -60,6 +63,10 @@ _cygwin_crt0_common (MainFunc f, per_process *u)
u->ctors = &__CTOR_LIST__;
u->dtors = &__DTOR_LIST__;
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
when the process is actually forked */