diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-03-17 10:16:40 +0000 |
---|---|---|
committer | Charles Bailey <bailey@genetics.upenn.edu> | 1996-03-17 10:16:40 +0000 |
commit | 3a8dc7fad1166feb6259d341a18fb6e8fbeed5b6 (patch) | |
tree | 13cf3c8978dc73b917836d693fbab2edff10f569 /utils | |
parent | 38cd91168e939f4687d9a1275f67512d78017fa3 (diff) | |
download | perl-3a8dc7fad1166feb6259d341a18fb6e8fbeed5b6.tar.gz |
Use $^O, and copy file to pstruct on systems which don't use links
Diffstat (limited to 'utils')
-rw-r--r-- | utils/c2ph.PL | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/utils/c2ph.PL b/utils/c2ph.PL index ece26acbc1..219af02933 100644 --- a/utils/c2ph.PL +++ b/utils/c2ph.PL @@ -15,8 +15,7 @@ use File::Basename qw(&basename &dirname); chdir(dirname($0)); ($file = basename($0)) =~ s/\.PL$//; $file =~ s/\.pl$// - if ($Config{'osname'} eq 'VMS' or - $Config{'osname'} eq 'OS2'); # "case-forgiving" + if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving" open OUT,">$file" or die "Can't create $file: $!"; @@ -1392,5 +1391,11 @@ close OUT or die "Can't close $file: $!"; chmod 0755, $file or die "Can't reset permissions for $file: $!\n"; unlink 'pstruct'; print "Linking c2ph to pstruct.\n"; -link c2ph, pstruct unless $Config{'osname'} eq 'VMS'; +if (defined $Config{d_link}) { + link 'c2ph', 'pstruct'; +} else { + unshift @INC, '../lib'; + require File::Copy; + File::Copy::syscopy('c2ph', 'pstruct'); +} exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':'; |