--- a/Source/WebCore/bindings/scripts/preprocess-idls.pl
+++ b/Source/WebCore/bindings/scripts/preprocess-idls.pl
@@ -179,9 +179,9 @@
 sub CygwinPathIfNeeded
 {
     my $path = shift;
-    if ($path && $Config{osname} eq "cygwin") {
+    if ($path && ($Config{osname} eq "cygwin" || $Config{osname} eq "msys")) {
         if (not $cygwinPathAdded) {
-            $ENV{PATH} = "$ENV{PATH}:/cygdrive/c/cygwin/bin";
+            $ENV{PATH} = "$ENV{PATH}:/usr/bin";
             $cygwinPathAdded = 1; 
         }
         chomp($path = `cygpath -u '$path'`);
--- a/Source/WebCore/bindings/scripts/preprocessor.pm
+++ b/Source/WebCore/bindings/scripts/preprocessor.pm
@@ -88,15 +88,12 @@
 
     my $pid = 0;
     if ($Config{osname} eq "cygwin") {
-        $ENV{PATH} = "$ENV{PATH}:/cygdrive/c/cygwin/bin";
+        $ENV{PATH} = "$ENV{PATH}:/usr/bin";
         my @preprocessorAndFlags;
         if ($preprocessor eq "/usr/bin/gcc") {
             @preprocessorAndFlags = split(' ', $preprocessor);
         } else {        
-            $preprocessor =~ /"(.*)"/;
-            chomp(my $preprocessor = `cygpath -u '$1'`) if (defined $1);
-            chomp($fileName = `cygpath -w '$fileName'`);
-            @preprocessorAndFlags = ($preprocessor, "/nologo", "/EP");
+            @preprocessorAndFlags = ($preprocessor);
         }
         # This call can fail if Windows rebases cygwin, so retry a few times until it succeeds.
         for (my $tries = 0; !$pid && ($tries < 20); $tries++) {
