summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2005-11-13 08:00:49 -0800
committerSteve Peters <steve@fisharerojo.org>2005-11-14 01:13:16 +0000
commit548074dfae7ec3070e1e05e09a994816bd8d5f53 (patch)
treec9327d7d7aca6cce3902b7807b4c075f5b6fda7d /utils
parent06c0cc96ebd866767a6d107ed78967600f7e0395 (diff)
downloadperl-548074dfae7ec3070e1e05e09a994816bd8d5f53.tar.gz
consting perlbug breaking in blead & maint
Message-ID: <20051114000049.GA7676@efn.org> p4raw-id: //depot/perl@26118
Diffstat (limited to 'utils')
-rw-r--r--utils/perlbug.PL9
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/perlbug.PL b/utils/perlbug.PL
index c778c9c09b..8e648289bb 100644
--- a/utils/perlbug.PL
+++ b/utils/perlbug.PL
@@ -28,9 +28,15 @@ open PATCH_LEVEL, "<" . catfile(updir, "patchlevel.h")
or die "Can't open patchlevel.h: $!";
my $patchlevel_date = (stat PATCH_LEVEL)[9];
+my $patchnum = "";
while (<PATCH_LEVEL>) {
- last if $_ =~ /^\s*static\s+char.*?local_patches\[\]\s*=\s*{\s*$/;
+ $patchnum = $1 if /#define PERL_PATCHNUM\s+(\d+)/;
+ last if $_ =~ /^\s*static\s+(?:const\s+)?char.*?local_patches\[\]\s*=\s*{\s*$/;
+}
+
+if (! defined($_)) {
+ warn "Warning: local_patches section not found in patchlevel.h\n";
}
my @patches;
@@ -38,6 +44,7 @@ while (<PATCH_LEVEL>) {
last if /^\s*}/;
chomp;
s/^\s+,?\s*"?//;
+ s/"\s+STRINGIFY\(PERL_PATCHNUM\)/$patchnum"/;
s/"?\s*,?$//;
s/(['\\])/\\$1/g;
push @patches, $_ unless $_ eq 'NULL';