Subject: | [patch] don't complain about architecture mismatch on win32 |
In some situations on Win32, the "pthinks" path can be a Windows "short"
path whereas the "cthinks" path can be a "long" path. This patch
normalizes both before comparison on Win32.
--- MakeMaker.pm.orig Fri Feb 22 23:25:52 2008
+++ MakeMaker.pm Sat Feb 23 07:03:39 2008
@@ -34,6 +34,8 @@
my $Is_VMS = $^O eq 'VMS';
my $Is_Win32 = $^O eq 'MSWin32';
+if ( $Is_Win32 ) { require Win32 }
+
# Our filename for diagnostic and debugging purposes. More reliable
# than %INC (think caseless filesystems)
$Filename = __FILE__;
@@ -534,7 +536,8 @@
my($cthinks) = $self->catfile($Config{'archlibexp'},'Config.pm');
$pthinks = VMS::Filespec::vmsify($pthinks) if $Is_VMS;
if ($pthinks ne $cthinks &&
- !($Is_Win32 and lc($pthinks) eq lc($cthinks))) {
+ !($Is_Win32 and lc(Win32::GetShortPath($pthinks))
+ eq lc(Win32::GetShortPath($cthinks)))) {
print "Have $pthinks expected $cthinks\n";
if ($Is_Win32) {
$pthinks =~ s![/\\]Config\.pm$!!i; $pthinks =~ s!.*[/\\]!!;