]> granicus.if.org Git - curl/commitdiff
quick hack to make it working again on Win32 - however we should consider to set...
authorGunter Knauf <gk@gknw.de>
Tue, 30 Aug 2005 18:37:08 +0000 (18:37 +0000)
committerGunter Knauf <gk@gknw.de>
Tue, 30 Aug 2005 18:37:08 +0000 (18:37 +0000)
tests/testcurl.pl

index 2a2a2c754636cf68c186b04539f9e9cc79d9e823..cc08b155a8e236c0b7254cd380483865b9ee96d9 100755 (executable)
@@ -412,20 +412,23 @@ if ($configurebuild) {
 }
 
 sub findinpath {
-    my $c;
-    my $e;
-    my $p=$ENV{'PATH'};
-    my @pa = split(":", $p);
-    for $c (@_) {
-        for $e (@pa) {
-            if( -x "$e/$c") {
-                return $c;
-            }
-        }
+  my $c;
+  my $e;
+  my $x='';
+  $x='.exe' if ($^O eq 'MSWin32');
+  my $s=':';
+  $s=';' if ($^O eq 'MSWin32');
+  my $p=$ENV{'PATH'};
+  my @pa = split($s, $p);
+  for $c (@_) {
+    for $e (@pa) {
+      if( -x "$e/$c$x") {
+        return $c;
+      }
     }
+  }
 }
 
-
 my $make = findinpath("gmake", "make", "nmake");
 if(!$make) {
     mydie "Couldn't find make in the PATH";