* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Don't reset environ if

already set.
This commit is contained in:
Christopher Faylor
2000-07-12 04:02:45 +00:00
parent 1ff7263eb9
commit a0f7b496ad
3 changed files with 10 additions and 2 deletions

View File

@@ -56,7 +56,10 @@ _cygwin_crt0_common (MainFunc f, per_process *u)
u->ctors = &__CTOR_LIST__;
u->dtors = &__DTOR_LIST__;
u->envptr = &environ;
if (!u->envptr)
u->envptr = &environ;
else
environ = *(u->envptr);
if (uwasnull)
_impure_ptr = u->impure_ptr; /* Use field initialized in newer DLLs. */
else