From 73ff737d11056bac5a0946a4384eab6b6c3dab44 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 2 Apr 2010 21:03:45 +0000 Subject: *** empty log message *** --- Changes | 1 + ev.c | 83 ++++++++++++++++++++++++++++++++++++----------------------------- 2 files changed, 47 insertions(+), 37 deletions(-) diff --git a/Changes b/Changes index 3575ead..4dda738 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision history for libev, a high-performance and full-featured event loop. TODO: ABI??? API????? Changes??? TODO: win32 write() to socket for signal handling TODO: poll asert +TODO: EV_USE__XXX default with config, document - "PORTING FROM LIBEV 3.X TO 4.X" (in ev.pod) is recommended reading. - ev_embed_stop did not correctly stop the watcher (very good testcase by Vladimir Timofeev). diff --git a/ev.c b/ev.c index 53694cd..602a882 100644 --- a/ev.c +++ b/ev.c @@ -79,76 +79,85 @@ extern "C" { # endif # endif -# ifndef EV_USE_NANOSLEEP -# if HAVE_NANOSLEEP -# define EV_USE_NANOSLEEP EV_FEATURE_OS -# else -# define EV_USE_NANOSLEEP 0 +# if HAVE_NANOSLEEP +# ifndef EV_USE_NANOSLEEP +# define EV_USE_NANOSLEEP EV_FEATURE_OS # endif +# else +# undef EV_USE_NANOSLEEP +# define EV_USE_NANOSLEEP 0 # endif -# ifndef EV_USE_SELECT -# if HAVE_SELECT && HAVE_SYS_SELECT_H +# if HAVE_SELECT && HAVE_SYS_SELECT_H +# ifndef EV_USE_SELECT # define EV_USE_SELECT EV_FEATURE_BACKENDS -# else -# define EV_USE_SELECT 0 # endif +# else +# undef EV_USE_SELECT +# define EV_USE_SELECT 0 # endif -# ifndef EV_USE_POLL -# if HAVE_POLL && HAVE_POLL_H +# if HAVE_POLL && HAVE_POLL_H +# ifndef EV_USE_POLL # define EV_USE_POLL EV_FEATURE_BACKENDS -# else -# define EV_USE_POLL 0 # endif +# else +# undef EV_USE_POLL +# define EV_USE_POLL 0 # endif -# ifndef EV_USE_EPOLL -# if HAVE_EPOLL_CTL && HAVE_SYS_EPOLL_H +# if HAVE_EPOLL_CTL && HAVE_SYS_EPOLL_H +# ifndef EV_USE_EPOLL # define EV_USE_EPOLL EV_FEATURE_BACKENDS -# else -# define EV_USE_EPOLL 0 # endif +# else +# undef EV_USE_EPOLL +# define EV_USE_EPOLL 0 # endif -# ifndef EV_USE_KQUEUE -# if HAVE_KQUEUE && HAVE_SYS_EVENT_H +# if HAVE_KQUEUE && HAVE_SYS_EVENT_H +# ifndef EV_USE_KQUEUE # define EV_USE_KQUEUE EV_FEATURE_BACKENDS -# else -# define EV_USE_KQUEUE 0 # endif +# else +# undef EV_USE_KQUEUE +# define EV_USE_KQUEUE 0 # endif -# ifndef EV_USE_PORT -# if HAVE_PORT_H && HAVE_PORT_CREATE +# if HAVE_PORT_H && HAVE_PORT_CREATE +# ifndef EV_USE_PORT # define EV_USE_PORT EV_FEATURE_BACKENDS -# else -# define EV_USE_PORT 0 # endif +# else +# undef EV_USE_PORT +# define EV_USE_PORT 0 # endif -# ifndef EV_USE_INOTIFY -# if HAVE_INOTIFY_INIT && HAVE_SYS_INOTIFY_H +# if HAVE_INOTIFY_INIT && HAVE_SYS_INOTIFY_H +# ifndef EV_USE_INOTIFY # define EV_USE_INOTIFY EV_FEATURE_OS -# else -# define EV_USE_INOTIFY 0 # endif +# else +# undef EV_USE_INOTIFY +# define EV_USE_INOTIFY 0 # endif -# ifndef EV_USE_SIGNALFD -# if HAVE_SIGNALFD && HAVE_SYS_SIGNALFD_H +# if HAVE_SIGNALFD && HAVE_SYS_SIGNALFD_H +# ifndef EV_USE_SIGNALFD # define EV_USE_SIGNALFD EV_FEATURE_OS -# else -# define EV_USE_SIGNALFD 0 # endif +# else +# undef EV_USE_SIGNALFD +# define EV_USE_SIGNALFD 0 # endif -# ifndef EV_USE_EVENTFD -# if HAVE_EVENTFD +# if HAVE_EVENTFD +# ifndef EV_USE_EVENTFD # define EV_USE_EVENTFD EV_FEATURE_OS -# else -# define EV_USE_EVENTFD 0 # endif +# else +# undef EV_USE_EVENTFD +# define EV_USE_EVENTFD 0 # endif #endif -- cgit v1.2.3