Some Win32 Config fixes for patchlevel and perl_patchlevel:
Steve Hay [Mon, 9 Jul 2007 11:43:09 +0000 (11:43 +0000)]
- Set $Config{patchlevel} to PERL_VERSION (it was previously blank
  because it was wrongly being set from PATCHLEVEL, which was blank)
- Set $Config{perl_patchlevel} and $Config{PERL_PATCHLEVEL} to the
  value in the top-level ".patch" file if it exists (the former was
  previously not set, while the latter was previously wrongly set to
  PERL_VERSION)

p4raw-id: //depot/perl@31569

win32/config.bc
win32/config.ce
win32/config.gc
win32/config.vc
win32/config.vc64
win32/config_sh.PL

index d46c838..f00136d 100644 (file)
@@ -817,11 +817,11 @@ otherlibdirs=''
 package='perl5'
 pager='more /e'
 passcat=''
-patchlevel='~PATCHLEVEL~'
+patchlevel='~PERL_VERSION~'
 path_sep=';'
 perl5=''
 perl='perl'
-perl_patchlevel=''
+perl_patchlevel='~PERL_PATCHLEVEL~'
 perladmin=''
 perllibs='~libs~'
 perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe'
@@ -1043,5 +1043,5 @@ PERL_VERSION='~PERL_VERSION~'
 PERL_API_REVISION='~PERL_API_REVISION~'
 PERL_API_SUBVERSION='~PERL_API_SUBVERSION~'
 PERL_API_VERSION='~PERL_API_VERSION~'
-PERL_PATCHLEVEL='~PERL_VERSION~'
+PERL_PATCHLEVEL='~PERL_PATCHLEVEL~'
 PERL_CONFIG_SH='true'
index bd6935e..01855fc 100644 (file)
@@ -790,10 +790,11 @@ otherlibdirs=''
 package='perl5'
 pager='more /e'
 passcat=''
-patchlevel='~PATCHLEVEL~'
+patchlevel='~PERL_VERSION~'
 path_sep=';'
 perl5=''
 perl='perl'
+perl_patchlevel='~PERL_PATCHLEVEL~'
 perladmin=''
 perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe'
 pg=''
@@ -992,4 +993,5 @@ PERL_API_REVISION='~PERL_API_REVISION~'
 PERL_API_SUBVERSION='~PERL_API_SUBVERSION~'
 PERL_API_VERSION='~PERL_API_VERSION~'
 PATCHLEVEL='~PERL_VERSION~'
+PERL_PATCHLEVEL='~PERL_PATCHLEVEL~'
 PERL_CONFIG_SH='true'
index 63c2250..33c5213 100644 (file)
@@ -817,11 +817,11 @@ otherlibdirs=''
 package='perl5'
 pager='more /e'
 passcat=''
-patchlevel='~PATCHLEVEL~'
+patchlevel='~PERL_VERSION~'
 path_sep=';'
 perl5=''
 perl='perl'
-perl_patchlevel=''
+perl_patchlevel='~PERL_PATCHLEVEL~'
 perladmin=''
 perllibs='~libs~'
 perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe'
@@ -1043,5 +1043,5 @@ PERL_VERSION='~PERL_VERSION~'
 PERL_API_REVISION='~PERL_API_REVISION~'
 PERL_API_SUBVERSION='~PERL_API_SUBVERSION~'
 PERL_API_VERSION='~PERL_API_VERSION~'
-PERL_PATCHLEVEL='~PERL_VERSION~'
+PERL_PATCHLEVEL='~PERL_PATCHLEVEL~'
 PERL_CONFIG_SH='true'
index 0ac9e8b..f89ffbf 100644 (file)
@@ -817,11 +817,11 @@ otherlibdirs=''
 package='perl5'
 pager='more /e'
 passcat=''
-patchlevel='~PATCHLEVEL~'
+patchlevel='~PERL_VERSION~'
 path_sep=';'
 perl5=''
 perl='perl'
-perl_patchlevel=''
+perl_patchlevel='~PERL_PATCHLEVEL~'
 perladmin=''
 perllibs='~libs~'
 perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe'
@@ -1043,5 +1043,5 @@ PERL_VERSION='~PERL_VERSION~'
 PERL_API_REVISION='~PERL_API_REVISION~'
 PERL_API_SUBVERSION='~PERL_API_SUBVERSION~'
 PERL_API_VERSION='~PERL_API_VERSION~'
-PERL_PATCHLEVEL='~PERL_VERSION~'
+PERL_PATCHLEVEL='~PERL_PATCHLEVEL~'
 PERL_CONFIG_SH='true'
index a5cb358..b94303c 100644 (file)
@@ -817,11 +817,11 @@ otherlibdirs=''
 package='perl5'
 pager='more /e'
 passcat=''
-patchlevel='~PATCHLEVEL~'
+patchlevel='~PERL_VERSION~'
 path_sep=';'
 perl5=''
 perl='perl'
-perl_patchlevel=''
+perl_patchlevel='~PERL_PATCHLEVEL~'
 perladmin=''
 perllibs='~libs~'
 perlpath='~INST_TOP~~INST_VER~\bin~INST_ARCH~\perl.exe'
@@ -1043,5 +1043,5 @@ PERL_VERSION='~PERL_VERSION~'
 PERL_API_REVISION='~PERL_API_REVISION~'
 PERL_API_SUBVERSION='~PERL_API_SUBVERSION~'
 PERL_API_VERSION='~PERL_API_VERSION~'
-PERL_PATCHLEVEL='~PERL_VERSION~'
+PERL_PATCHLEVEL='~PERL_PATCHLEVEL~'
 PERL_CONFIG_SH='true'
index 21829fd..67f9c20 100644 (file)
@@ -66,6 +66,15 @@ if (-e $pl_h) {
 else {
     die "Can't find $pl_h: $!";
 }
+
+my $patch_file = '../.patch';
+
+if (-e $patch_file) {
+    open my $fh, "<", $patch_file or die "Can't open $patch_file: $!";
+    chomp($opt{PERL_PATCHLEVEL} = <$fh>);
+    close $fh;
+}
+
 $opt{VERSION} = "$opt{PERL_REVISION}.$opt{PERL_VERSION}.$opt{PERL_SUBVERSION}";
 $opt{INST_VER} =~ s|~VERSION~|$opt{VERSION}|g;
 $opt{'version_patchlevel_string'} = "version $opt{PERL_VERSION} subversion $opt{PERL_SUBVERSION}";