aboutsummaryrefslogtreecommitdiffhomepage
path: root/System
diff options
context:
space:
mode:
authorGravatar Herbert Valerio Riedel <hvr@gnu.org>2016-01-30 17:47:32 +0100
committerGravatar Herbert Valerio Riedel <hvr@gnu.org>2016-01-30 17:47:32 +0100
commit11eb5aabcc3c98eddf1b375c4184fe0df58d7eab (patch)
tree607047937b23032f97da86b1b172b05d6ac6eb2a /System
parent7fdf4cda3b229e2873a46e0482c83f52b714c5fe (diff)
Replace `<sys/wait.h>` macro wrappers with CApiFFI
Diffstat (limited to 'System')
-rw-r--r--System/Posix/Process/Internals.hs16
1 files changed, 9 insertions, 7 deletions
diff --git a/System/Posix/Process/Internals.hs b/System/Posix/Process/Internals.hs
index 19dc1c1..970bc9f 100644
--- a/System/Posix/Process/Internals.hs
+++ b/System/Posix/Process/Internals.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE CPP #-}
#ifdef __GLASGOW_HASKELL__
{-# LANGUAGE Trustworthy #-}
@@ -56,24 +57,25 @@ decipherWaitStatus wstat =
ioError (mkIOError illegalOperationErrorType
"waitStatus" Nothing Nothing)
-foreign import ccall unsafe "__hsunix_wifexited"
+
+foreign import capi unsafe "HsUnix.h WIFEXITED"
c_WIFEXITED :: CInt -> CInt
-foreign import ccall unsafe "__hsunix_wexitstatus"
+foreign import capi unsafe "HsUnix.h WEXITSTATUS"
c_WEXITSTATUS :: CInt -> CInt
-foreign import ccall unsafe "__hsunix_wifsignaled"
+foreign import capi unsafe "HsUnix.h WIFSIGNALED"
c_WIFSIGNALED :: CInt -> CInt
-foreign import ccall unsafe "__hsunix_wtermsig"
+foreign import capi unsafe "HsUnix.h WTERMSIG"
c_WTERMSIG :: CInt -> CInt
-foreign import ccall unsafe "__hsunix_wifstopped"
+foreign import capi unsafe "HsUnix.h WIFSTOPPED"
c_WIFSTOPPED :: CInt -> CInt
-foreign import ccall unsafe "__hsunix_wstopsig"
+foreign import capi unsafe "HsUnix.h WSTOPSIG"
c_WSTOPSIG :: CInt -> CInt
-foreign import ccall unsafe "__hsunix_wcoredump"
+foreign import capi unsafe "HsUnix.h WCOREDUMP"
c_WCOREDUMP :: CInt -> CInt