From: root Date: Sun, 4 Nov 2007 18:15:16 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: rel-0_5~20 X-Git-Url: https://git.llucax.com/software/libev.git/commitdiff_plain/f4f2094b6a36eac7778c5091ee4160a2f403e808?ds=sidebyside *** empty log message *** --- diff --git a/README.embed b/README.embed index 3e37f05..b6322d9 100644 --- a/README.embed +++ b/README.embed @@ -133,8 +133,10 @@ PREPROCESSOR SYMBOLS EXAMPLES - For a real-world example of a program the includes libev verbatim, you - can have a look at the EV perl module (http://software.schmorp.de/pkg/EV.html). - It has the libev files in the liev/ subdirectory and includes them in the - EV.xs files. Only this file will be compiled. + For a real-world example of a program the includes libev + verbatim, you can have a look at the EV perl module + (http://software.schmorp.de/pkg/EV.html). It has the libev files in + the liev/ subdirectory and includes them in the EV/EVAPI.h (public + interface) and EV.xs (implementation) files. Only EV.xs file will be + compiled. diff --git a/ev.c b/ev.c index a80ed9c..97a99d2 100644 --- a/ev.c +++ b/ev.c @@ -28,7 +28,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EV_EMBED +#ifndef EV_STANDALONE # include "config.h" #endif @@ -60,8 +60,8 @@ # define EV_USE_SELECT 1 #endif -#ifndef EV_USEV_POLL -# define EV_USEV_POLL 0 /* poll is usually slower than select, and not as well tested */ +#ifndef EV_USE_POLL +# define EV_USE_POLL 0 /* poll is usually slower than select, and not as well tested */ #endif #ifndef EV_USE_EPOLL @@ -95,9 +95,7 @@ #define PID_HASHSIZE 16 /* size of pid hash table, must be power of two */ /*#define CLEANUP_INTERVAL 300. /* how often to try to free memory and re-check fds */ -#ifndef EV_EMBED -# include "ev.h" -#endif +#include "ev.h" #if __GNUC__ >= 3 # define expect(expr,value) __builtin_expect ((expr),(value)) @@ -413,6 +411,7 @@ static int signalmax; static int sigpipe [2]; static sig_atomic_t volatile gotsig; +static struct ev_io sigev; static void signals_init (ANSIG *base, int count) @@ -480,6 +479,9 @@ siginit (EV_P) #ifndef WIN32 +static struct ev_child *childs [PID_HASHSIZE]; +static struct ev_signal childev; + #ifndef WCONTINUED # define WCONTINUED 0 #endif @@ -524,7 +526,7 @@ childcb (EV_P_ struct ev_signal *sw, int revents) #if EV_USE_EPOLL # include "ev_epoll.c" #endif -#if EV_USEV_POLL +#if EV_USE_POLL # include "ev_poll.c" #endif #if EV_USE_SELECT @@ -592,7 +594,7 @@ loop_init (EV_P_ int methods) #if EV_USE_EPOLL if (!method && (methods & EVMETHOD_EPOLL )) method = epoll_init (EV_A_ methods); #endif -#if EV_USEV_POLL +#if EV_USE_POLL if (!method && (methods & EVMETHOD_POLL )) method = poll_init (EV_A_ methods); #endif #if EV_USE_SELECT @@ -610,7 +612,7 @@ loop_destroy (EV_P) #if EV_USE_EPOLL if (method == EVMETHOD_EPOLL ) epoll_destroy (EV_A); #endif -#if EV_USEV_POLL +#if EV_USE_POLL if (method == EVMETHOD_POLL ) poll_destroy (EV_A); #endif #if EV_USE_SELECT diff --git a/ev_vars.h b/ev_vars.h index e3c1f0e..98029ed 100644 --- a/ev_vars.h +++ b/ev_vars.h @@ -75,10 +75,5 @@ VARx(struct ev_check **, checks) VARx(int, checkmax) VARx(int, checkcnt) -VAR (childs, struct ev_child *childs [PID_HASHSIZE]) -VARx(struct ev_signal, childev) - -VARx(struct ev_io, sigev) - #undef VARx diff --git a/ev_wrap.h b/ev_wrap.h index 379ed74..b5320c7 100644 --- a/ev_wrap.h +++ b/ev_wrap.h @@ -50,6 +50,3 @@ #define checks ((loop)->checks) #define checkmax ((loop)->checkmax) #define checkcnt ((loop)->checkcnt) -#define childs ((loop)->childs) -#define childev ((loop)->childev) -#define sigev ((loop)->sigev) diff --git a/evdns.c b/evdns.c index f71c4f6..9377712 100644 --- a/evdns.c +++ b/evdns.c @@ -1,4 +1,4 @@ -/* $Id: evdns.c,v 1.8 2007-11-04 16:52:52 root Exp $ */ +/* $Id: evdns.c,v 1.9 2007-11-04 18:15:16 root Exp $ */ /* The original version of this module was written by Adam Langley; for * a history of modifications, check out the subversion logs. @@ -40,7 +40,7 @@ #endif #ifdef WIN32 -#ifndef EV_EMBED +#ifndef EV_STANDALONE #include "misc.h" #endif #endif diff --git a/event.c b/event.c index 83fa711..04bd373 100644 --- a/event.c +++ b/event.c @@ -34,9 +34,8 @@ #include #include -#ifndef EV_EMBED -# include "event.h" -#endif +#include "ev.h" +#include "event.h" #if EV_MULTIPLICITY # define dLOOPev struct ev_loop *loop = (struct ev_loop *)ev->ev_base @@ -112,7 +111,7 @@ int event_dispatch (void) return event_base_dispatch (x_cur); } -#ifdef EV_EMBED +#ifdef EV_STANDALONE void event_set_log_callback (event_log_cb cb) { /* nop */ diff --git a/event.h b/event.h index 48c34e6..7566438 100644 --- a/event.h +++ b/event.h @@ -31,9 +31,7 @@ #ifndef _EVENT_H_ #define _EVENT_H_ -#ifndef EV_EMBED -# include "ev.h" -#endif +#include #ifdef __cplusplus extern "C" { @@ -123,7 +121,7 @@ int event_base_dispatch (struct event_base *base); int event_base_once (struct event_base *base, int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv); int event_base_priority_init (struct event_base *base, int fd); -#ifndef EV_EMBED +#ifndef EV_STANDALONE # include "event_compat.h" #endif