break;
}
}
+
+#ifndef PERL_USE_SAFE_PUTENV
/* Can we grab env area too to be used as the area for $0? */
- if (s && PL_origenviron) {
+ if (s && PL_origenviron && !PL_use_safe_putenv) {
if ((PL_origenviron[0] == s + 1)
||
(aligned &&
}
}
}
+#endif /* !defined(PERL_USE_SAFE_PUTENV) */
+
PL_origalen = s ? s - PL_origargv[0] + 1 : 0;
}
environ[0] = NULL;
}
if (env) {
- char** origenv = environ;
char *s;
SV *sv;
for (; *env; env++) {
(void)hv_store(hv, *env, s - *env, sv, 0);
if (env_is_not_environ)
mg_set(sv);
- if (origenv != environ) {
- /* realloc has shifted us */
- env = (env - origenv) + environ;
- origenv = environ;
- }
}
}
#endif /* USE_ENVIRON_ARRAY */