From: Gisle Aas Date: Fri, 6 Jan 2006 13:57:27 +0000 (+0000) Subject: Move "DEVEL####" marker to the 'perl -v' output. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7850f74cebcc11cc1e593574033a8cdd463b0a01;p=p5sagit%2Fp5-mst-13.2.git Move "DEVEL####" marker to the 'perl -v' output. This avoids problem with using STRINGIFY in patchlevel.h (ref msg <43BE4BAC.6010701@uk.radan.com> posted to p5p). p4raw-id: //depot/perl@26672 --- diff --git a/patchlevel.h b/patchlevel.h index af6e18f..2f03a04 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -115,14 +115,9 @@ hunk. */ -#ifndef PERL_PATCHNUM -#define PERL_PATCHNUM 24148 -#endif - #if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT) static const char * const local_patches[] = { NULL - ,"DEVEL" STRINGIFY(PERL_PATCHNUM) ,NULL }; diff --git a/perl.c b/perl.c index 2c8ddbc..0493dd4 100644 --- a/perl.c +++ b/perl.c @@ -3219,7 +3219,11 @@ Perl_moreswitches(pTHX_ char *s) upg_version(PL_patchlevel); #if !defined(DGUX) PerlIO_printf(PerlIO_stdout(), - Perl_form(aTHX_ "\nThis is perl, %"SVf" built for %s", + Perl_form(aTHX_ "\nThis is perl, %"SVf +#ifdef PERL_PATCHNUM + " DEVEL" STRINGIFY(PERL_PATCHNUM) +#endif + " built for %s", vstringify(PL_patchlevel), ARCHNAME)); #else /* DGUX */ diff --git a/t/run/switches.t b/t/run/switches.t index a81a962..1f6cf66 100644 --- a/t/run/switches.t +++ b/t/run/switches.t @@ -237,7 +237,7 @@ SWTESTPM my $v = sprintf "%vd", $^V; like( runperl( switches => ['-v'] ), - qr/This is perl, v$v built for $Config{archname}.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License/s, + qr/This is perl, v$v (?:DEVEL\d+ )?built for \Q$Config{archname}\E.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License/s, '-v looks okay' ); } diff --git a/utils/perlbug.PL b/utils/perlbug.PL index 8e64828..de94e6e 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -28,10 +28,8 @@ open PATCH_LEVEL, "<" . catfile(updir, "patchlevel.h") or die "Can't open patchlevel.h: $!"; my $patchlevel_date = (stat PATCH_LEVEL)[9]; -my $patchnum = ""; while () { - $patchnum = $1 if /#define PERL_PATCHNUM\s+(\d+)/; last if $_ =~ /^\s*static\s+(?:const\s+)?char.*?local_patches\[\]\s*=\s*{\s*$/; } @@ -44,7 +42,6 @@ while () { last if /^\s*}/; chomp; s/^\s+,?\s*"?//; - s/"\s+STRINGIFY\(PERL_PATCHNUM\)/$patchnum"/; s/"?\s*,?$//; s/(['\\])/\\$1/g; push @patches, $_ unless $_ eq 'NULL';