projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94616fc
)
Import n_capabilities via import symbol when linking dynamically
author
Clemens Fruhwirth
<clemens@endorphin.org>
Mon, 13 Oct 2008 16:12:20 +0000
(16:12 +0000)
committer
Clemens Fruhwirth
<clemens@endorphin.org>
Mon, 13 Oct 2008 16:12:20 +0000
(16:12 +0000)
GHC/Conc.lhs
patch
|
blob
|
history
diff --git
a/GHC/Conc.lhs
b/GHC/Conc.lhs
index
9e0969d
..
0c87603
100644
(file)
--- 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