From 9a770bbea938e9469706eb56028de08335b3e808 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Tue, 8 Oct 2002 08:03:02 +0000 Subject: [PATCH] [project @ 2002-10-08 08:03:01 by wolfgang] Make the new Posix bindings compile on Mac OS X. Most notable, Mac OS X lacks *) lchown *) SIGPOLL I don't know of a replacement of either, so they are just left out when they are not detected by configure. --- System/Posix/Signals.hsc | 6 ++++++ include/HsBase.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/System/Posix/Signals.hsc b/System/Posix/Signals.hsc index f4ebb0b..8866bf5 100644 --- a/System/Posix/Signals.hsc +++ b/System/Posix/Signals.hsc @@ -41,7 +41,9 @@ module System.Posix.Signals ( backgroundWrite, sigTTOU, userDefinedSignal1, sigUSR1, userDefinedSignal2, sigUSR2, +#if HAVE_SIGPOLL pollableEvent, sigPOLL, +#endif profilingTimerExpired, sigPROF, badSystemCall, sigSYS, breakpointTrap, sigTRAP, @@ -121,7 +123,9 @@ 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 +#if HAVE_SIGPOLL foreign import ccall "__hsposix_SIGPOLL" sigPOLL :: CInt +#endif foreign import ccall "__hsposix_SIGPROF" sigPROF :: CInt foreign import ccall "__hsposix_SIGSYS" sigSYS :: CInt foreign import ccall "__hsposix_SIGTRAP" sigTRAP :: CInt @@ -192,8 +196,10 @@ userDefinedSignal1 = sigUSR1 userDefinedSignal2 :: Signal userDefinedSignal2 = sigUSR2 +#if HAVE_SIGPOLL pollableEvent :: Signal pollableEvent = sigPOLL +#endif profilingTimerExpired :: Signal profilingTimerExpired = sigPROF diff --git a/include/HsBase.h b/include/HsBase.h index 7f2e633..0fcc616 100644 --- a/include/HsBase.h +++ b/include/HsBase.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HsBase.h,v 1.16 2002/10/03 13:04:58 panne Exp $ + * $Id: HsBase.h,v 1.17 2002/10/08 08:03:02 wolfgang Exp $ * * (c) The University of Glasgow 2001-2002 * @@ -623,7 +623,9 @@ INLINE int __hsposix_SIGTTIN() { return SIGTTIN; } INLINE int __hsposix_SIGTTOU() { return SIGTTOU; } INLINE int __hsposix_SIGUSR1() { return SIGUSR1; } INLINE int __hsposix_SIGUSR2() { return SIGUSR2; } +#if HAVE_SIGPOLL INLINE int __hsposix_SIGPOLL() { return SIGPOLL; } +#endif INLINE int __hsposix_SIGPROF() { return SIGPROF; } INLINE int __hsposix_SIGSYS() { return SIGSYS; } INLINE int __hsposix_SIGTRAP() { return SIGTRAP; } -- 1.7.10.4