summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-12-04 13:20:40 +0000
committerIan Lynagh <igloo@earth.li>2011-12-04 13:20:40 +0000
commite4c93843aa0af97f547b2c23d47b46cae5a687bc (patch)
treee657455c5e183128bcb00ed97c8d031783838f24
parent631796d5940549124ecb433a120553f8c6a10bb4 (diff)
downloadhaskell-e4c93843aa0af97f547b2c23d47b46cae5a687bc.tar.gz
Roll back the sigset capi changes
They broken the build on OSX. See #2979.
-rw-r--r--libraries/base/System/Posix/Internals.hs6
-rw-r--r--libraries/base/include/HsBase.h22
2 files changed, 25 insertions, 3 deletions
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs
index a9c2eab89f..2c2b965256 100644
--- a/libraries/base/System/Posix/Internals.hs
+++ b/libraries/base/System/Posix/Internals.hs
@@ -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 capi unsafe "HsBase.h sigemptyset"
+foreign import ccall unsafe "HsBase.h __hscore_sigemptyset"
c_sigemptyset :: Ptr CSigset -> IO CInt
-foreign import capi unsafe "HsBase.h sigaddset"
+foreign import ccall unsafe "HsBase.h __hscore_sigaddset"
c_sigaddset :: Ptr CSigset -> CInt -> IO CInt
-foreign import capi unsafe "HsBase.h sigprocmask"
+foreign import ccall unsafe "HsBase.h sigprocmask"
c_sigprocmask :: CInt -> Ptr CSigset -> Ptr CSigset -> IO CInt
foreign import ccall unsafe "HsBase.h tcgetattr"
diff --git a/libraries/base/include/HsBase.h b/libraries/base/include/HsBase.h
index bad3a4b6be..cc27cc3e85 100644
--- a/libraries/base/include/HsBase.h
+++ b/libraries/base/include/HsBase.h
@@ -181,6 +181,28 @@ 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); }