Skip to content
Snippets Groups Projects
Commit a55cb030 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Use capi some more (part of #5480)

parent e33f5019
No related branches found
No related tags found
No related merge requests found
......@@ -206,7 +206,7 @@ foreign import ccall unsafe "__hscore_open"
closeFd :: Fd -> IO ()
closeFd (Fd fd) = throwErrnoIfMinus1_ "closeFd" (c_close fd)
foreign import ccall unsafe "HsBase.h close"
foreign import ccall unsafe "HsUnix.h close"
c_close :: CInt -> IO CInt
-- -----------------------------------------------------------------------------
......@@ -318,10 +318,10 @@ setFdOption (Fd fd) opt val = do
_ -> ((#const F_GETFL),(#const F_SETFL))
opt_val = fdOption2Int opt
foreign import ccall unsafe "HsBase.h fcntl_read"
foreign import ccall unsafe "HsUnix.h fcntl_read"
c_fcntl_read :: CInt -> CInt -> IO CInt
foreign import ccall unsafe "HsBase.h fcntl_write"
foreign import ccall unsafe "HsUnix.h fcntl_write"
c_fcntl_write :: CInt -> CInt -> CLong -> IO CInt
-- -----------------------------------------------------------------------------
......@@ -359,7 +359,7 @@ getLock (Fd fd) lock =
type CFLock = ()
foreign import ccall unsafe "HsBase.h fcntl_lock"
foreign import ccall unsafe "HsUnix.h fcntl_lock"
c_fcntl_lock :: CInt -> CInt -> Ptr CFLock -> IO CInt
allocaLock :: FileLock -> (Ptr CFLock -> IO a) -> IO a
......
......@@ -597,8 +597,8 @@ awaitSignal maybe_sigset = do
-- (-1) with errno set to EINTR.
-- XXX My manpage says it can also return EFAULT. And why is ignoring
-- EINTR the right thing to do?
foreign import ccall unsafe "sigsuspend"
foreign import capi unsafe "HsUnix.h sigsuspend"
c_sigsuspend :: Ptr CSigset -> IO CInt
#endif
......@@ -612,16 +612,16 @@ foreign import ccall unsafe "sigfillset"
foreign import ccall unsafe "sigismember"
c_sigismember :: Ptr CSigset -> CInt -> IO CInt
#else
foreign import capi unsafe "HsBase.h sigdelset"
foreign import capi unsafe "HsUnix.h sigdelset"
c_sigdelset :: Ptr CSigset -> CInt -> IO CInt
foreign import capi unsafe "HsBase.h sigfillset"
foreign import capi unsafe "HsUnix.h sigfillset"
c_sigfillset :: Ptr CSigset -> IO CInt
foreign import capi unsafe "HsBase.h sigismember"
foreign import capi unsafe "HsUnix.h sigismember"
c_sigismember :: Ptr CSigset -> CInt -> IO CInt
#endif /* __HUGS__ */
foreign import ccall unsafe "sigpending"
foreign import capi unsafe "HsUnix.h sigpending"
c_sigpending :: Ptr CSigset -> IO CInt
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment