diff options
author | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
commit | 2618fad5bbb2d0182eb31ed805c41b543c513940 (patch) | |
tree | 52ba93338b13aefd02a0055304a9eccfa0e049f5 /contrib/perl5/utils/h2ph.PL | |
parent | 77644ee620b6a79cf8c538abaf7cd301a875528d (diff) | |
download | FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.zip FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.tar.gz |
Vendor import of Perl 5.006
Diffstat (limited to 'contrib/perl5/utils/h2ph.PL')
-rw-r--r-- | contrib/perl5/utils/h2ph.PL | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/perl5/utils/h2ph.PL b/contrib/perl5/utils/h2ph.PL index 6011d98..0b0208b 100644 --- a/contrib/perl5/utils/h2ph.PL +++ b/contrib/perl5/utils/h2ph.PL @@ -528,7 +528,7 @@ sub inc_dirs sub build_preamble_if_necessary { # Increment $VERSION every time this function is modified: - my $VERSION = 1; + my $VERSION = 2; my $preamble = "$Dest_dir/_h2ph_pre.ph"; # Can we skip building the preamble file? @@ -556,6 +556,9 @@ sub build_preamble_if_necessary if ($define{$_} =~ /^\d+$/) { print PREAMBLE "unless (defined &$_) { sub $_() { $define{$_} } }\n\n"; + } elsif ($define{$_} =~ /^\w+$/) { + print PREAMBLE + "unless (defined &$_) { sub $_() { &$define{$_} } }\n\n"; } else { print PREAMBLE "unless (defined &$_) { sub $_() { \"", @@ -576,8 +579,7 @@ sub _extract_cc_defines # Split compiler pre-definitions into `key=value' pairs: foreach (split /\s+/, $allsymbols) { - /(.*?)=(.*)/; - $define{$1} = $2; + /(.+?)=(.+)/ and $define{$1} = $2; if ($opt_D) { print STDERR "$_: $1 -> $2\n"; |