Fix for building with MinGW under Cygwin
authorYitzchak Scott-Thoennes <sthoenna@efn.org>
Thu, 13 Jan 2005 16:11:36 +0000 (08:11 -0800)
committerSteve Hay <SteveHay@planit.com>
Mon, 17 Jan 2005 17:55:02 +0000 (17:55 +0000)
Subject: [PATCH] building win32 perl with cygwin's mingw (was: Re: [PATCH] Re: lib/Config/Extensions.t fails on Win32)
Message-ID: <20050114001136.GC2516@efn.org>

p4raw-id: //depot/perl@23807

ext/Errno/Errno_pm.PL

index de4d549..20eab28 100644 (file)
@@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
 use Config;
 use strict;
 
-our $VERSION = "1.09_00";
+our $VERSION = "1.09_01";
 
 my %err = ();
 my %wsa = ();
@@ -20,6 +20,12 @@ unlink "errno.c" if -f "errno.c";
 sub process_file {
     my($file) = @_;
 
+    # for win32 perl under cygwin, we need to get a windows pathname
+    if ($^O eq 'MSWin32' && $Config{cc} =~ /\B-mno-cygwin\b/ &&
+        defined($file) && !-f $file) {
+        chomp($file = `cygpath -w "$file"`);
+    }
+
     return unless defined $file and -f $file;
 #   warn "Processing $file\n";