From: Jarkko Hietaniemi Date: Tue, 22 Aug 2000 19:35:25 +0000 (+0000) Subject: Be portable. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=29fc1735f6ef1892396c4aca36cee4ec8d413146;p=p5sagit%2Fp5-mst-13.2.git Be portable. p4raw-id: //depot/perl@6778 --- diff --git a/ext/B/Makefile.PL b/ext/B/Makefile.PL index 74053e6..4bf226d 100644 --- a/ext/B/Makefile.PL +++ b/ext/B/Makefile.PL @@ -1,5 +1,6 @@ use ExtUtils::MakeMaker; use Config; +use File::Spec; my $e = $Config{'exe_ext'}; my $o = $Config{'obj_ext'}; @@ -29,10 +30,17 @@ sub post_constants { "\nLIBS = $Config::Config{libs}\n" } +sub upupfile { + File::Spec->catfile(File::Spec->updir, + File::Spec->updir, $_[0]); +} + sub postamble { -' -B$(OBJ_EXT) : defsubs.h + my $op_h = upupfile('op.h'); + my $cop_h = upupfile('cop.h'); +" +B\$(OBJ_EXT) : defsubs.h -defsubs.h :: ../../op.h ../../cop.h -' +defsubs.h :: $op_h $cop_h +" } diff --git a/t/lib/st-forgive.t b/t/lib/st-forgive.t index fd5204f..e5272f0 100644 --- a/t/lib/st-forgive.t +++ b/t/lib/st-forgive.t @@ -29,6 +29,7 @@ sub BEGIN { } use Storable qw(store retrieve); +use File::Spec; print "1..8\n"; @@ -42,6 +43,8 @@ print (($@ ne '')?"ok $test\n":"not ok $test\n"); $test++; $Storable::forgive_me=1; +my $devnull = File::Spec->devnull; + open(SAVEERR, ">&STDERR"); open(STDERR, ">/dev/null") or ( print SAVEERR "Unable to redirect STDERR: $!\n" and exit(1) ); @@ -60,4 +63,4 @@ print (($ret->[2] eq 'bar')?"ok $test\n":"not ok $test\n"); $test++; print ((ref $ret->[1] eq 'SCALAR')?"ok $test\n":"not ok $test\n"); $test++; -END { unlink 'store' } +END { 1 while unlink 'store' } diff --git a/t/lib/st-retrieve.t b/t/lib/st-retrieve.t index b38904a..2aec8f5 100644 --- a/t/lib/st-retrieve.t +++ b/t/lib/st-retrieve.t @@ -73,5 +73,5 @@ print "ok 13\n"; print "not " if length $root->[1]; print "ok 14\n"; -END { unlink 'store', 'nstore' } +END { 1 while unlink('store', 'nstore') } diff --git a/t/lib/st-store.t b/t/lib/st-store.t index c49a71d..dd14617 100644 --- a/t/lib/st-store.t +++ b/t/lib/st-store.t @@ -52,7 +52,7 @@ print "ok 4\n"; print "not " unless $got eq $dumped; print "ok 5\n"; -unlink 'store'; +1 while unlink 'store'; package FOO; @ISA = qw(Storable); @@ -114,6 +114,6 @@ print "not " unless $@; print "ok 20\n"; close OUT; -END { unlink 'store' } +END { 1 while unlink 'store' }