diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-14 23:11:05 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-14 23:11:05 +0000 |
commit | 7b8d334a971230040a212bc5038097b3f600a094 (patch) | |
tree | e0fd6231e06e9b8f7e54aae4cec4ead51585219a /vms | |
parent | 6ee623d521a149edc6574c512fa951a192cd086a (diff) | |
download | perl-7b8d334a971230040a212bc5038097b3f600a094.tar.gz |
[win32] merge change#897 from maintbranch
p4raw-link: @897 on //depot/maint-5.004/perl: f06f9b6fc5a686f0169ee2a91b32d5e7125a44ae
p4raw-id: //depot/win32/perl@974
Diffstat (limited to 'vms')
-rw-r--r-- | vms/vms.c | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -196,7 +196,7 @@ prime_env_iter(void) # define CLI$M_TRUSTED 0x40 /* Missing from VAXC headers */ #endif unsigned long int flags = CLI$M_NOWAIT | CLI$M_NOCLISYM | CLI$M_NOKEYPAD | CLI$M_TRUSTED; - unsigned long int retsts, substs = 0, wakect = 0; + unsigned long int i, retsts, substs = 0, wakect = 0; STRLEN eqvlen; SV *oldrs, *linesv, *eqvsv; $DESCRIPTOR(cmddsc,"Show Logical *"); $DESCRIPTOR(nldsc,"_NLA0:"); @@ -212,12 +212,18 @@ prime_env_iter(void) /* Perform a dummy fetch as an lval to insure that the hash table is * set up. Otherwise, the hv_store() will turn into a nullop. */ (void) hv_fetch(envhv,"DEFAULT",7,TRUE); - /* Also, set up the four "special" keys that the CRTL defines, - * whether or not underlying logical names exist. */ - (void) hv_fetch(envhv,"HOME",4,TRUE); - (void) hv_fetch(envhv,"TERM",4,TRUE); - (void) hv_fetch(envhv,"PATH",4,TRUE); - (void) hv_fetch(envhv,"USER",4,TRUE); + /* Also, set up any "special" keys that the CRTL defines, + * either by itself or becasue we were called from a C program + * using exec[lv]e() */ + for (i = 0; environ[i]; i++) { + if (!(start = strchr(environ[i],'='))) { + warn("Ill-formed CRTL environ value \"%s\"\n",environ[i]); + } + else { + start++; + (void) hv_store(envhv,environ[i],start - environ[i] - 1,newSVpv(start,0),0); + } + } /* Now, go get the logical names */ create_mbx(&chan,&mbxdsc); |