summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure2
-rwxr-xr-xconfigpm12
-rw-r--r--configure.com4
-rw-r--r--ext/B/B/C.pm3
-rw-r--r--ext/B/byteperl.c7
-rw-r--r--ext/DB_File/DB_File.xs7
-rw-r--r--ext/Data/Dumper/Dumper.xs5
-rw-r--r--ext/IO/IO.xs15
-rw-r--r--hints/freebsd.sh4
-rwxr-xr-xinstallman4
-rwxr-xr-xinstallperl4
-rwxr-xr-xmyconfig2
-rw-r--r--os2/Makefile.SHs10
-rw-r--r--os2/os2.c2
-rw-r--r--patchlevel.h13
-rw-r--r--perl.c19
-rw-r--r--perl.h2
-rw-r--r--plan9/genconfig.pl12
-rw-r--r--plan9/myconfig.plan92
-rw-r--r--plan9/versnum4
-rw-r--r--pod/perldebug.pod10
-rw-r--r--pod/perldelta.pod20
-rw-r--r--vms/genconfig.pl10
-rw-r--r--vms/myconfig.com8
-rw-r--r--vms/subconfigure.com4
-rw-r--r--win32/config.bc6
-rw-r--r--win32/config.gc6
-rw-r--r--win32/config.vc6
-rw-r--r--win32/config_sh.PL4
-rw-r--r--win32/win32.c5
-rw-r--r--x2p/a2py.c2
31 files changed, 127 insertions, 87 deletions
diff --git a/Configure b/Configure
index 47aa37ee8f..27d3321fc3 100755
--- a/Configure
+++ b/Configure
@@ -13159,7 +13159,7 @@ $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
: add special variables
$test -f $src/patchlevel.h && \
-awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
+awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
echo "CONFIG=true" >>config.sh
: propagate old symbols
diff --git a/configpm b/configpm
index ba07f14a87..9cf8103b80 100755
--- a/configpm
+++ b/configpm
@@ -44,8 +44,18 @@ $in_v = 0;
while (<>) {
next if m:^#!/bin/sh:;
- # Catch CONFIG=true and PATCHLEVEL=n line from Configure.
+ # Catch CONFIG=true and PERL_VERSION=n line from Configure.
s/^(\w+)=(true|\d+)\s*$/$1='$2'\n/;
+ my ($k,$v) = ($1,$2);
+ # grandfather PATCHLEVEL and SUBVERSION
+ if ($k) {
+ if ($k eq 'PERL_VERSION') {
+ push @v_others, "PATCHLEVEL='$v'\n";
+ }
+ elsif ($k eq 'PERL_SUBVERSION') {
+ push @v_others, "SUBVERSION='$v'\n";
+ }
+ }
# We can delimit things in config.sh with either ' or ".
unless ($in_v or m/^(\w+)=(['"])(.*\n)/){
push(@non_v, "#$_"); # not a name='value' line
diff --git a/configure.com b/configure.com
index 24ce886c62..70131e404f 100644
--- a/configure.com
+++ b/configure.com
@@ -969,13 +969,13 @@ $ got_sub = "false"
$ OPEN/READONLY CONFIG 'patchlevel_h'
$Patchlevel_h_loop:
$ READ/END_Of_File=Close_patch CONFIG line
-$ IF ((F$LOCATE("#define PATCHLEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
+$ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
$ THEN
$ line = F$EDIT(line,"COMPRESS, TRIM")
$ patchlevel = F$EXTRACT(18,F$LENGTH(line)-18,line)
$ got_patch = "true"
$ ENDIF
-$ IF ((F$LOCATE("#define SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
+$ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
$ THEN
$ line = F$EDIT(line,"COMPRESS, TRIM")
$ subversion = F$EXTRACT(18,F$LENGTH(line)-18,line)
diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm
index 3803c71a84..67b20b965a 100644
--- a/ext/B/B/C.pm
+++ b/ext/B/B/C.pm
@@ -1027,9 +1027,6 @@ sub output_boilerplate {
print <<'EOT';
#include "EXTERN.h"
#include "perl.h"
-#ifndef PATCHLEVEL
-#include "patchlevel.h"
-#endif
/* Workaround for mapstart: the only op which needs a different ppaddr */
#undef pp_mapstart
diff --git a/ext/B/byteperl.c b/ext/B/byteperl.c
index 6b53e3b174..313ca031e8 100644
--- a/ext/B/byteperl.c
+++ b/ext/B/byteperl.c
@@ -1,8 +1,5 @@
#include "EXTERN.h"
#include "perl.h"
-#ifndef PATCHLEVEL
-#include "patchlevel.h"
-#endif
static void xs_init _((void));
static PerlInterpreter *my_perl;
@@ -28,11 +25,7 @@ main(int argc, char **argv, char **env)
INIT_SPECIALSV_LIST;
PERL_SYS_INIT(&argc,&argv);
-#if PATCHLEVEL > 3 || (PATCHLEVEL == 3 && SUBVERSION >= 1)
perl_init_i18nl10n(1);
-#else
- perl_init_i18nl14n(1);
-#endif
if (!PL_do_undump) {
my_perl = perl_alloc();
diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs
index 723454eea4..33f4b690f3 100644
--- a/ext/DB_File/DB_File.xs
+++ b/ext/DB_File/DB_File.xs
@@ -70,6 +70,11 @@
#include "perl.h"
#include "XSUB.h"
+#ifndef PERL_VERSION
+#include "patchlevel.h"
+#define PERL_VERSION PATCHLEVEL
+#endif
+
/* Being the Berkeley DB we prefer the <sys/cdefs.h> (which will be
* shortly #included by the <db.h>) __attribute__ to the possibly
* already defined __attribute__, for example by GNUC or by Perl. */
@@ -335,7 +340,7 @@ GetVersionInfo()
croak("DB_File needs Berkeley DB 2.0.5 or greater, you have %d.%d.%d\n",
Major, Minor, Patch) ;
-#if PATCHLEVEL > 3
+#if PERL_VERSION > 3
sv_setpvf(ver_sv, "%d.%d", Major, Minor) ;
#else
{
diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs
index a3da110453..ad7c5d435c 100644
--- a/ext/Data/Dumper/Dumper.xs
+++ b/ext/Data/Dumper/Dumper.xs
@@ -2,9 +2,12 @@
#include "perl.h"
#include "XSUB.h"
+#ifndef PERL_VERSION
#include "patchlevel.h"
+#defined PERL_VERSION PATCHLEVEL
+#endif
-#if PATCHLEVEL < 5
+#if PERL_VERSION < 5
# ifndef PL_sv_undef
# define PL_sv_undef sv_undef
# endif
diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs
index 1d0e3567db..eb18f0c478 100644
--- a/ext/IO/IO.xs
+++ b/ext/IO/IO.xs
@@ -27,20 +27,7 @@ typedef FILE * InputStream;
typedef FILE * OutputStream;
#endif
-#include "patchlevel.h"
-
-#if (PATCHLEVEL < 3) || ((PATCHLEVEL == 3) && (SUBVERSION < 22))
- /* before 5.003_22 */
-# define MY_start_subparse(fmt,flags) start_subparse()
-#else
-# if (PATCHLEVEL == 3) && (SUBVERSION == 22)
- /* 5.003_22 */
-# define MY_start_subparse(fmt,flags) start_subparse(flags)
-# else
- /* 5.003_23 onwards */
-# define MY_start_subparse(fmt,flags) start_subparse(fmt,flags)
-# endif
-#endif
+#define MY_start_subparse(fmt,flags) start_subparse(fmt,flags)
#ifndef gv_stashpvn
#define gv_stashpvn(str,len,flags) gv_stashpv(str,flags)
diff --git a/hints/freebsd.sh b/hints/freebsd.sh
index 66f6ca02bf..f841d32b98 100644
--- a/hints/freebsd.sh
+++ b/hints/freebsd.sh
@@ -147,8 +147,8 @@ case "$osvers" in
# the equivalent in the main Configure so we copy a little
# from Configure XXX Configure should be fixed.
if $test -r $src/patchlevel.h;then
- patchlevel=`awk '/define[ ]+PATCHLEVEL/ {print $3}' $src/patchlevel.h`
- subversion=`awk '/define[ ]+SUBVERSION/ {print $3}' $src/patchlevel.h`
+ patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $src/patchlevel.h`
+ subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h`
else
patchlevel=0
subversion=0
diff --git a/installman b/installman
index 6fa423159f..51e20196d2 100755
--- a/installman
+++ b/installman
@@ -17,8 +17,8 @@ $ver = $];
$release = substr($ver,0,3); # Not used presently.
$patchlevel = substr($ver,3,2);
die "Patchlevel of perl ($patchlevel)",
- "and patchlevel of config.sh ($Config{'PATCHLEVEL'}) don't match\n"
- if $patchlevel != $Config{'PATCHLEVEL'};
+ "and patchlevel of config.sh ($Config{'PERL_VERSION'}) don't match\n"
+ if $patchlevel != $Config{'PERL_VERSION'};
$usage =
"Usage: installman --man1dir=/usr/wherever --man1ext=1
diff --git a/installperl b/installperl
index 979000c633..006a5506ed 100755
--- a/installperl
+++ b/installperl
@@ -87,8 +87,8 @@ my $ver = $];
my $release = substr($ver,0,3); # Not used presently.
my $patchlevel = substr($ver,3,2);
die "Patchlevel of perl ($patchlevel)",
- "and patchlevel of config.sh ($Config{'PATCHLEVEL'}) don't match\n"
- if $patchlevel != $Config{'PATCHLEVEL'};
+ "and patchlevel of config.sh ($Config{'PERL_VERSION'}) don't match\n"
+ if $patchlevel != $Config{'PERL_VERSION'};
# Fetch some frequently-used items from %Config
my $installbin = $Config{installbin};
diff --git a/myconfig b/myconfig
index 51991e6019..02ee0a6ad5 100755
--- a/myconfig
+++ b/myconfig
@@ -17,7 +17,7 @@ fi
# Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm.
$spitshell <<!GROK!THIS!
-Summary of my $package ($baserev patchlevel $PATCHLEVEL subversion $SUBVERSION) configuration:
+Summary of my $package (revision $baserev version $PERL_VERSION subversion $PERL_SUBVERSION) configuration:
Platform:
osname=$osname, osvers=$osvers, archname=$archname
uname='$myuname'
diff --git a/os2/Makefile.SHs b/os2/Makefile.SHs
index c9bf39a1e2..ced556af9e 100644
--- a/os2/Makefile.SHs
+++ b/os2/Makefile.SHs
@@ -6,17 +6,17 @@
# Additional rules supported: perl_, aout_test, aout_install, use them
# for a.out style perl (which may fork).
-perl_version="5.00${PATCHLEVEL}_$SUBVERSION"
+perl_fullversion="5.00${PERL_VERSION}_$PERL_SUBVERSION"
case "$archname" in
- *-thread*) perl_version="${perl_version}-threaded";;
+ *-thread*) perl_fullversion="${perl_fullversion}-threaded";;
esac
-dll_post="`echo $perl_version | sum | awk '{print $1}'`"
+dll_post="`echo $perl_fullversion | sum | awk '{print $1}'`"
dll_post="`printf '%x' $dll_post | tr '[a-z]' '[A-Z]'`"
$spitshell >>Makefile <<!GROK!THIS!
-PERL_VERSION = $perl_version
+PERL_FULLVERSION = $perl_fullversion
OPTIMIZE = $optimize
AOUT_OPTIMIZE = \$(OPTIMIZE)
@@ -60,7 +60,7 @@ $(PERL_DLL): $(obj) perl5.def perl$(OBJ_EXT)
perl5.def: perl.linkexp
echo "LIBRARY '$(PERL_DLL_BASE)' INITINSTANCE TERMINSTANCE" > $@
- echo DESCRIPTION "'Perl interpreter v$(PERL_VERSION), export autogenerated, built with $(CONFIG_ARGS)'" >>$@
+ echo DESCRIPTION "'Perl interpreter v$(PERL_FULLVERSION), export autogenerated, built with $(CONFIG_ARGS)'" >>$@
echo STACKSIZE 32768 >>$@
echo CODE LOADONCALL >>$@
echo DATA LOADONCALL NONSHARED MULTIPLE >>$@
diff --git a/os2/os2.c b/os2/os2.c
index 7084074344..3103012df2 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -1315,7 +1315,7 @@ mod2fname(sv)
#ifdef USE_THREADS
sum++; /* Avoid conflict of DLLs in memory. */
#endif
- sum += PATCHLEVEL * 200 + SUBVERSION * 2; /* */
+ sum += PERL_VERSION * 200 + PERL_SUBVERSION * 2; /* */
fname[pos] = 'A' + (sum % 26);
fname[pos + 1] = 'A' + (sum / 26 % 26);
fname[pos + 2] = '\0';
diff --git a/patchlevel.h b/patchlevel.h
index b561f11ed5..2cfdec6b25 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -7,11 +7,6 @@
#define PERL_VERSION 5 /* epoch */
#define PERL_SUBVERSION 55 /* generation */
-/* these are the old terms of reference */
-#define PATCHLEVEL PERL_VERSION
-#undef SUBVERSION /* OS/390 has a SUBVERSION in a system header */
-#define SUBVERSION PERL_SUBVERSION
-
/*
local_patches -- list of locally applied less-than-subversion patches.
If you're distributing such a patch, please give it a name and a
@@ -58,3 +53,11 @@ static char *local_patches[] = {
# define __PATCHLEVEL_H_INCLUDED__
#endif
+
+/* the old terms of reference, add them only when explicitly included */
+#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(PATCHLEVEL)
+#define PATCHLEVEL PERL_VERSION
+#undef SUBVERSION /* OS/390 has a SUBVERSION in a system header */
+#define SUBVERSION PERL_SUBVERSION
+#endif
+
diff --git a/perl.c b/perl.c
index 69ded97d52..81d1f96d99 100644
--- a/perl.c
+++ b/perl.c
@@ -13,7 +13,6 @@
#include "EXTERN.h"
#include "perl.h"
-#include "patchlevel.h"
/* XXX If this causes problems, set i_unistd=undef in the hint file. */
#ifdef I_UNISTD
@@ -210,13 +209,13 @@ perl_construct(register PerlInterpreter *sv_interp)
STATUS_ALL_SUCCESS;
SET_NUMERIC_STANDARD();
-#if defined(SUBVERSION) && SUBVERSION > 0
- sprintf(PL_patchlevel, "%7.5f", (double) 5
- + ((double) PATCHLEVEL / (double) 1000)
- + ((double) SUBVERSION / (double) 100000));
+#if defined(PERL_SUBVERSION) && PERL_SUBVERSION > 0
+ sprintf(PL_patchlevel, "%7.5f", (double) PERL_REVISION
+ + ((double) PERL_VERSION / (double) 1000)
+ + ((double) PERL_SUBVERSION / (double) 100000));
#else
- sprintf(PL_patchlevel, "%5.3f", (double) 5 +
- ((double) PATCHLEVEL / (double) 1000));
+ sprintf(PL_patchlevel, "%5.3f", (double) PERL_REVISION +
+ ((double) PERL_VERSION / (double) 1000));
#endif
#if defined(LOCAL_PATCH_COUNT)
@@ -1719,9 +1718,9 @@ moreswitches(char *s)
s++;
return s;
case 'v':
-#if defined(SUBVERSION) && SUBVERSION > 0
- printf("\nThis is perl, version 5.%03d_%02d built for %s",
- PATCHLEVEL, SUBVERSION, ARCHNAME);
+#if defined(PERL_SUBVERSION) && PERL_SUBVERSION > 0
+ printf("\nThis is perl, version %d.%03d_%02d built for %s",
+ PERL_REVISION, PERL_VERSION, PERL_SUBVERSION, ARCHNAME);
#else
printf("\nThis is perl, version %s built for %s",
PL_patchlevel, ARCHNAME);
diff --git a/perl.h b/perl.h
index eaa2194f29..42505f0d87 100644
--- a/perl.h
+++ b/perl.h
@@ -2796,6 +2796,8 @@ typedef struct am_table_short AMTS;
#endif /* IAMSUID */
/* and finally... */
+#define PERL_PATCHLEVEL_H_IMPLICIT
#include "patchlevel.h"
+#undef PERL_PATCHLEVEL_H_IMPLICIT
#endif /* Include guard */
diff --git a/plan9/genconfig.pl b/plan9/genconfig.pl
index 458c4c3ee9..d934659ec4 100644
--- a/plan9/genconfig.pl
+++ b/plan9/genconfig.pl
@@ -261,12 +261,18 @@ foreach (sort keys %val_vars) {
if (open(PL,"${outdir}patchlevel.h")) {
while (<PL>) {
- if (/^#define PATCHLEVEL\s+(\S+)/) { print OUT "PATCHLEVEL='$1'\n"; }
- elsif (/^#define SUBVERSION\s+(\S+)/) { print OUT "SUBVERSION='$1'\n"; }
+ if (/^#define PERL_VERSION\s+(\S+)/) {
+ print OUT "PERL_VERSION='$1'\n";
+ print OUT "PATCHLEVEL='$1'\n"; # XXX compat
+ }
+ elsif (/^#define PERL_SUBVERSION\s+(\S+)/) {
+ print OUT "PERL_SUBVERSION='$1'\n";
+ print OUT "SUBVERSION='$1'\n"; # XXX compat
+ }
}
close PL;
}
-else { warn "Can't read ${outdir}patchlevel.h - skipping 'PATCHLEVEL'"; }
+else { warn "Can't read ${outdir}patchlevel.h - skipping 'PERL_VERSION'"; }
print OUT "pager='/bin/p'\n";
diff --git a/plan9/myconfig.plan9 b/plan9/myconfig.plan9
index f336a7ce53..59512d5c9c 100644
--- a/plan9/myconfig.plan9
+++ b/plan9/myconfig.plan9
@@ -15,7 +15,7 @@
$spitshell<<!GROK!THIS!
-Summary of my $package ($baserev patchlevel $PATCHLEVEL) configuration:
+Summary of my $package ($baserev version $PERL_VERSION subversion $PERL_SUBVERSION) configuration:
Platform:
osname=$osname, osver=$osvers, archname=$archname
uname='$myuname'
diff --git a/plan9/versnum b/plan9/versnum
index 83e46826c3..6e579f3048 100644
--- a/plan9/versnum
+++ b/plan9/versnum
@@ -1,5 +1,5 @@
-/PATCHLEVEL/ {base = $3}
-/SUBVERSION/ {subvers = $3}
+/PERL_VERSION/ {base = $3}
+/PERL_SUBVERSION/ {subvers = $3}
END {
if (subvers == 0)
printf "p9pvers = 5.%03d\n", base> "buildinfo";
diff --git a/pod/perldebug.pod b/pod/perldebug.pod
index 760d517f97..ed77fd35c8 100644
--- a/pod/perldebug.pod
+++ b/pod/perldebug.pod
@@ -754,8 +754,8 @@ for different values of C<n>:
in @=Config::myconfig() from /dev/nul:0
in $=Config::FETCH(ref(Config), 'package') from lib/Config.pm:574
in $=Config::FETCH(ref(Config), 'baserev') from lib/Config.pm:574
- in $=Config::FETCH(ref(Config), 'PATCHLEVEL') from lib/Config.pm:574
- in $=Config::FETCH(ref(Config), 'SUBVERSION') from lib/Config.pm:574
+ in $=Config::FETCH(ref(Config), 'PERL_VERSION') from lib/Config.pm:574
+ in $=Config::FETCH(ref(Config), 'PERL_SUBVERSION') from lib/Config.pm:574
in $=Config::FETCH(ref(Config), 'osname') from lib/Config.pm:574
in $=Config::FETCH(ref(Config), 'osvers') from lib/Config.pm:574
@@ -779,9 +779,9 @@ for different values of C<n>:
out $=Config::FETCH(ref(Config), 'package') from lib/Config.pm:574
in $=Config::FETCH(ref(Config), 'baserev') from lib/Config.pm:574
out $=Config::FETCH(ref(Config), 'baserev') from lib/Config.pm:574
- in $=Config::FETCH(ref(Config), 'PATCHLEVEL') from lib/Config.pm:574
- out $=Config::FETCH(ref(Config), 'PATCHLEVEL') from lib/Config.pm:574
- in $=Config::FETCH(ref(Config), 'SUBVERSION') from lib/Config.pm:574
+ in $=Config::FETCH(ref(Config), 'PERL_VERSION') from lib/Config.pm:574
+ out $=Config::FETCH(ref(Config), 'PERL_VERSION') from lib/Config.pm:574
+ in $=Config::FETCH(ref(Config), 'PERL_SUBVERSION') from lib/Config.pm:574
=item 14
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 7f944c24b4..f597877452 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -55,6 +55,26 @@ a C<dTHR>.
=back
+=head2 Compatible C Source API Changes
+
+=over
+
+=item C<PATCHLEVEL> is now C<PERL_VERSION>
+
+The cpp macros C<PERL_REVISION>, C<PERL_VERSION> and C<PERL_SUBVERSION>
+are now available by default from perl.h, and reflect the base revision,
+patchlevel and subversion respectively. C<PERL_REVISION> had no
+prior equivalent, while C<PERL_VERSION> and C<PERL_SUBVERSION> were
+previously available as C<PATCHLEVEL> and C<SUBVERSION>.
+
+The new names cause less pollution of the cpp namespace, and reflect what
+the numbers have come to stand for in common practice. For compatibility,
+the old names are still supported when patchlevel.h is explicitly
+included (as required before), so there is no source incompatibility
+due to the change.
+
+=back
+
=head2 Binary Incompatibilities
This release is not binary compatible with the 5.005 release and its
diff --git a/vms/genconfig.pl b/vms/genconfig.pl
index 45f50cad5f..e500e760a2 100644
--- a/vms/genconfig.pl
+++ b/vms/genconfig.pl
@@ -391,8 +391,14 @@ else { warn "Can't read ${outdir}crtl.opt - skipping 'libs' & 'libc'"; }
if (open(PL,"${outdir}patchlevel.h")) {
while (<PL>) {
- if (/^#define PATCHLEVEL\s+(\S+)/) { print OUT "PATCHLEVEL='$1'\n"; }
- elsif (/^#define SUBVERSION\s+(\S+)/) { print OUT "SUBVERSION='$1'\n"; }
+ if (/^#define PERL_VERSION\s+(\S+)/) {
+ print OUT "PERL_VERSION='$1'\n";
+ print OUT "PATCHLEVEL='$1'\n"; # XXX compat
+ }
+ elsif (/^#define PERL_SUBVERSION\s+(\S+)/) {
+ print OUT "PERL_SUBVERSION='$1'\n";
+ print OUT "SUBVERSION='$1'\n"; # XXX compat
+ }
}
close PL;
}
diff --git a/vms/myconfig.com b/vms/myconfig.com
index 6af094357c..1429f86de8 100644
--- a/vms/myconfig.com
+++ b/vms/myconfig.com
@@ -120,13 +120,13 @@ $ endif
$ open/read RATHER_LONG_CONFIG_FILE_HANDLE 'RATHER_LONG_FILENAME_SEARCH'
$read_patchlevel_h:
$ read/end_of_file = patchlevel_h_Done RATHER_LONG_CONFIG_FILE_HANDLE line
-$ if f$locate("PATCHLEVEL",line).ne.f$length(line)
+$ if f$locate("PERL_VERSION",line).ne.f$length(line)
$ then
$ line = f$edit(line,"TRIM,COMPRESS")
$ $PATCHLEVEL = f$element(2," ",line)
$ if f$type($SUBVERSION).nes."" then goto patchlevel_h_Done
$ endif
-$ if f$locate("SUBVERSION",line).ne.f$length(line)
+$ if f$locate("PERL_SUBVERSION",line).ne.f$length(line)
$ then
$ line = f$edit(line,"TRIM,COMPRESS")
$ $SUBVERSION = f$element(2," ",line)
@@ -138,7 +138,7 @@ $patchlevel_h_Done:
$ close RATHER_LONG_CONFIG_FILE_HANDLE
$ if $PATCHLEVEL.eqs.""
$ then
-$ echo "warning: PATCHLEVEL was not found in ''RATHER_LONG_FILENAME_TO_FIND':"
+$ echo "warning: PERL_VERSION was not found in ''RATHER_LONG_FILENAME_TO_FIND':"
$ endif
$look_for_genconfig_pl:
@@ -297,7 +297,7 @@ $ endif
$spit_it_out:
$! $spitshell = ECHO !<<!GROK!THIS!
$ ECHO " "
-$ ECHO "Summary of my ''$package' (patchlevel ''$PATCHLEVEL' subversion ''$SUBVERSION') configuration:"
+$ ECHO "Summary of my ''$package' (version ''$PATCHLEVEL' subversion ''$SUBVERSION') configuration:"
$ ECHO " Platform:"
$ ECHO " osname=''$osname', osvers=''$osvers', archname=''$archname'"
$ ECHO " uname=''$myuname'" !->d_has_uname?
diff --git a/vms/subconfigure.com b/vms/subconfigure.com
index 6f43c9ed9a..ab5fdfb108 100644
--- a/vms/subconfigure.com
+++ b/vms/subconfigure.com
@@ -2927,6 +2927,10 @@ $ WC "voidflags='" + perl_voidflags + "'"
$ WC "d_eunice='" + perl_d_eunice + "'"
$ WC "libs='" + perl_libs + "'"
$ WC "libc='" + perl_libc + "'"
+$ tempstring = "PERL_VERSION='" + "''perl_patchlevel'" + "'"
+$ WC tempstring
+$ tempstring = "PERL_SUBVERSION='" + "''perl_patchlevel'" + "'"
+$ WC tempstring
$ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'"
$ WC tempstring
$ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'"
diff --git a/win32/config.bc b/win32/config.bc
index 7fe2222182..1726a369c5 100644
--- a/win32/config.bc
+++ b/win32/config.bc
@@ -8,10 +8,12 @@ Id='$Id'
Locker=''
Log='$Log'
Mcc='Mcc'
-PATCHLEVEL='~PATCHLEVEL~'
+PERL_VERSION='~PERL_VERSION~'
+PERL_SUBVERSION='~PERL_SUBVERSION~'
+PATCHLEVEL='~PERL_VERSION~'
RCSfile='$RCSfile'
Revision='$Revision'
-SUBVERSION='~SUBVERSION~'
+SUBVERSION='~PERL_SUBVERSION~'
Source=''
State=''
_a='.lib'
diff --git a/win32/config.gc b/win32/config.gc
index 728f8dcc42..a1d5d0baf1 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -8,10 +8,12 @@ Id='$Id'
Locker=''
Log='$Log'
Mcc='Mcc'
-PATCHLEVEL='~PATCHLEVEL~'
+PERL_VERSION='~PERL_VERSION~'
+PERL_SUBVERSION='~PERL_SUBVERSION~'
+PATCHLEVEL='~PERL_VERSION~'
RCSfile='$RCSfile'
Revision='$Revision'
-SUBVERSION='~SUBVERSION~'
+SUBVERSION='~PERL_SUBVERSION~'
Source=''
State=''
_a='.a'
diff --git a/win32/config.vc b/win32/config.vc
index 78fb8c0e1c..11aa47e12f 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -8,10 +8,12 @@ Id='$Id'
Locker=''
Log='$Log'
Mcc='Mcc'
-PATCHLEVEL='~PATCHLEVEL~'
+PERL_VERSION='~PERL_VERSION~'
+PERL_SUBVERSION='~PERL_SUBVERSION~'
+PATCHLEVEL='~PERL_VERSION~'
RCSfile='$RCSfile'
Revision='$Revision'
-SUBVERSION='~SUBVERSION~'
+SUBVERSION='~PERL_SUBVERSION~'
Source=''
State=''
_a='.lib'
diff --git a/win32/config_sh.PL b/win32/config_sh.PL
index 1d4b2fb5c3..fc0daf05bc 100644
--- a/win32/config_sh.PL
+++ b/win32/config_sh.PL
@@ -20,8 +20,8 @@ while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/)
$opt{VERSION} = $];
$opt{INST_VER} =~ s|~VERSION~|$]|g;
if ($] =~ /\.(\d\d\d)?(\d\d)?$/) { # should always be true
- $opt{PATCHLEVEL} = int($1 || 0);
- $opt{SUBVERSION} = $2 || '00';
+ $opt{PERL_VERSION} = int($1 || 0);
+ $opt{PERL_SUBVERSION} = $2 || '00';
}
$opt{'cf_by'} = $ENV{USERNAME} unless $opt{'cf_by'};
diff --git a/win32/win32.c b/win32/win32.c
index 7b328e9e5a..408215c1ff 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -38,8 +38,6 @@
#include "EXTERN.h"
#include "perl.h"
-#include "patchlevel.h"
-
#define NO_XSLOCKS
#ifdef PERL_OBJECT
extern CPerlObj* pPerl;
@@ -189,7 +187,8 @@ get_emd_part(char *prev_path, char *trailing_path, ...)
va_start(ap, trailing_path);
strip = va_arg(ap, char *);
- sprintf(base, "%5.3f", (double) 5 + ((double) PATCHLEVEL / (double) 1000));
+ sprintf(base, "%5.3f",
+ (double)PERL_REVISION + ((double)PERL_VERSION / (double)1000));
GetModuleFileName((HMODULE)((w32_perldll_handle == INVALID_HANDLE_VALUE)
? GetModuleHandle(NULL) : w32_perldll_handle),
diff --git a/x2p/a2py.c b/x2p/a2py.c
index cb09fce485..3976c860c5 100644
--- a/x2p/a2py.c
+++ b/x2p/a2py.c
@@ -35,7 +35,7 @@ static void usage(void);
static void
usage()
{
- printf("\nThis is the AWK to PERL translator, version 5.0, patchlevel %d\n", PATCHLEVEL);
+ printf("\nThis is the AWK to PERL translator, revision %d.0, version %d\n", PERL_REVISION, PERL_VERSION);
printf("\nUsage: %s [-D<number>] [-F<char>] [-n<fieldlist>] [-<number>] filename\n", myname);
printf("\n -D<number> sets debugging flags."
"\n -F<character> the awk script to translate is always invoked with"