Could someone please point me to the ticket so I can understand why
this is needed? The wrapper seems to be a no-op.

On Thu, Oct 11, 2012 at 4:22 PM, Ian Lynagh <[email protected]> wrote:
> Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
>
> On branch  : ghc-7.6
>
> http://hackage.haskell.org/trac/ghc/changeset/69446b156881056b09bfd2008114eaaf7257ae5a
>
>>---------------------------------------------------------------
>
> commit 69446b156881056b09bfd2008114eaaf7257ae5a
> Author: Iku Iwasa <[email protected]>
> Date:   Sun Sep 16 16:36:52 2012 +0900
>
>     FFI wrapper for kevent()
>
>>---------------------------------------------------------------
>
>  GHC/Event/KQueue.hsc |    2 +-
>  include/HsBase.h     |   13 +++++++++++++
>  2 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/GHC/Event/KQueue.hsc b/GHC/Event/KQueue.hsc
> index 68aade3..78b770a 100644
> --- a/GHC/Event/KQueue.hsc
> +++ b/GHC/Event/KQueue.hsc
> @@ -291,7 +291,7 @@ foreign import ccall safe "kevent64"
>      c_kevent64 :: QueueFd -> Ptr Event -> CInt -> Ptr Event -> CInt -> CUInt
>                 -> Ptr TimeSpec -> IO CInt
>  #elif defined(HAVE_KEVENT)
> -foreign import ccall safe "kevent"
> +foreign import ccall safe "__hscore_kevent"
>      c_kevent :: QueueFd -> Ptr Event -> CInt -> Ptr Event -> CInt
>               -> Ptr TimeSpec -> IO CInt
>  #else
> diff --git a/include/HsBase.h b/include/HsBase.h
> index 74ab816..99efde5 100644
> --- a/include/HsBase.h
> +++ b/include/HsBase.h
> @@ -155,6 +155,10 @@ extern HsWord64 getMonotonicUSec(void);
>  #include <sys/select.h>
>  #endif
>
> +#if HAVE_SYS_EVENT_H
> +#include <sys/event.h>
> +#endif
> +
>  /* in inputReady.c */
>  extern int fdReady(int fd, int write, int msecs, int isSock);
>
> @@ -541,6 +545,15 @@ INLINE int __hscore_open(char *file, int how, mode_t 
> mode) {
>  }
>  #endif
>
> +#ifdef HAVE_KEVENT
> +INLINE int __hscore_kevent(int kq, const struct kevent *changelist,
> +                           size_t nchanges, struct kevent *eventlist,
> +                           size_t nevents, const struct timespec *timeout) {
> +       return kevent(kq, changelist, nchanges, eventlist, nevents, timeout);
> +}
> +#endif
> +
> +
>  #if darwin_HOST_OS
>  // You should not access _environ directly on Darwin in a bundle/shared 
> library.
>  // See #2458 and 
> http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man7/environ.7.html
>
>
>
> _______________________________________________
> Cvs-libraries mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/cvs-libraries

_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to