From: simonmar Date: Tue, 26 Mar 2002 10:53:03 +0000 (+0000) Subject: [project @ 2002-03-26 10:53:03 by simonmar] X-Git-Tag: nhc98-1-18-release~1078 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b2d9ac8135dd9128250193dd1a32a3ee75210934;p=haskell-directory.git [project @ 2002-03-26 10:53:03 by simonmar] sigaddset() can be a macro, so add an wrapper around it (inlined in via-C mode). I didn't bother with the #ifdef darwin_TARGET_OS around this change since it doesn't hurt on other architectures. --- diff --git a/GHC/Posix.hs b/GHC/Posix.hs index f69d57b..f46b6cf 100644 --- a/GHC/Posix.hs +++ b/GHC/Posix.hs @@ -1,7 +1,7 @@ {-# OPTIONS -fno-implicit-prelude #-} -- --------------------------------------------------------------------------- --- $Id: Posix.hs,v 1.5 2002/03/26 10:44:32 simonmar Exp $ +-- $Id: Posix.hs,v 1.6 2002/03/26 10:53:03 simonmar Exp $ -- -- POSIX support layer for the standard libraries -- @@ -339,7 +339,7 @@ foreign import ccall unsafe "pathconf" foreign import ccall unsafe "pipe" c_pipe :: Ptr CInt -> IO CInt -foreign import ccall unsafe "sigaddset" +foreign import ccall unsafe "__hscore_sigaddset" c_sigaddset :: Ptr CSigset -> CInt -> IO CInt foreign import ccall unsafe "sigprocmask" diff --git a/include/HsBase.h b/include/HsBase.h index 1a73ebb..3b88d23 100644 --- a/include/HsBase.h +++ b/include/HsBase.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HsBase.h,v 1.4 2002/03/19 11:24:52 simonmar Exp $ + * $Id: HsBase.h,v 1.5 2002/03/26 10:53:03 simonmar Exp $ * * (c) The University of Glasgow 2001-2002 * @@ -179,6 +179,10 @@ StgWord64 stg_integerToWord64 (StgInt sa, StgByteArray /* Really: mp_limb_t* */ #define INLINE extern inline #endif +INLINE int +__hscore_sigaddset( sigset_t * set, int s ) +{ return sigaddset(set,s); } + INLINE int __hscore_s_isreg(m) { return S_ISREG(m); } INLINE int __hscore_s_isdir(m) { return S_ISDIR(m); } INLINE int __hscore_s_isfifo(m) { return S_ISFIFO(m); }