From b2d9ac8135dd9128250193dd1a32a3ee75210934 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 26 Mar 2002 10:53:03 +0000 Subject: [PATCH] [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. --- GHC/Posix.hs | 4 ++-- include/HsBase.h | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) 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); } -- 1.7.10.4