diff options
author | Craig A. Berry <craigberry@mac.com> | 2003-12-11 08:35:29 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-12-11 23:53:34 +0000 |
commit | 299d126a2f8dc481e487c65c8917d2ed546b48b3 (patch) | |
tree | 0ba90960714e0c115c620a371e729e408cb2358c /vms | |
parent | bab60645eede4549da7cb013b7126e5fcc02eac1 (diff) | |
download | perl-299d126a2f8dc481e487c65c8917d2ed546b48b3.tar.gz |
environ array fix for VMS
From: "Craig A. Berry" <craigberry@mac.com>
Message-ID: <3FD8D511.2030805@mac.com>
p4raw-id: //depot/perl@21879
Diffstat (limited to 'vms')
-rw-r--r-- | vms/vms.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -222,6 +222,7 @@ Perl_vmstrnenv(const char *lnm, char *eqv, unsigned long int idx, retsts = SS$_NOLOGNAM; for (i = 0; environ[i]; i++) { if ((eq = strchr(environ[i],'=')) && + lnmdsc.dsc$w_length == (eq - environ[i]) && !strncmp(environ[i],uplnm,eq - environ[i])) { eq++; for (eqvlen = 0; eq[eqvlen]; eqvlen++) eqv[eqvlen] = eq[eqvlen]; @@ -733,8 +734,9 @@ Perl_vmssetenv(pTHX_ char *lnm, char *eqv, struct dsc$descriptor_s **tabvec) for (curtab = 0; tabvec[curtab]; curtab++) { if (!ivenv && !str$case_blind_compare(tabvec[curtab],&crtlenv)) { int i; - for (i = 0; environ[i]; i++) { /* Iff it's an environ elt, reset */ + for (i = 0; environ[i]; i++) { /* If it's an environ elt, reset */ if ((cp1 = strchr(environ[i],'=')) && + lnmdsc.dsc$w_length == (cp1 - environ[i]) && !strncmp(environ[i],lnm,cp1 - environ[i])) { #ifdef HAS_SETENV return setenv(lnm,"",1) ? vaxc$errno : 0; |