diff options
author | Alan Burlison <Alan.Burlison@uk.sun.com> | 2005-10-11 17:29:54 +0100 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2005-10-11 15:15:37 +0000 |
commit | 88f5bc07adcbdcc8427eef58d88a43884ef3f99a (patch) | |
tree | 9ff4104992b1e0501742f6532393057cfd7be2de /perl.c | |
parent | d32793394506cce30e5ae4fb6827bb6a2d170dd1 (diff) | |
download | perl-88f5bc07adcbdcc8427eef58d88a43884ef3f99a.tar.gz |
environ fixup
Message-ID: <434BDA72.4090109@sun.com>
p4raw-id: //depot/perl@25737
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -4592,7 +4592,16 @@ S_init_perllib(pTHX) if (!PL_tainting) { #ifndef VMS s = PerlEnv_getenv("PERL5LIB"); +/* + * It isn't possible to delete an environment variable with + * PERL_USE_SAFE_PUTENV set unless setenv() is also available, so in that case + * we treat PERL5LIB as undefined if it has a zero-length value. + */ +#if defined(PERL_USE_SAFE_PUTENV) && ! defined(HAS_UNSETENV) + if (s && *s != '\0') +#else if (s) +#endif incpush(s, TRUE, TRUE, TRUE, FALSE); else incpush(PerlEnv_getenv("PERLLIB"), FALSE, FALSE, TRUE, FALSE); |