summaryrefslogtreecommitdiff
path: root/testsuite/tests/ffi
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-05-03 12:20:05 +0100
committerIan Lynagh <igloo@earth.li>2012-05-03 12:20:05 +0100
commitb806bd2da7d13dedc73ff8c1016c1de0aa2bc26b (patch)
treead15354a794529301d6a3b0bf8dfb939c6ae9a19 /testsuite/tests/ffi
parent9d077912f0aeb83c88296a38d8f8d73c1d686491 (diff)
downloadhaskell-b806bd2da7d13dedc73ff8c1016c1de0aa2bc26b.tar.gz
Tweak 4038 for Win64
Windows has a smaller C stack than other OSes
Diffstat (limited to 'testsuite/tests/ffi')
-rw-r--r--testsuite/tests/ffi/should_run/4038.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/testsuite/tests/ffi/should_run/4038.hs b/testsuite/tests/ffi/should_run/4038.hs
index 9250fb9082..8f52745aa7 100644
--- a/testsuite/tests/ffi/should_run/4038.hs
+++ b/testsuite/tests/ffi/should_run/4038.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE ForeignFunctionInterface, CPP #-}
import Foreign
import Foreign.C
@@ -21,8 +21,13 @@ foreign import ccall "dynamic" f_io :: FunPtr IOF -> IOF
--
-- On *nix systems, the C stack size can be examined and changed by
-- the "ulimit -s" command.
---
+
+-- Stack size on Windows isn't as generous as on other OSes
+#if defined(mingw32_HOST_OS) && defined(x86_64_HOST_ARCH)
+n = 100
+#else
n = 300
+#endif
f :: Int -> IO Int
f 0 = return 42