diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-12-01 16:58:34 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-12-01 17:59:40 -0500 |
commit | 7fafb84e9fd61417094f41b4a5d88bbef6df7aa5 (patch) | |
tree | 8dd6b0fa1c996cd72c23ab64260bbdbf1f25fd5e /testsuite/tests/concurrent | |
parent | a934e2569c6cd5f24ff3302d48a44a4bdd674c97 (diff) | |
download | haskell-7fafb84e9fd61417094f41b4a5d88bbef6df7aa5.tar.gz |
testsuite/conc059: Don't attempt to use stdcall where it isn't supported
Test Plan: Validate on 64-bit Windows
Reviewers: geekosaur, austin, erikd, Phyx
Reviewed By: Phyx
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2781
Diffstat (limited to 'testsuite/tests/concurrent')
-rw-r--r-- | testsuite/tests/concurrent/should_run/conc059.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/testsuite/tests/concurrent/should_run/conc059.hs b/testsuite/tests/concurrent/should_run/conc059.hs index bed28d27cb..148c0ba63d 100644 --- a/testsuite/tests/concurrent/should_run/conc059.hs +++ b/testsuite/tests/concurrent/should_run/conc059.hs @@ -19,7 +19,15 @@ f x = do foreign export ccall "f" f :: Int -> IO () #ifdef mingw32_HOST_OS -foreign import stdcall safe "Sleep" _sleep :: Int -> IO () +# 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 + +foreign import WINDOWS_CCONV safe "Sleep" _sleep :: Int -> IO () usleep n = _sleep (n `quot` 1000) #else foreign import ccall safe "usleep" usleep :: Int -> IO () |