summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-08-01 22:41:41 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-08-01 22:41:41 +0000
commit2c2d71f566f0a758d1486480f45158c0e70ea496 (patch)
treed67b3010ebaf6991b7398e97ccdf30af574880ac /mg.c
parent11dc3f6843cdaab297302291339b779fc301b0f3 (diff)
downloadperl-2c2d71f566f0a758d1486480f45158c0e70ea496.tar.gz
Integrate with Sarathy. perl.h and util.c required manual resolving.
p4raw-id: //depot/cfgperl@3864
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mg.c b/mg.c
index 9127137359..19479db62b 100644
--- a/mg.c
+++ b/mg.c
@@ -828,7 +828,12 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
}
FreeEnvironmentStrings(envv);
# else
-# ifndef PERL_USE_SAFE_PUTENV
+# ifdef CYGWIN
+ I32 i;
+ for (i = 0; environ[i]; i++)
+ Safefree(environ[i]);
+# else
+# ifndef PERL_USE_SAFE_PUTENV
I32 i;
if (environ == PL_origenviron)
@@ -836,7 +841,8 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
else
for (i = 0; environ[i]; i++)
safesysfree(environ[i]);
-# endif /* PERL_USE_SAFE_PUTENV */
+# endif /* PERL_USE_SAFE_PUTENV */
+# endif /* CYGWIN */
environ[0] = Nullch;