Commit 7fafb84e authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

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
parent a934e256
......@@ -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 ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment