Fix assertion failure on failed magic eval - eg FETCH {eval'('}
[p5sagit/p5-mst-13.2.git] / win32 / FindExt.pm
index b73d777..298b44f 100644 (file)
@@ -14,9 +14,10 @@ my $ext;
 my %static;
 
 sub getcwd {
-    $ENV{'PWD'} = Win32::GetCwd();
-    $ENV{'PWD'} =~ s:\\:/:g ;
-    return $ENV{'PWD'};
+    $_ = `cd`;
+    chomp;
+    s:\\:/:g ;
+    return $ENV{'PWD'} = $_;
 }
 
 sub set_static_extensions
@@ -81,7 +82,7 @@ sub find_ext
     closedir $dh;
     for my $xxx (@items) {
         if ($xxx ne "DynaLoader") {
-            if (-f "$xxx/$xxx.xs") {
+            if (-f "$xxx/$xxx.xs" || -f "$xxx/$xxx.c" ) {
                 $ext{"$_[0]$xxx"} = $static{"$_[0]$xxx"} ? 'static' : 'dynamic';
             } elsif (-f "$xxx/Makefile.PL") {
                 $ext{"$_[0]$xxx"} = 'nonxs';