diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-22 19:35:25 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-22 19:35:25 +0000 |
commit | 7457d6ad3a387c70eb604b1a53b1125b316fdee0 (patch) | |
tree | f8da2cc2dcc363fb4861297d0341205b00ddceb0 | |
parent | d51e989db2d1411d3c555d720a43f42270d4b7ed (diff) | |
download | perl-7457d6ad3a387c70eb604b1a53b1125b316fdee0.tar.gz |
Be portable.
p4raw-id: //depot/perl@6778
-rw-r--r-- | ext/B/Makefile.PL | 16 | ||||
-rw-r--r-- | t/lib/st-forgive.t | 5 | ||||
-rw-r--r-- | t/lib/st-retrieve.t | 2 | ||||
-rw-r--r-- | t/lib/st-store.t | 4 |
4 files changed, 19 insertions, 8 deletions
diff --git a/ext/B/Makefile.PL b/ext/B/Makefile.PL index 74053e6ae1..4bf226de4f 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 fd5204f0d1..e5272f03b2 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 b38904a0e4..2aec8f5a37 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 c49a71dbcb..dd14617a39 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' } |