From: Hans Mulder Date: Fri, 19 Jun 1998 16:00:57 +0000 (-0700) Subject: fixup patches for VMS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b2b3adea477dea9f31a8a3c4fccce7b061ebfe62;p=p5sagit%2Fp5-mst-13.2.git fixup patches for VMS Message-Id: <3.0.5.32.19980619160057.032e7480@ous.edu> p4raw-id: //depot/perl@1175 --- diff --git a/ext/SDBM_File/sdbm/Makefile.PL b/ext/SDBM_File/sdbm/Makefile.PL index 7008e6d..e6fdcf9 100644 --- a/ext/SDBM_File/sdbm/Makefile.PL +++ b/ext/SDBM_File/sdbm/Makefile.PL @@ -21,10 +21,24 @@ WriteMakefile( C => [qw(sdbm.c pair.c hash.c)] ); +sub MY::constants { + package MY; + my $r = shift->SUPER::constants(); + if ($^O eq 'VMS') { + $r =~ s/^INST_STATIC =.*$/INST_STATIC = libsdbm\$(LIB_EXT)/m + } + return $r; +} + sub MY::post_constants { + package MY; + if ($^O eq 'VMS') { + shift->SUPER::post_constants(); + } else { ' INST_STATIC = libsdbm$(LIB_EXT) ' + } } sub MY::top_targets { diff --git a/t/lib/filecopy.t b/t/lib/filecopy.t index e4bde30..329931f 100755 --- a/t/lib/filecopy.t +++ b/t/lib/filecopy.t @@ -29,7 +29,7 @@ print "ok 1\n"; print "not " unless $foo eq "ok 3\n"; print "ok 2\n"; -binmode STDOUT; # Copy::copy works in binary mode +binmode STDOUT unless $^O eq 'VMS'; # Copy::copy works in binary mode copy "copy-$$", \*STDOUT; unlink "copy-$$" or die "unlink: $!"; diff --git a/t/op/defins.t b/t/op/defins.t index 5dd614d..0ed61ce 100755 --- a/t/op/defins.t +++ b/t/op/defins.t @@ -10,6 +10,8 @@ BEGIN { $SIG{__WARN__} = sub { $warns++; warn $_[0] }; print "1..14\n"; } + +$wanted_filename = $^O eq 'VMS' ? '0.' : '0'; print "not " if $warns; print "ok 1\n"; @@ -64,7 +66,7 @@ opendir(DIR,'.'); $seen = 0; while (my $name = readdir(DIR)) { - $seen++ if $name eq '0'; + $seen++ if $name eq $wanted_filename; } print "not " unless $seen; print "ok 6\n"; @@ -74,7 +76,7 @@ $seen = 0; $dummy = ''; while (($seen ? $dummy : $name) = readdir(DIR)) { - $seen++ if $name eq '0'; + $seen++ if $name eq $wanted_filename; } print "not " unless $seen; print "ok 7\n"; @@ -83,7 +85,7 @@ rewinddir(DIR); $seen = 0; while ($where{$seen} = readdir(DIR)) { - $seen++ if $where{$seen} eq '0'; + $seen++ if $where{$seen} eq $wanted_filename; } print "not " unless $seen; print "ok 8\n"; @@ -91,7 +93,7 @@ print "ok 8\n"; $seen = 0; while (my $name = glob('*')) { - $seen++ if $name eq '0'; + $seen++ if $name eq $wanted_filename; } print "not " unless $seen; print "ok 9\n"; @@ -100,7 +102,7 @@ $seen = 0; $dummy = ''; while (($seen ? $dummy : $name) = glob('*')) { - $seen++ if $name eq '0'; + $seen++ if $name eq $wanted_filename; } print "not " unless $seen; print "ok 10\n"; @@ -108,7 +110,7 @@ print "ok 10\n"; $seen = 0; while ($where{$seen} = glob('*')) { - $seen++ if $where{$seen} eq '0'; + $seen++ if $where{$seen} eq $wanted_filename; } print "not " unless $seen; print "ok 11\n"; diff --git a/t/op/taint.t b/t/op/taint.t index 7f77283..5f85b36 100755 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -232,7 +232,7 @@ print "1..145\n"; # Globs should be forbidden, except under VMS, # which doesn't spawn an external program. if ($Is_VMS) { - for (29..30) { print "ok $_\n"; } + for (31..32) { print "ok $_\n"; } } else { my @globs = eval { <*> }; diff --git a/vms/test.com b/vms/test.com index f131088..81dfc46 100644 --- a/vms/test.com +++ b/vms/test.com @@ -162,7 +162,7 @@ while ($test = shift) { } else { $switch = ''; } - open(results,"\$ MCR Sys\$Disk:[]Perl. $switch $test |") || (print "can't run.\n"); + open(results,"\$ MCR Sys\$Disk:[]Perl. \"-I[-.lib]\" $switch $test |") || (print "can't run.\n"); $ok = 0; $next = 0; while () { diff --git a/vms/vms.c b/vms/vms.c index 62f27c3..73c9186 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -203,7 +203,8 @@ prime_env_iter(void) $DESCRIPTOR(clidsc,"DCL"); $DESCRIPTOR(tabdsc,"DCLTABLES"); $DESCRIPTOR(mbxdsc,mbxnam); #ifdef USE_THREADS - static perl_mutex primenv_mutex = PTHREAD_MUTEX_INITIALIZER; + static perl_mutex primenv_mutex; + MUTEX_INIT(&primenv_mutex); #endif if (primed) return;