This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In makedef.pl, move config.sh to the loop that prepends ..\ to files on win32.
authorNicholas Clark <nick@ccl4.org>
Sat, 16 Jul 2011 20:35:49 +0000 (21:35 +0100)
committerNicholas Clark <nick@ccl4.org>
Sun, 24 Jul 2011 08:30:06 +0000 (10:30 +0200)
Previously the win32|wince specific block that opens config.sh added ..\ in
the open call and the error message. No other code uses $config_sh, the variable
holding the path to config.sh, so it's quite safe to prepend ..\ in the existing
loop that processes most other files.

makedef.pl

index 21b37f5..0f47ffb 100644 (file)
@@ -112,7 +112,8 @@ if ($PLATFORM eq 'aix') {
 }
 elsif ($PLATFORM =~ /^win(?:32|ce)$/ || $PLATFORM eq 'netware') {
     $CCTYPE = "MSVC" unless defined $CCTYPE;
-    foreach ($intrpvar_h, $perlvars_h, $global_sym, $globvar_sym, $perlio_sym) {
+    foreach ($intrpvar_h, $perlvars_h, $global_sym, $globvar_sym, $perlio_sym
+            $config_sh) {
        s!^!..\\!;
     }
 }
@@ -140,7 +141,7 @@ unless ($PLATFORM eq 'win32' || $PLATFORM eq 'wince' || $PLATFORM eq 'netware')
     close(CFG);
 }
 if ($PLATFORM eq 'win32' || $PLATFORM eq 'wince') {
-    open(CFG,"<..\\$config_sh") || die "Cannot open ..\\$config_sh: $!\n";
+    open(CFG, '<', $config_sh) || die "Cannot open $config_sh: $!\n";
     if ((join '', <CFG>) =~ /^static_ext='(.*)'$/m) {
         $static_ext = $1;
     }