-foreign import ccall "__hsposix_SIGABRT" sigABRT :: CInt
-foreign import ccall "__hsposix_SIGALRM" sigALRM :: CInt
-foreign import ccall "__hsposix_SIGBUS" sigBUS :: CInt
-foreign import ccall "__hsposix_SIGCHLD" sigCHLD :: CInt
-foreign import ccall "__hsposix_SIGCONT" sigCONT :: CInt
-foreign import ccall "__hsposix_SIGFPE" sigFPE :: CInt
-foreign import ccall "__hsposix_SIGHUP" sigHUP :: CInt
-foreign import ccall "__hsposix_SIGILL" sigILL :: CInt
-foreign import ccall "__hsposix_SIGINT" sigINT :: CInt
-foreign import ccall "__hsposix_SIGKILL" sigKILL :: CInt
-foreign import ccall "__hsposix_SIGPIPE" sigPIPE :: CInt
-foreign import ccall "__hsposix_SIGQUIT" sigQUIT :: CInt
-foreign import ccall "__hsposix_SIGSEGV" sigSEGV :: CInt
-foreign import ccall "__hsposix_SIGSTOP" sigSTOP :: CInt
-foreign import ccall "__hsposix_SIGTERM" sigTERM :: CInt
-foreign import ccall "__hsposix_SIGTSTP" sigTSTP :: CInt
-foreign import ccall "__hsposix_SIGTTIN" sigTTIN :: CInt
-foreign import ccall "__hsposix_SIGTTOU" sigTTOU :: CInt
-foreign import ccall "__hsposix_SIGUSR1" sigUSR1 :: CInt
-foreign import ccall "__hsposix_SIGUSR2" sigUSR2 :: CInt
-foreign import ccall "__hsposix_SIGPOLL" sigPOLL :: CInt
-foreign import ccall "__hsposix_SIGPROF" sigPROF :: CInt
-foreign import ccall "__hsposix_SIGSYS" sigSYS :: CInt
-foreign import ccall "__hsposix_SIGTRAP" sigTRAP :: CInt
-foreign import ccall "__hsposix_SIGURG" sigURG :: CInt
-foreign import ccall "__hsposix_SIGVTALRM" sigVTALRM :: CInt
-foreign import ccall "__hsposix_SIGXCPU" sigXCPU :: CInt
-foreign import ccall "__hsposix_SIGXFSZ" sigXFSZ :: CInt
+#ifdef __HUGS__
+sigABRT = (#const SIGABRT) :: CInt
+sigALRM = (#const SIGALRM) :: CInt
+sigBUS = (#const SIGBUS) :: CInt
+sigCHLD = (#const SIGCHLD) :: CInt
+sigCONT = (#const SIGCONT) :: CInt
+sigFPE = (#const SIGFPE) :: CInt
+sigHUP = (#const SIGHUP) :: CInt
+sigILL = (#const SIGILL) :: CInt
+sigINT = (#const SIGINT) :: CInt
+sigKILL = (#const SIGKILL) :: CInt
+sigPIPE = (#const SIGPIPE) :: CInt
+sigQUIT = (#const SIGQUIT) :: CInt
+sigSEGV = (#const SIGSEGV) :: CInt
+sigSTOP = (#const SIGSTOP) :: CInt
+sigTERM = (#const SIGTERM) :: CInt
+sigTSTP = (#const SIGTSTP) :: CInt
+sigTTIN = (#const SIGTTIN) :: CInt
+sigTTOU = (#const SIGTTOU) :: CInt
+sigUSR1 = (#const SIGUSR1) :: CInt
+sigUSR2 = (#const SIGUSR2) :: CInt
+#ifdef SIGPOLL
+sigPOLL = (#const SIGPOLL) :: CInt
+#endif
+sigPROF = (#const SIGPROF) :: CInt
+sigSYS = (#const SIGSYS) :: CInt
+sigTRAP = (#const SIGTRAP) :: CInt
+sigURG = (#const SIGURG) :: CInt
+sigVTALRM = (#const SIGVTALRM) :: CInt
+sigXCPU = (#const SIGXCPU) :: CInt
+sigXFSZ = (#const SIGXFSZ) :: CInt
+#else
+foreign import ccall unsafe "__hsposix_SIGABRT" sigABRT :: CInt
+foreign import ccall unsafe "__hsposix_SIGALRM" sigALRM :: CInt
+foreign import ccall unsafe "__hsposix_SIGBUS" sigBUS :: CInt
+foreign import ccall unsafe "__hsposix_SIGCHLD" sigCHLD :: CInt
+foreign import ccall unsafe "__hsposix_SIGCONT" sigCONT :: CInt
+foreign import ccall unsafe "__hsposix_SIGFPE" sigFPE :: CInt
+foreign import ccall unsafe "__hsposix_SIGHUP" sigHUP :: CInt
+foreign import ccall unsafe "__hsposix_SIGILL" sigILL :: CInt
+foreign import ccall unsafe "__hsposix_SIGINT" sigINT :: CInt
+foreign import ccall unsafe "__hsposix_SIGKILL" sigKILL :: CInt
+foreign import ccall unsafe "__hsposix_SIGPIPE" sigPIPE :: CInt
+foreign import ccall unsafe "__hsposix_SIGQUIT" sigQUIT :: CInt
+foreign import ccall unsafe "__hsposix_SIGSEGV" sigSEGV :: CInt
+foreign import ccall unsafe "__hsposix_SIGSTOP" sigSTOP :: CInt
+foreign import ccall unsafe "__hsposix_SIGTERM" sigTERM :: CInt
+foreign import ccall unsafe "__hsposix_SIGTSTP" sigTSTP :: CInt
+foreign import ccall unsafe "__hsposix_SIGTTIN" sigTTIN :: 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
+#ifdef SIGPOLL
+foreign import ccall unsafe "__hsposix_SIGPOLL" sigPOLL :: CInt
+#endif
+foreign import ccall unsafe "__hsposix_SIGPROF" sigPROF :: CInt
+foreign import ccall unsafe "__hsposix_SIGSYS" sigSYS :: CInt
+foreign import ccall unsafe "__hsposix_SIGTRAP" sigTRAP :: CInt
+foreign import ccall unsafe "__hsposix_SIGURG" sigURG :: CInt
+foreign import ccall unsafe "__hsposix_SIGVTALRM" sigVTALRM :: CInt
+foreign import ccall unsafe "__hsposix_SIGXCPU" sigXCPU :: CInt
+foreign import ccall unsafe "__hsposix_SIGXFSZ" sigXFSZ :: CInt
+#endif /* __HUGS__ */