diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-06 16:10:24 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-06 16:10:24 +0000 |
commit | 231bc313da16da9d626e684e44737b52da2914ce (patch) | |
tree | 4734c3319e173bc966d62920275051715e8415b0 /x2p | |
parent | dfca11dd05cf9f4d9c19047def644407603468f0 (diff) | |
download | perl-231bc313da16da9d626e684e44737b52da2914ce.tar.gz |
Make pstruct and psed appear also on platforms with
$Config{d_link} but filesystems without link() (like FAT).
Should deal with [ID 20020602.003] and
"RC1 for MSWin32-x86-multi-thread build bug report".
Diagnosis by Sarathy.
p4raw-id: //depot/perl@17038
Diffstat (limited to 'x2p')
-rw-r--r-- | x2p/s2p.PL | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/x2p/s2p.PL b/x2p/s2p.PL index 9b62caac9c..7e654017b7 100644 --- a/x2p/s2p.PL +++ b/x2p/s2p.PL @@ -3,6 +3,28 @@ use Config; use File::Basename qw(&basename &dirname); use Cwd; +use subs qw(link); + +sub link { # This is a cutdown vesion of installperl:link(). + my($from,$to) = @_; + my($success) = 0; + + eval { + CORE::link($from, $to) + ? $success++ + : ($from =~ m#^/afs/# || $to =~ m#^/afs/#) + ? die "AFS" # okay inside eval {} + : die "Couldn't link $from to $to: $!\n"; + }; + if ($@) { + warn $@; + require File::Copy; + File::Copy::copy($from, $to) + ? $success++ + : warn "Couldn't copy $from to $to: $!\n"; + } + $success; +} # List explicitly here the variables you want Configure to # generate. Metaconfig only looks for shell variables, so you |