From: Gurusamy Sarathy Date: Tue, 29 Feb 2000 23:35:50 +0000 (+0000) Subject: VMS fixups (from Dan Sugalski); cosmetic tweaks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1250aba519c4f388317ce9822edbe8ca724e1616;p=p5sagit%2Fp5-mst-13.2.git VMS fixups (from Dan Sugalski); cosmetic tweaks p4raw-id: //depot/perl@5378 --- diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm index 61a29db..820c661 100644 --- a/lib/Test/Harness.pm +++ b/lib/Test/Harness.pm @@ -64,9 +64,20 @@ sub runtests { # pass -I flags to children my $old5lib = $ENV{PERL5LIB}; - local($ENV{'PERL5LIB'}) = join($Config{path_sep}, @INC); - if ($^O eq 'VMS') { $switches =~ s/-(\S*[A-Z]\S*)/"-$1"/g } + # VMS has a 255-byte limit on the length of %ENV entries, so + # toss the ones that involve perl_root, the install location + # for VMS + my $new5lib; + if ($^O eq 'VMS') { + $new5lib = join($Config{path_sep}, grep {!/perl_root/i;} @INC); + $switches =~ s/-(\S*[A-Z]\S*)/"-$1"/g; + } + else { + $new5lib = join($Config{path_sep}, @INC); + } + + local($ENV{'PERL5LIB'}) = $new5lib; my @dir_files = globdir $files_in_dir if defined $files_in_dir; my $t_start = new Benchmark; diff --git a/vms/vms.c b/vms/vms.c index ba4fada..7327b75 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -616,6 +616,13 @@ vmssetenv(char *lnm, char *eqv, struct dsc$descriptor_s **tabvec) } else { if (!*eqv) eqvdsc.dsc$w_length = 1; + if (eqvdsc.dsc$w_length > LNM$C_NAMLENGTH) { + eqvdsc.dsc$w_length = LNM$C_NAMLENGTH; + if (ckWARN(WARN_MISC)) { + Perl_warner(aTHX_ WARN_MISC,"Value of logical \"%s\" too long. " + "Truncating to %i bytes",lnm, LNM$C_NAMLENGTH); + } + } retsts = lib$set_logical(&lnmdsc,&eqvdsc,tabvec[0],0,0); } }