[project @ 2002-03-26 10:53:03 by simonmar]
authorsimonmar <unknown>
Tue, 26 Mar 2002 10:53:03 +0000 (10:53 +0000)
committersimonmar <unknown>
Tue, 26 Mar 2002 10:53:03 +0000 (10:53 +0000)
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
include/HsBase.h

index f69d57b..f46b6cf 100644 (file)
@@ -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"
index 1a73ebb..3b88d23 100644 (file)
@@ -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); }