This avoids problem with using STRINGIFY in patchlevel.h
(ref msg <
43BE4BAC.6010701@uk.radan.com> posted to p5p).
p4raw-id: //depot/perl@26672
*/
-#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
};
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 */
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' );
}
or die "Can't open patchlevel.h: $!";
my $patchlevel_date = (stat PATCH_LEVEL)[9];
-my $patchnum = "";
while (<PATCH_LEVEL>) {
- $patchnum = $1 if /#define PERL_PATCHNUM\s+(\d+)/;
last if $_ =~ /^\s*static\s+(?:const\s+)?char.*?local_patches\[\]\s*=\s*{\s*$/;
}
last if /^\s*}/;
chomp;
s/^\s+,?\s*"?//;
- s/"\s+STRINGIFY\(PERL_PATCHNUM\)/$patchnum"/;
s/"?\s*,?$//;
s/(['\\])/\\$1/g;
push @patches, $_ unless $_ eq 'NULL';