[commit: process] master: Fix build on Win64 (26be9f2)
Ian Lynagh
igloo at earth.li
Wed Jul 3 17:21:43 CEST 2013
Repository : ssh://darcs.haskell.org//srv/darcs/packages/process
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/26be9f20ac45d8d5e5b3cb2582fc87a6b8a7b747
>---------------------------------------------------------------
commit 26be9f20ac45d8d5e5b3cb2582fc87a6b8a7b747
Author: Ian Lynagh <ian at well-typed.com>
Date: Tue Jul 2 16:47:06 2013 +0100
Fix build on Win64
>---------------------------------------------------------------
System/Process/Internals.hs | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/System/Process/Internals.hs b/System/Process/Internals.hs
index 0e8a305..266b81c 100644
--- a/System/Process/Internals.hs
+++ b/System/Process/Internals.hs
@@ -94,6 +94,16 @@ import System.FilePath
#include "HsProcessConfig.h"
#include "processFlags.h"
+#ifdef mingw32_HOST_OS
+# if defined(i386_HOST_ARCH)
+# define WINDOWS_CCONV stdcall
+# elif defined(x86_64_HOST_ARCH)
+# define WINDOWS_CCONV ccall
+# else
+# error Unknown mingw32 arch
+# endif
+#endif
+
#ifndef __HUGS__
-- ----------------------------------------------------------------------------
-- ProcessHandle type
@@ -156,7 +166,7 @@ processHandleFinaliser m =
closePHANDLE :: PHANDLE -> IO ()
closePHANDLE ph = c_CloseHandle ph
-foreign import stdcall unsafe "CloseHandle"
+foreign import WINDOWS_CCONV unsafe "CloseHandle"
c_CloseHandle
:: PHANDLE
-> IO ()
More information about the ghc-commits
mailing list