summaryrefslogtreecommitdiff
path: root/libraries/base/Debug
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-05-09 14:53:34 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-05-09 14:53:34 +0000
commite6a38b39a74c451c65f1dec1b4522e1d1e3c5c24 (patch)
treeb162530247265f989140e0dbedcd3877ad75d12a /libraries/base/Debug
parente2294ec140f9cc296774722a3cb57ba883e8088e (diff)
downloadhaskell-e6a38b39a74c451c65f1dec1b4522e1d1e3c5c24.tar.gz
Avoid calling varargs functions using the FFI
Calling varargs functions is explicitly deprecated according to the FFI specification. It used to work, just about, but it broke with the recent changes to the via-C backend to not use header files.
Diffstat (limited to 'libraries/base/Debug')
-rw-r--r--libraries/base/Debug/Trace.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/libraries/base/Debug/Trace.hs b/libraries/base/Debug/Trace.hs
index c30c8111d1..742044e4d4 100644
--- a/libraries/base/Debug/Trace.hs
+++ b/libraries/base/Debug/Trace.hs
@@ -41,7 +41,9 @@ putTraceMsg msg = do
withCString msg $ \cmsg ->
debugBelch cfmt cmsg
-foreign import ccall unsafe "RtsMessages.h debugBelch"
+-- don't use debugBelch() directly, because we cannot call varargs functions
+-- using the FFI.
+foreign import ccall unsafe "HsBase.h debugBelch2"
debugBelch :: CString -> CString -> IO ()
#endif