[commit: ghc] master: testsuite/conc059: Don't attempt to use stdcall where it isn't supported (7fafb84)

git at git.haskell.org git at git.haskell.org
Thu Dec 1 23:34:20 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7fafb84e9fd61417094f41b4a5d88bbef6df7aa5/ghc

>---------------------------------------------------------------

commit 7fafb84e9fd61417094f41b4a5d88bbef6df7aa5
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Dec 1 16:58:34 2016 -0500

    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


>---------------------------------------------------------------

7fafb84e9fd61417094f41b4a5d88bbef6df7aa5
 testsuite/tests/concurrent/should_run/conc059.hs | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/concurrent/should_run/conc059.hs b/testsuite/tests/concurrent/should_run/conc059.hs
index bed28d2..148c0ba 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 ()



More information about the ghc-commits mailing list