summaryrefslogtreecommitdiff
path: root/utils/runghc/runghc.hs
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2012-05-18 21:59:17 +1000
committerIan Lynagh <igloo@earth.li>2012-05-18 18:24:53 +0100
commitd0e2364b88238dae2bf5450f513fefec5faa7aff (patch)
treeaedc268e8b5ac3589699c4d2e9cb25684b3f856b /utils/runghc/runghc.hs
parent2b214ea1fc1134139fd10369062f3efcea4ff96b (diff)
downloadhaskell-d0e2364b88238dae2bf5450f513fefec5faa7aff.tar.gz
Fix #6109 : error Unknown mingw32 arch.
Diffstat (limited to 'utils/runghc/runghc.hs')
-rw-r--r--utils/runghc/runghc.hs14
1 files changed, 9 insertions, 5 deletions
diff --git a/utils/runghc/runghc.hs b/utils/runghc/runghc.hs
index 6dae543fe9..d5dec28bc4 100644
--- a/utils/runghc/runghc.hs
+++ b/utils/runghc/runghc.hs
@@ -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 ()