-- regular imports
-- ---------------
+import System.IO.Unsafe( unsafePerformIO )
+import Foreign.Storable
import Foreign.Ptr
import Foreign.C.Types
import Foreign.C.String
-- This function exists because errno is a variable on some systems, but on
-- Windows it is a macro for a function...
-- [yes, global variables and thread safety don't really go hand-in-hand. -- sof]
-foreign import ccall unsafe "ghcErrno" _errno :: Ptr CInt
+foreign import ccall unsafe "HsBase.h ghcErrno" _errno :: Ptr CInt
-- Haskell representation for "errno" values
--
return (userError (loc ++ ": " ++ str ++ maybe "" (": "++) maybeName))
#endif
-foreign import ccall unsafe strerror :: Errno -> IO (Ptr CChar)
+foreign import ccall unsafe "string.h" strerror :: Errno -> IO (Ptr CChar)
-- Dreadfully tedious callouts to wrappers which define the