diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2016-01-31 00:09:09 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2016-01-31 00:19:53 +0100 |
commit | 364604035c60fe5c21cda2e2f37027ebadc81ebd (patch) | |
tree | fb126e1ae26337f3866930967b48bb20153a4b6a /System | |
parent | 2ddf4b2b7bf41f878bc7d8a1afa49126710f524c (diff) |
Replace `__hscore_{set,get}rlimit` wrappers with CApiFFI
Diffstat (limited to 'System')
-rw-r--r-- | System/Posix/Resource.hsc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/System/Posix/Resource.hsc b/System/Posix/Resource.hsc index 3418ecf..309d394 100644 --- a/System/Posix/Resource.hsc +++ b/System/Posix/Resource.hsc @@ -1,3 +1,4 @@ +{-# LANGUAGE CApiFFI #-} #if __GLASGOW_HASKELL__ >= 709 {-# LANGUAGE Safe #-} #else @@ -57,10 +58,10 @@ data ResourceLimit data {-# CTYPE "struct rlimit" #-} RLimit -foreign import ccall unsafe "HsUnix.h __hscore_getrlimit" +foreign import capi unsafe "HsUnix.h getrlimit" c_getrlimit :: CInt -> Ptr RLimit -> IO CInt -foreign import ccall unsafe "HsUnix.h __hscore_setrlimit" +foreign import capi unsafe "HsUnix.h setrlimit" c_setrlimit :: CInt -> Ptr RLimit -> IO CInt getResourceLimit :: Resource -> IO ResourceLimits |