[commit: process] master: Fix the build on Windows (1f4e1b0)
Ian Lynagh
igloo at earth.li
Sun Apr 28 00:34:44 CEST 2013
Repository : ssh://darcs.haskell.org//srv/darcs/packages/process
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/1f4e1b0a5ba7f14458c6e35dfd8e9f7fec7ee256
>---------------------------------------------------------------
commit 1f4e1b0a5ba7f14458c6e35dfd8e9f7fec7ee256
Author: Ian Lynagh <ian at well-typed.com>
Date: Sat Apr 27 22:00:10 2013 +0100
Fix the build on Windows
>---------------------------------------------------------------
System/Process.hs | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/System/Process.hs b/System/Process.hs
index e3aa98d..42d2fac 100644
--- a/System/Process.hs
+++ b/System/Process.hs
@@ -636,13 +636,18 @@ interruptProcessGroupOf ph = do
#if mingw32_HOST_OS
pid <- getProcessId h
generateConsoleCtrlEvent cTRL_BREAK_EVENT pid
-#elif MIN_VERSION_unix(2,5,0)
+-- We can't use an #elif here, because MIN_VERSION_unix isn't defined
+-- on Windows, so on Windows cpp fails:
+-- error: missing binary operator before token "("
+#else
+#if MIN_VERSION_unix(2,5,0)
-- getProcessGroupIDOf was added in unix-2.5.0.0
pgid <- getProcessGroupIDOf h
signalProcessGroup sigINT pgid
#else
signalProcessGroup sigINT h
#endif
+#endif
return ()
-- ----------------------------------------------------------------------------
More information about the ghc-commits
mailing list