From 08617e73af61459c9ccc6072b343fe88e48a9baf Mon Sep 17 00:00:00 2001 From: Clemens Fruhwirth Date: Mon, 13 Oct 2008 16:12:20 +0000 Subject: [PATCH] Import n_capabilities via import symbol when linking dynamically --- GHC/Conc.lhs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GHC/Conc.lhs b/GHC/Conc.lhs index 9e0969d..0c87603 100644 --- a/GHC/Conc.lhs +++ b/GHC/Conc.lhs @@ -239,8 +239,11 @@ numCapabilities = unsafePerformIO $ do n <- peek n_capabilities return (fromIntegral n) +#if defined(mingw32_HOST_OS) && defined(__PIC__) +foreign import ccall "_imp__n_capabilities" n_capabilities :: Ptr CInt +#else foreign import ccall "&n_capabilities" n_capabilities :: Ptr CInt - +#endif childHandler :: SomeException -> IO () childHandler err = catchException (real_handler err) childHandler -- 1.7.10.4