X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/8b9a210d6531a3b35e9e6138473f6456318bae22..0c513fd963e79da73c7d77018523ac956a5066bd:/ev.h diff --git a/ev.h b/ev.h index a7898a5..66e9bd1 100644 --- a/ev.h +++ b/ev.h @@ -30,6 +30,10 @@ #ifndef EV_H #define EV_H +#ifdef __cplusplus +extern "C" { +#endif + typedef double ev_tstamp; /* eventmask, revents, events... */ @@ -163,12 +167,14 @@ struct ev_child int status; /* rw, holds the exit status, use the macros from sys/wait.h */ }; -#define EVMETHOD_NONE 0 +#define EVMETHOD_AUTO 0 /* consults environment */ #define EVMETHOD_SELECT 1 -#define EVMETHOD_EPOLL 2 +#define EVMETHOD_POLL 2 +#define EVMETHOD_EPOLL 4 +#define EVMETHOD_ANY ~0 /* any method, do not consult env */ #if EV_PROTOTYPES extern int ev_method; -int ev_init (int flags); /* returns ev_method */ +int ev_init (int methods); /* returns ev_method */ int ev_version_major (void); int ev_version_minor (void); @@ -245,5 +251,9 @@ void ev_child_start (struct ev_child *w); void ev_child_stop (struct ev_child *w); #endif +#ifdef __cplusplus +} +#endif + #endif