Repository : ssh://darcs.haskell.org//srv/darcs/packages/base On branch : master
http://hackage.haskell.org/trac/ghc/changeset/7881b128ae5bdaf57cbd87abca5ee2ffc72ca6f7 >--------------------------------------------------------------- commit 7881b128ae5bdaf57cbd87abca5ee2ffc72ca6f7 Author: Ian Lynagh <[email protected]> Date: Tue Feb 21 17:20:21 2012 +0000 Redo the sigset capi changes Now that we have the CTYPE pragma we can do this in such a way that it doesn't break the build on OS X. >--------------------------------------------------------------- System/Posix/Internals.hs | 8 ++++---- include/HsBase.h | 22 ---------------------- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs index 2c2b965..7abded4 100644 --- a/System/Posix/Internals.hs +++ b/System/Posix/Internals.hs @@ -90,7 +90,7 @@ type CGroup = () type CLconv = () type CPasswd = () type CSigaction = () -type CSigset = () +type {-# CTYPE "sigset_t" #-} CSigset = () type CStat = () type CTermios = () type CTm = () @@ -480,13 +480,13 @@ 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 "signal.h sigemptyset" c_sigemptyset :: Ptr CSigset -> IO CInt -foreign import ccall unsafe "HsBase.h __hscore_sigaddset" +foreign import capi unsafe "signal.h sigaddset" c_sigaddset :: Ptr CSigset -> CInt -> IO CInt -foreign import ccall unsafe "HsBase.h sigprocmask" +foreign import capi unsafe "signal.h sigprocmask" c_sigprocmask :: CInt -> Ptr CSigset -> Ptr CSigset -> IO CInt foreign import ccall unsafe "HsBase.h tcgetattr" diff --git a/include/HsBase.h b/include/HsBase.h index cc27cc3..bad3a4b 100644 --- a/include/HsBase.h +++ b/include/HsBase.h @@ -181,28 +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); } -#endif - INLINE void * __hscore_memcpy_src_off( char *dst, char *src, int src_off, size_t sz ) { return memcpy(dst, src+src_off, sz); } _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
