diff options
author | Ian Lynagh <igloo@earth.li> | 2011-11-26 16:16:27 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-11-28 17:03:39 +0000 |
commit | 73c4ff58df92250cbf017efa5c4e3fa7f861a2a9 (patch) | |
tree | f6b1486e540fcdfc67075dad521b550c6dce4738 /libraries/base | |
parent | ff20d5775fa0b528e12054f40150e081428a4f02 (diff) | |
download | haskell-73c4ff58df92250cbf017efa5c4e3fa7f861a2a9.tar.gz |
Convert come FFI bindings to use the capi calling convention
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/System/Posix/Internals.hs | 8 | ||||
-rw-r--r-- | libraries/base/include/HsBase.h | 26 |
2 files changed, 4 insertions, 30 deletions
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs index 6436953eff..fe63dc5477 100644 --- a/libraries/base/System/Posix/Internals.hs +++ b/libraries/base/System/Posix/Internals.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface, CApiFFI #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- @@ -480,10 +480,10 @@ foreign import ccall unsafe "HsBase.h mkfifo" foreign import ccall unsafe "HsBase.h pipe" c_pipe :: Ptr CInt -> IO CInt -foreign import ccall unsafe "HsBase.h __hscore_sigemptyset" +foreign import capi unsafe "HsBase.h sigemptyset" c_sigemptyset :: Ptr CSigset -> IO CInt -foreign import ccall unsafe "HsBase.h __hscore_sigaddset" +foreign import capi unsafe "HsBase.h sigaddset" c_sigaddset :: Ptr CSigset -> CInt -> IO CInt foreign import ccall unsafe "HsBase.h sigprocmask" @@ -495,7 +495,7 @@ foreign import ccall unsafe "HsBase.h tcgetattr" foreign import ccall unsafe "HsBase.h tcsetattr" c_tcsetattr :: CInt -> CInt -> Ptr CTermios -> IO CInt -foreign import ccall unsafe "HsBase.h __hscore_utime" +foreign import capi unsafe "HsBase.h utime" c_utime :: CString -> Ptr CUtimbuf -> IO CInt foreign import ccall unsafe "HsBase.h waitpid" diff --git a/libraries/base/include/HsBase.h b/libraries/base/include/HsBase.h index d45ee99799..fd619a8222 100644 --- a/libraries/base/include/HsBase.h +++ b/libraries/base/include/HsBase.h @@ -181,32 +181,6 @@ INLINE int __hscore_s_issock(mode_t m) { return S_ISSOCK(m); } #endif #endif -#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32) -INLINE int -__hscore_sigemptyset( sigset_t *set ) -{ return sigemptyset(set); } - -INLINE int -__hscore_sigfillset( sigset_t *set ) -{ return sigfillset(set); } - -INLINE int -__hscore_sigaddset( sigset_t * set, int s ) -{ return sigaddset(set,s); } - -INLINE int -__hscore_sigdelset( sigset_t * set, int s ) -{ return sigdelset(set,s); } - -INLINE int -__hscore_sigismember( sigset_t * set, int s ) -{ return sigismember(set,s); } - -INLINE int -__hscore_utime( const char *file, const struct utimbuf *timep ) -{ return utime(file,timep); } -#endif - INLINE void * __hscore_memcpy_src_off( char *dst, char *src, int src_off, size_t sz ) { return memcpy(dst, src+src_off, sz); } |