Fix #6109 : error Unknown mingw32 arch.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Fri, 18 May 2012 11:59:17 +0000 (21:59 +1000)
committerIan Lynagh <igloo@earth.li>
Fri, 18 May 2012 17:24:53 +0000 (18:24 +0100)
utils/runghc/runghc.hs

index 6dae543..d5dec28 100644 (file)
@@ -32,12 +32,16 @@ import Foreign
 import Foreign.C.String
 #endif
 
-#if defined(i386_HOST_ARCH)
-# define WINDOWS_CCONV stdcall
-#elif defined(x86_64_HOST_ARCH)
-# define WINDOWS_CCONV ccall
+#if defined(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
 #else
-# error Unknown mingw32 arch
+# define WINDOWS_CCONV
 #endif
 
 main :: IO ()