[project @ 2002-10-08 08:03:01 by wolfgang]
authorwolfgang <unknown>
Tue, 8 Oct 2002 08:03:02 +0000 (08:03 +0000)
committerwolfgang <unknown>
Tue, 8 Oct 2002 08:03:02 +0000 (08:03 +0000)
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
include/HsBase.h

index f4ebb0b..8866bf5 100644 (file)
@@ -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
index 7f2e633..0fcc616 100644 (file)
@@ -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; }