add Control.Monad.Instances to nhc98 build
[haskell-directory.git] / cbits / runProcess.c
index a0c2453..39597b7 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "HsBase.h"
 
-#if defined(mingw32_HOST_OS)
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
 #include <windows.h>
 #include <stdlib.h>
 #endif
@@ -23,7 +23,7 @@
 #include <signal.h>
 #endif
 
-#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
+#if !(defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32))
 /* ----------------------------------------------------------------------------
    UNIX versions
    ------------------------------------------------------------------------- */
@@ -216,7 +216,7 @@ int waitForProcess (ProcHandle handle)
     else
        if (WIFSIGNALED(wstat))
        {
-           errno = EINTR;
+           return wstat;
        }
        else
        {