--
-----------------------------------------------------------------------------
-#include "config.h"
+#include "ghcconfig.h"
module System.Posix.Signals (
#ifndef mingw32_TARGET_OS
backgroundWrite, sigTTOU,
userDefinedSignal1, sigUSR1,
userDefinedSignal2, sigUSR2,
-#if HAVE_SIGPOLL
+#ifdef SIGPOLL
pollableEvent, sigPOLL,
#endif
profilingTimerExpired, sigPROF,
sigTTOU = (#const SIGTTOU) :: CInt
sigUSR1 = (#const SIGUSR1) :: CInt
sigUSR2 = (#const SIGUSR2) :: CInt
-#if HAVE_SIGPOLL
+#ifdef SIGPOLL
sigPOLL = (#const SIGPOLL) :: CInt
#endif
sigPROF = (#const SIGPROF) :: CInt
foreign import ccall unsafe "__hsposix_SIGTTOU" sigTTOU :: CInt
foreign import ccall unsafe "__hsposix_SIGUSR1" sigUSR1 :: CInt
foreign import ccall unsafe "__hsposix_SIGUSR2" sigUSR2 :: CInt
-#if HAVE_SIGPOLL
+#ifdef SIGPOLL
foreign import ccall unsafe "__hsposix_SIGPOLL" sigPOLL :: CInt
#endif
foreign import ccall unsafe "__hsposix_SIGPROF" sigPROF :: CInt
userDefinedSignal2 :: Signal
userDefinedSignal2 = sigUSR2
-#if HAVE_SIGPOLL
+#ifdef SIGPOLL
pollableEvent :: Signal
pollableEvent = sigPOLL
#endif
raiseSignal :: Signal -> IO ()
raiseSignal sig = throwErrnoIfMinus1_ "raiseSignal" (c_raise sig)
+#if defined(__GLASGOW_HASKELL__) && (defined(openbsd_TARGET_OS) || defined(freebsd_TARGET_OS))
+foreign import ccall unsafe "genericRaise"
+ c_raise :: CInt -> IO CInt
+#else
foreign import ccall unsafe "raise"
c_raise :: CInt -> IO CInt
+#endif
#ifdef __GLASGOW_HASKELL__
data Handler = Default