Skip to content
This repository
Browse code

unix: remove libev

  • Loading branch information...
commit 665a316aa9d551ffdd00d1192d0c3d9c88d7e866 1 parent 65bb6f0
Ben Noordhuis bnoordhuis authored

Showing 46 changed files with 1 addition and 55,883 deletions. Show diff stats Hide diff stats

  1. +0 3  LICENSE
  2. +1 7 config-unix.mk
  3. +0 283 include/uv-private/ev-proto.h
  4. +0 593 include/uv-private/ev.h
  5. +0 388 src/unix/ev/Changes
  6. +0 36 src/unix/ev/LICENSE
  7. +0 18 src/unix/ev/Makefile.am
  8. +0 771 src/unix/ev/Makefile.in
  9. +0 58 src/unix/ev/README
  10. +0 8,957 src/unix/ev/aclocal.m4
  11. +0 6 src/unix/ev/autogen.sh
  12. +0 1,526 src/unix/ev/config.guess
  13. +0 125 src/unix/ev/config.h.in
  14. +0 1,658 src/unix/ev/config.sub
  15. +0 122 src/unix/ev/config_aix.h
  16. +0 123 src/unix/ev/config_cygwin.h
  17. +0 122 src/unix/ev/config_darwin.h
  18. +0 120 src/unix/ev/config_freebsd.h
  19. +0 141 src/unix/ev/config_linux.h
  20. +0 120 src/unix/ev/config_netbsd.h
  21. +0 126 src/unix/ev/config_openbsd.h
  22. +0 122 src/unix/ev/config_sunos.h
  23. +0 13,037 src/unix/ev/configure
  24. +0 18 src/unix/ev/configure.ac
  25. +0 630 src/unix/ev/depcomp
  26. +0 816 src/unix/ev/ev++.h
  27. +0 5,311 src/unix/ev/ev.3
  28. +0 3,926 src/unix/ev/ev.c
  29. +0 5,243 src/unix/ev/ev.pod
  30. +0 266 src/unix/ev/ev_epoll.c
  31. +0 235 src/unix/ev/ev_kqueue.c
  32. +0 148 src/unix/ev/ev_poll.c
  33. +0 179 src/unix/ev/ev_port.c
  34. +0 310 src/unix/ev/ev_select.c
  35. +0 203 src/unix/ev/ev_vars.h
  36. +0 153 src/unix/ev/ev_win32.c
  37. +0 196 src/unix/ev/ev_wrap.h
  38. +0 402 src/unix/ev/event.c
  39. +0 170 src/unix/ev/event.h
  40. +0 294 src/unix/ev/install-sh
  41. +0 39 src/unix/ev/libev.m4
  42. +0 8,413 src/unix/ev/ltmain.sh
  43. +0 336 src/unix/ev/missing
  44. +0 111 src/unix/ev/mkinstalldirs
  45. +0 1  src/unix/internal.h
  46. +0 21 uv.gyp
3  LICENSE
@@ -33,9 +33,6 @@ The externally maintained libraries used by libuv are:
33 33
34 34 - ngx_queue.h (from Nginx), copyright Igor Sysoev. Two clause BSD license.
35 35
36   - - libev, located at ev/ is copyright Marc Alexander Lehmann, and
37   - dual-licensed under the MIT license and GPL2.
38   -
39 36 - inet_pton and inet_ntop implementations, contained in src/inet.c, are
40 37 copyright the Internet Systems Consortium, Inc., and licensed under the ISC
41 38 license.
8 config-unix.mk
@@ -21,7 +21,7 @@
21 21 E=
22 22 CSTDFLAG=--std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter
23 23 CFLAGS += -g
24   -CPPFLAGS += -Isrc -Isrc/unix/ev
  24 +CPPFLAGS += -Isrc
25 25 LINKFLAGS=-lm
26 26
27 27 CPPFLAGS += -D_LARGEFILE_SOURCE
@@ -50,7 +50,6 @@ OBJS += src/unix/threadpool.o
50 50 OBJS += src/unix/timer.o
51 51 OBJS += src/unix/tty.o
52 52 OBJS += src/unix/udp.o
53   -OBJS += src/unix/ev/ev.o
54 53 OBJS += src/fs-poll.o
55 54 OBJS += src/uv-common.o
56 55 OBJS += src/inet.o
@@ -146,17 +145,12 @@ src/%.o: src/%.c include/uv.h include/uv-private/uv-unix.h
146 145 src/unix/%.o: src/unix/%.c include/uv.h include/uv-private/uv-unix.h src/unix/internal.h
147 146 $(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
148 147
149   -src/unix/ev/ev.o: src/unix/ev/ev.c
150   - $(CC) $(CPPFLAGS) $(CFLAGS) -c src/unix/ev/ev.c -o src/unix/ev/ev.o -DEV_CONFIG_H=\"$(EV_CONFIG)\"
151   -
152 148 clean-platform:
153 149 -rm -f src/unix/*.o
154   - -rm -f src/unix/ev/*.o
155 150 -rm -f src/unix/linux/*.o
156 151 -rm -rf test/run-tests.dSYM run-benchmarks.dSYM
157 152
158 153 distclean-platform:
159 154 -rm -f src/unix/*.o
160   - -rm -f src/unix/ev/*.o
161 155 -rm -f src/unix/linux/*.o
162 156 -rm -rf test/run-tests.dSYM run-benchmarks.dSYM
283 include/uv-private/ev-proto.h
... ... @@ -1,283 +0,0 @@
1   -/*
2   - * libev native API header
3   - *
4   - * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de>
5   - * All rights reserved.
6   - *
7   - * Redistribution and use in source and binary forms, with or without modifica-
8   - * tion, are permitted provided that the following conditions are met:
9   - *
10   - * 1. Redistributions of source code must retain the above copyright notice,
11   - * this list of conditions and the following disclaimer.
12   - *
13   - * 2. Redistributions in binary form must reproduce the above copyright
14   - * notice, this list of conditions and the following disclaimer in the
15   - * documentation and/or other materials provided with the distribution.
16   - *
17   - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
18   - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
19   - * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
20   - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
21   - * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22   - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23   - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24   - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
25   - * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26   - * OF THE POSSIBILITY OF SUCH DAMAGE.
27   - *
28   - * Alternatively, the contents of this file may be used under the terms of
29   - * the GNU General Public License ("GPL") version 2 or any later version,
30   - * in which case the provisions of the GPL are applicable instead of
31   - * the above. If you wish to allow the use of your version of this file
32   - * only under the terms of the GPL and not to allow others to use your
33   - * version of this file under the BSD license, indicate your decision
34   - * by deleting the provisions above and replace them with the notice
35   - * and other provisions required by the GPL. If you do not delete the
36   - * provisions above, a recipient may use your version of this file under
37   - * either the BSD or the GPL.
38   - */
39   -
40   -#ifndef EV_PROTO_H_
41   -#define EV_PROTO_H_
42   -
43   -#include "ev.h"
44   -
45   -int ev_version_major (void);
46   -int ev_version_minor (void);
47   -
48   -unsigned int ev_supported_backends (void);
49   -unsigned int ev_recommended_backends (void);
50   -unsigned int ev_embeddable_backends (void);
51   -
52   -ev_tstamp ev_time (void);
53   -void ev_sleep (ev_tstamp delay); /* sleep for a while */
54   -
55   -/* Sets the allocation function to use, works like realloc.
56   - * It is used to allocate and free memory.
57   - * If it returns zero when memory needs to be allocated, the library might abort
58   - * or take some potentially destructive action.
59   - * The default is your system realloc function.
60   - */
61   -void ev_set_allocator (void *(*cb)(void *ptr, long size));
62   -
63   -/* set the callback function to call on a
64   - * retryable syscall error
65   - * (such as failed select, poll, epoll_wait)
66   - */
67   -void ev_set_syserr_cb (void (*cb)(const char *msg));
68   -
69   -#if EV_MULTIPLICITY
70   -
71   -/* the default loop is the only one that handles signals and child watchers */
72   -/* you can call this as often as you like */
73   -struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0));
74   -
75   -EV_INLINE struct ev_loop *
76   -EV_MAYBE_UNUSED ev_default_loop_uc_ (void)
77   -{
78   - extern struct ev_loop *ev_default_loop_ptr;
79   -
80   - return ev_default_loop_ptr;
81   -}
82   -
83   -EV_INLINE int
84   -EV_MAYBE_UNUSED ev_is_default_loop (EV_P)
85   -{
86   - return EV_A == EV_DEFAULT_UC;
87   -}
88   -
89   -/* create and destroy alternative loops that don't handle signals */
90   -struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0));
91   -
92   -int ev_loop_refcount (EV_P);
93   -
94   -ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */
95   -
96   -#else
97   -
98   -int ev_default_loop (unsigned int flags EV_CPP (= 0)); /* returns true when successful */
99   -
100   -EV_INLINE ev_tstamp
101   -ev_now (void)
102   -{
103   - extern ev_tstamp ev_rt_now;
104   -
105   - return ev_rt_now;
106   -}
107   -
108   -/* looks weird, but ev_is_default_loop (EV_A) still works if this exists */
109   -EV_INLINE int
110   -ev_is_default_loop (void)
111   -{
112   - return 1;
113   -}
114   -
115   -#endif /* multiplicity */
116   -
117   -/* destroy event loops, also works for the default loop */
118   -void ev_loop_destroy (EV_P);
119   -
120   -/* this needs to be called after fork, to duplicate the loop */
121   -/* when you want to re-use it in the child */
122   -/* you can call it in either the parent or the child */
123   -/* you can actually call it at any time, anywhere :) */
124   -void ev_loop_fork (EV_P);
125   -
126   -unsigned int ev_backend (EV_P); /* backend in use by loop */
127   -
128   -void ev_now_update (EV_P); /* update event loop time */
129   -
130   -#if EV_WALK_ENABLE
131   -/* walk (almost) all watchers in the loop of a given type, invoking the */
132   -/* callback on every such watcher. The callback might stop the watcher, */
133   -/* but do nothing else with the loop */
134   -void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w));
135   -#endif
136   -
137   -void ev_run (EV_P_ int flags EV_CPP (= 0));
138   -void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)); /* break out of the loop */
139   -
140   -/*
141   - * ref/unref can be used to add or remove a refcount on the mainloop. every watcher
142   - * keeps one reference. if you have a long-running watcher you never unregister that
143   - * should not keep ev_loop from running, unref() after starting, and ref() before stopping.
144   - */
145   -void ev_ref (EV_P);
146   -void ev_unref (EV_P);
147   -
148   -/*
149   - * convenience function, wait for a single event, without registering an event watcher
150   - * if timeout is < 0, do wait indefinitely
151   - */
152   -void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg);
153   -
154   -# if EV_FEATURE_API
155   -unsigned int ev_iteration (EV_P); /* number of loop iterations */
156   -unsigned int ev_depth (EV_P); /* #ev_loop enters - #ev_loop leaves */
157   -void ev_verify (EV_P); /* abort if loop data corrupted */
158   -
159   -void ev_set_io_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
160   -void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
161   -
162   -/* advanced stuff for threading etc. support, see docs */
163   -void ev_set_userdata (EV_P_ void *data);
164   -void *ev_userdata (EV_P);
165   -void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P));
166   -void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P));
167   -
168   -unsigned int ev_pending_count (EV_P); /* number of pending events, if any */
169   -void ev_invoke_pending (EV_P); /* invoke all pending watchers */
170   -
171   -/*
172   - * stop/start the timer handling.
173   - */
174   -void ev_suspend (EV_P);
175   -void ev_resume (EV_P);
176   -#endif /* EV_FEATURE_API */
177   -
178   -/* stopping (enabling, adding) a watcher does nothing if it is already running */
179   -/* stopping (disabling, deleting) a watcher does nothing unless its already running */
180   -
181   -/* feeds an event into a watcher as if the event actually occured */
182   -/* accepts any ev_watcher type */
183   -void ev_feed_event (EV_P_ void *w, int revents);
184   -void ev_feed_fd_event (EV_P_ int fd, int revents);
185   -#if EV_SIGNAL_ENABLE
186   -void ev_feed_signal (int signum);
187   -void ev_feed_signal_event (EV_P_ int signum);
188   -#endif
189   -void ev_invoke (EV_P_ void *w, int revents);
190   -int ev_clear_pending (EV_P_ void *w);
191   -
192   -void ev_io_start (EV_P_ ev_io *w);
193   -void ev_io_stop (EV_P_ ev_io *w);
194   -
195   -void ev_timer_start (EV_P_ ev_timer *w);
196   -void ev_timer_stop (EV_P_ ev_timer *w);
197   -/* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */
198   -void ev_timer_again (EV_P_ ev_timer *w);
199   -/* return remaining time */
200   -ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w);
201   -
202   -#if EV_PERIODIC_ENABLE
203   -void ev_periodic_start (EV_P_ ev_periodic *w);
204   -void ev_periodic_stop (EV_P_ ev_periodic *w);
205   -void ev_periodic_again (EV_P_ ev_periodic *w);
206   -#endif
207   -
208   -/* only supported in the default loop */
209   -#if EV_SIGNAL_ENABLE
210   -void ev_signal_start (EV_P_ ev_signal *w);
211   -void ev_signal_stop (EV_P_ ev_signal *w);
212   -#endif
213   -
214   -/* only supported in the default loop */
215   -# if EV_CHILD_ENABLE
216   -void ev_child_start (EV_P_ ev_child *w);
217   -void ev_child_stop (EV_P_ ev_child *w);
218   -# endif
219   -
220   -# if EV_STAT_ENABLE
221   -void ev_stat_start (EV_P_ ev_stat *w);
222   -void ev_stat_stop (EV_P_ ev_stat *w);
223   -void ev_stat_stat (EV_P_ ev_stat *w);
224   -# endif
225   -
226   -# if EV_IDLE_ENABLE
227   -void ev_idle_start (EV_P_ ev_idle *w);
228   -void ev_idle_stop (EV_P_ ev_idle *w);
229   -# endif
230   -
231   -#if EV_PREPARE_ENABLE
232   -void ev_prepare_start (EV_P_ ev_prepare *w);
233   -void ev_prepare_stop (EV_P_ ev_prepare *w);
234   -#endif
235   -
236   -#if EV_CHECK_ENABLE
237   -void ev_check_start (EV_P_ ev_check *w);
238   -void ev_check_stop (EV_P_ ev_check *w);
239   -#endif
240   -
241   -# if EV_FORK_ENABLE
242   -void ev_fork_start (EV_P_ ev_fork *w);
243   -void ev_fork_stop (EV_P_ ev_fork *w);
244   -# endif
245   -
246   -# if EV_CLEANUP_ENABLE
247   -void ev_cleanup_start (EV_P_ ev_cleanup *w);
248   -void ev_cleanup_stop (EV_P_ ev_cleanup *w);
249   -# endif
250   -
251   -# if EV_EMBED_ENABLE
252   -/* only supported when loop to be embedded is in fact embeddable */
253   -void ev_embed_start (EV_P_ ev_embed *w);
254   -void ev_embed_stop (EV_P_ ev_embed *w);
255   -void ev_embed_sweep (EV_P_ ev_embed *w);
256   -# endif
257   -
258   -# if EV_ASYNC_ENABLE
259   -void ev_async_start (EV_P_ ev_async *w);
260   -void ev_async_stop (EV_P_ ev_async *w);
261   -void ev_async_send (EV_P_ ev_async *w);
262   -# endif
263   -
264   -#if EV_COMPAT3
265   - #define EVLOOP_NONBLOCK EVRUN_NOWAIT
266   - #define EVLOOP_ONESHOT EVRUN_ONCE
267   - #define EVUNLOOP_CANCEL EVBREAK_CANCEL
268   - #define EVUNLOOP_ONE EVBREAK_ONE
269   - #define EVUNLOOP_ALL EVBREAK_ALL
270   - EV_INLINE void EV_MAYBE_UNUSED ev_loop (EV_P_ int flags) { ev_run (EV_A_ flags); }
271   - EV_INLINE void EV_MAYBE_UNUSED ev_unloop (EV_P_ int how ) { ev_break (EV_A_ how ); }
272   - EV_INLINE void EV_MAYBE_UNUSED ev_default_destroy (void) { ev_loop_destroy (EV_DEFAULT); }
273   - EV_INLINE void EV_MAYBE_UNUSED ev_default_fork (void) { ev_loop_fork (EV_DEFAULT); }
274   - #if EV_FEATURE_API
275   - EV_INLINE unsigned int EV_MAYBE_UNUSED ev_loop_count (EV_P) { return ev_iteration (EV_A); }
276   - EV_INLINE unsigned int EV_MAYBE_UNUSED ev_loop_depth (EV_P) { return ev_depth (EV_A); }
277   - EV_INLINE void EV_MAYBE_UNUSED ev_loop_verify (EV_P) { ev_verify (EV_A); }
278   - #endif
279   -#else
280   - typedef struct ev_loop ev_loop;
281   -#endif
282   -
283   -#endif /* EV_PROTO_H_ */
593 include/uv-private/ev.h
... ... @@ -1,593 +0,0 @@
1   -/*
2   - * libev native API header
3   - *
4   - * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de>
5   - * All rights reserved.
6   - *
7   - * Redistribution and use in source and binary forms, with or without modifica-
8   - * tion, are permitted provided that the following conditions are met:
9   - *
10   - * 1. Redistributions of source code must retain the above copyright notice,
11   - * this list of conditions and the following disclaimer.
12   - *
13   - * 2. Redistributions in binary form must reproduce the above copyright
14   - * notice, this list of conditions and the following disclaimer in the
15   - * documentation and/or other materials provided with the distribution.
16   - *
17   - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
18   - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
19   - * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
20   - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
21   - * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22   - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23   - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24   - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
25   - * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26   - * OF THE POSSIBILITY OF SUCH DAMAGE.
27   - *
28   - * Alternatively, the contents of this file may be used under the terms of
29   - * the GNU General Public License ("GPL") version 2 or any later version,
30   - * in which case the provisions of the GPL are applicable instead of
31   - * the above. If you wish to allow the use of your version of this file
32   - * only under the terms of the GPL and not to allow others to use your
33   - * version of this file under the BSD license, indicate your decision
34   - * by deleting the provisions above and replace them with the notice
35   - * and other provisions required by the GPL. If you do not delete the
36   - * provisions above, a recipient may use your version of this file under
37   - * either the BSD or the GPL.
38   - */
39   -
40   -#ifndef EV_H_
41   -#define EV_H_
42   -
43   -#ifdef __cplusplus
44   -# define EV_CPP(x) x
45   -#else
46   -# define EV_CPP(x)
47   -#endif
48   -
49   -EV_CPP(extern "C" {)
50   -
51   -#ifdef __GNUC__
52   -# define EV_MAYBE_UNUSED __attribute__ ((unused))
53   -#else
54   -# define EV_MAYBE_UNUSED
55   -#endif
56   -
57   -/*****************************************************************************/
58   -
59   -/* pre-4.0 compatibility */
60   -#ifndef EV_COMPAT3
61   -# define EV_COMPAT3 1
62   -#endif
63   -
64   -#ifndef EV_FEATURES
65   -# define EV_FEATURES 0x7f
66   -#endif
67   -
68   -#define EV_FEATURE_CODE ((EV_FEATURES) & 1)
69   -#define EV_FEATURE_DATA ((EV_FEATURES) & 2)
70   -#define EV_FEATURE_CONFIG ((EV_FEATURES) & 4)
71   -#define EV_FEATURE_API ((EV_FEATURES) & 8)
72   -#define EV_FEATURE_WATCHERS ((EV_FEATURES) & 16)
73   -#define EV_FEATURE_BACKENDS ((EV_FEATURES) & 32)
74   -#define EV_FEATURE_OS ((EV_FEATURES) & 64)
75   -
76   -/* these priorities are inclusive, higher priorities will be invoked earlier */
77   -#ifndef EV_MINPRI
78   -# define EV_MINPRI (EV_FEATURE_CONFIG ? -2 : 0)
79   -#endif
80   -#ifndef EV_MAXPRI
81   -# define EV_MAXPRI (EV_FEATURE_CONFIG ? +2 : 0)
82   -#endif
83   -
84   -#ifndef EV_MULTIPLICITY
85   -# define EV_MULTIPLICITY EV_FEATURE_CONFIG
86   -#endif
87   -
88   -#ifndef EV_PERIODIC_ENABLE
89   -# define EV_PERIODIC_ENABLE EV_FEATURE_WATCHERS
90   -#endif
91   -
92   -#ifndef EV_STAT_ENABLE
93   -# define EV_STAT_ENABLE EV_FEATURE_WATCHERS
94   -#endif
95   -
96   -#ifndef EV_PREPARE_ENABLE
97   -# define EV_PREPARE_ENABLE EV_FEATURE_WATCHERS
98   -#endif
99   -
100   -#ifndef EV_CHECK_ENABLE
101   -# define EV_CHECK_ENABLE EV_FEATURE_WATCHERS
102   -#endif
103   -
104   -#ifndef EV_IDLE_ENABLE
105   -# define EV_IDLE_ENABLE EV_FEATURE_WATCHERS
106   -#endif
107   -
108   -#ifndef EV_FORK_ENABLE
109   -# define EV_FORK_ENABLE EV_FEATURE_WATCHERS
110   -#endif
111   -
112   -#ifndef EV_CLEANUP_ENABLE
113   -# define EV_CLEANUP_ENABLE EV_FEATURE_WATCHERS
114   -#endif
115   -
116   -#ifndef EV_SIGNAL_ENABLE
117   -# define EV_SIGNAL_ENABLE EV_FEATURE_WATCHERS
118   -#endif
119   -
120   -#ifndef EV_CHILD_ENABLE
121   -# ifdef _WIN32
122   -# define EV_CHILD_ENABLE 0
123   -# else
124   -# define EV_CHILD_ENABLE EV_FEATURE_WATCHERS
125   -#endif
126   -#endif
127   -
128   -#ifndef EV_ASYNC_ENABLE
129   -# define EV_ASYNC_ENABLE EV_FEATURE_WATCHERS
130   -#endif
131   -
132   -#ifndef EV_EMBED_ENABLE
133   -# define EV_EMBED_ENABLE EV_FEATURE_WATCHERS
134   -#endif
135   -
136   -#ifndef EV_WALK_ENABLE
137   -# define EV_WALK_ENABLE 0 /* not yet */
138   -#endif
139   -
140   -/*****************************************************************************/
141   -
142   -#if EV_CHILD_ENABLE && !EV_SIGNAL_ENABLE
143   -# undef EV_SIGNAL_ENABLE
144   -# define EV_SIGNAL_ENABLE 1
145   -#endif
146   -
147   -/*****************************************************************************/
148   -
149   -typedef double ev_tstamp;
150   -
151   -#ifndef EV_ATOMIC_T
152   -# include <signal.h>
153   -# define EV_ATOMIC_T sig_atomic_t volatile
154   -#endif
155   -
156   -#if EV_STAT_ENABLE
157   -# ifdef _WIN32
158   -# include <time.h>
159   -# include <sys/types.h>
160   -# endif
161   -# include <sys/stat.h>
162   -#endif
163   -
164   -/* support multiple event loops? */
165   -#if EV_MULTIPLICITY
166   -struct ev_loop;
167   -# define EV_P struct ev_loop *loop /* a loop as sole parameter in a declaration */
168   -# define EV_P_ EV_P, /* a loop as first of multiple parameters */
169   -# define EV_A loop /* a loop as sole argument to a function call */
170   -# define EV_A_ EV_A, /* a loop as first of multiple arguments */
171   -# define EV_DEFAULT_UC ev_default_loop_uc_ () /* the default loop, if initialised, as sole arg */
172   -# define EV_DEFAULT_UC_ EV_DEFAULT_UC, /* the default loop as first of multiple arguments */
173   -# define EV_DEFAULT ev_default_loop (0) /* the default loop as sole arg */
174   -# define EV_DEFAULT_ EV_DEFAULT, /* the default loop as first of multiple arguments */
175   -#else
176   -# define EV_P void
177   -# define EV_P_
178   -# define EV_A
179   -# define EV_A_
180   -# define EV_DEFAULT
181   -# define EV_DEFAULT_
182   -# define EV_DEFAULT_UC
183   -# define EV_DEFAULT_UC_
184   -# undef EV_EMBED_ENABLE
185   -#endif
186   -
187   -/* EV_INLINE is used for functions in header files */
188   -#if __STDC_VERSION__ >= 199901L && __GNUC__ >= 3
189   -# define EV_INLINE static inline
190   -#else
191   -# define EV_INLINE static
192   -#endif
193   -
194   -/* EV_PROTOTYPES can be used to switch of prototype declarations */
195   -#if EV_PROTOTYPES
196   -#include "ev-proto.h"
197   -#endif
198   -
199   -/*****************************************************************************/
200   -
201   -#define EV_VERSION_MAJOR 4
202   -#define EV_VERSION_MINOR 4
203   -
204   -/* eventmask, revents, events... */
205   -enum {
206   - EV_UNDEF = -1, /* guaranteed to be invalid */
207   - EV_NONE = 0x00, /* no events */
208   - EV_READ = 0x01, /* ev_io detected read will not block */
209   - EV_WRITE = 0x02, /* ev_io detected write will not block */
210   - EV_LIBUV_KQUEUE_HACK = 0x40,
211   - EV__IOFDSET = 0x80, /* internal use only */
212   - EV_IO = EV_READ, /* alias for type-detection */
213   - EV_TIMER = 0x00000100, /* timer timed out */
214   -#if EV_COMPAT3
215   - EV_TIMEOUT = EV_TIMER, /* pre 4.0 API compatibility */
216   -#endif
217   - EV_PERIODIC = 0x00000200, /* periodic timer timed out */
218   - EV_SIGNAL = 0x00000400, /* signal was received */
219   - EV_CHILD = 0x00000800, /* child/pid had status change */
220   - EV_STAT = 0x00001000, /* stat data changed */
221   - EV_IDLE = 0x00002000, /* event loop is idling */
222   - EV_PREPARE = 0x00004000, /* event loop about to poll */
223   - EV_CHECK = 0x00008000, /* event loop finished poll */
224   - EV_EMBED = 0x00010000, /* embedded event loop needs sweep */
225   - EV_FORK = 0x00020000, /* event loop resumed in child */
226   - EV_CLEANUP = 0x00040000, /* event loop resumed in child */
227   - EV_ASYNC = 0x00080000, /* async intra-loop signal */
228   - EV_CUSTOM = 0x01000000, /* for use by user code */
229   - EV_ERROR = (-2147483647 - 1) /* sent when an error occurs */
230   -};
231   -
232   -/* can be used to add custom fields to all watchers, while losing binary compatibility */
233   -#ifndef EV_COMMON
234   -# define EV_COMMON void *data;
235   -#endif
236   -
237   -#ifndef EV_CB_DECLARE
238   -# define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents);
239   -#endif
240   -#ifndef EV_CB_INVOKE
241   -# define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents))
242   -#endif
243   -
244   -/* not official, do not use */
245   -#define EV_CB(type,name) void name (EV_P_ struct ev_ ## type *w, int revents)
246   -
247   -/*
248   - * struct member types:
249   - * private: you may look at them, but not change them,
250   - * and they might not mean anything to you.
251   - * ro: can be read anytime, but only changed when the watcher isn't active.
252   - * rw: can be read and modified anytime, even when the watcher is active.
253   - *
254   - * some internal details that might be helpful for debugging:
255   - *
256   - * active is either 0, which means the watcher is not active,
257   - * or the array index of the watcher (periodics, timers)
258   - * or the array index + 1 (most other watchers)
259   - * or simply 1 for watchers that aren't in some array.
260   - * pending is either 0, in which case the watcher isn't,
261   - * or the array index + 1 in the pendings array.
262   - */
263   -
264   -#if EV_MINPRI == EV_MAXPRI
265   -# define EV_DECL_PRIORITY
266   -#elif !defined (EV_DECL_PRIORITY)
267   -# define EV_DECL_PRIORITY int priority;
268   -#endif
269   -
270   -/* shared by all watchers */
271   -#define EV_WATCHER(type) \
272   - int active; /* private */ \
273   - int pending; /* private */ \
274   - EV_DECL_PRIORITY /* private */ \
275   - EV_COMMON /* rw */ \
276   - EV_CB_DECLARE (type) /* private */
277   -
278   -#define EV_WATCHER_LIST(type) \
279   - EV_WATCHER (type) \
280   - struct ev_watcher_list *next; /* private */
281   -
282   -#define EV_WATCHER_TIME(type) \
283   - EV_WATCHER (type) \
284   - ev_tstamp at; /* private */
285   -
286   -/* base class, nothing to see here unless you subclass */
287   -typedef struct ev_watcher
288   -{
289   - EV_WATCHER (ev_watcher)
290   -} ev_watcher;
291   -
292   -/* base class, nothing to see here unless you subclass */
293   -typedef struct ev_watcher_list
294   -{
295   - EV_WATCHER_LIST (ev_watcher_list)
296   -} ev_watcher_list;
297   -
298   -/* base class, nothing to see here unless you subclass */
299   -typedef struct ev_watcher_time
300   -{
301   - EV_WATCHER_TIME (ev_watcher_time)
302   -} ev_watcher_time;
303   -
304   -/* invoked when fd is either EV_READable or EV_WRITEable */
305   -/* revent EV_READ, EV_WRITE */
306   -typedef struct ev_io
307   -{
308   - EV_WATCHER_LIST (ev_io)
309   -
310   - int fd; /* ro */
311   - int events; /* ro */
312   -} ev_io;
313   -
314   -/* invoked after a specific time, repeatable (based on monotonic clock) */
315   -/* revent EV_TIMEOUT */
316   -typedef struct ev_timer
317   -{
318   - EV_WATCHER_TIME (ev_timer)
319   -
320   - ev_tstamp repeat; /* rw */
321   -} ev_timer;
322   -
323   -/* invoked at some specific time, possibly repeating at regular intervals (based on UTC) */
324   -/* revent EV_PERIODIC */
325   -typedef struct ev_periodic
326   -{
327   - EV_WATCHER_TIME (ev_periodic)
328   -
329   - ev_tstamp offset; /* rw */
330   - ev_tstamp interval; /* rw */
331   - ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now); /* rw */
332   -} ev_periodic;
333   -
334   -/* invoked when the given signal has been received */
335   -/* revent EV_SIGNAL */
336   -typedef struct ev_signal
337   -{
338   - EV_WATCHER_LIST (ev_signal)
339   -
340   - int signum; /* ro */
341   -} ev_signal;
342   -
343   -/* invoked when sigchld is received and waitpid indicates the given pid */
344   -/* revent EV_CHILD */
345   -/* does not support priorities */
346   -typedef struct ev_child
347   -{
348   - EV_WATCHER_LIST (ev_child)
349   -
350   - int flags; /* private */
351   - int pid; /* ro */
352   - int rpid; /* rw, holds the received pid */
353   - int rstatus; /* rw, holds the exit status, use the macros from sys/wait.h */
354   -} ev_child;
355   -
356   -#if EV_STAT_ENABLE
357   -/* st_nlink = 0 means missing file or other error */
358   -# ifdef _WIN32
359   -typedef struct _stati64 ev_statdata;
360   -# else
361   -typedef struct stat ev_statdata;
362   -# endif
363   -
364   -/* invoked each time the stat data changes for a given path */
365   -/* revent EV_STAT */
366   -typedef struct ev_stat
367   -{
368   - EV_WATCHER_LIST (ev_stat)
369   -
370   - ev_timer timer; /* private */
371   - ev_tstamp interval; /* ro */
372   - const char *path; /* ro */
373   - ev_statdata prev; /* ro */
374   - ev_statdata attr; /* ro */
375   -
376   - int wd; /* wd for inotify, fd for kqueue */
377   -} ev_stat;
378   -#endif
379   -
380   -#if EV_IDLE_ENABLE
381   -/* invoked when the nothing else needs to be done, keeps the process from blocking */
382   -/* revent EV_IDLE */
383   -typedef struct ev_idle
384   -{
385   - EV_WATCHER (ev_idle)
386   -} ev_idle;
387   -#endif
388   -
389   -/* invoked for each run of the mainloop, just before the blocking call */
390   -/* you can still change events in any way you like */
391   -/* revent EV_PREPARE */
392   -typedef struct ev_prepare
393   -{
394   - EV_WATCHER (ev_prepare)
395   -} ev_prepare;
396   -
397   -/* invoked for each run of the mainloop, just after the blocking call */
398   -/* revent EV_CHECK */
399   -typedef struct ev_check
400   -{
401   - EV_WATCHER (ev_check)
402   -} ev_check;
403   -
404   -#if EV_FORK_ENABLE
405   -/* the callback gets invoked before check in the child process when a fork was detected */
406   -/* revent EV_FORK */
407   -typedef struct ev_fork
408   -{
409   - EV_WATCHER (ev_fork)
410   -} ev_fork;
411   -#endif
412   -
413   -#if EV_CLEANUP_ENABLE
414   -/* is invoked just before the loop gets destroyed */
415   -/* revent EV_CLEANUP */
416   -typedef struct ev_cleanup
417   -{
418   - EV_WATCHER (ev_cleanup)
419   -} ev_cleanup;
420   -#endif
421   -
422   -#if EV_EMBED_ENABLE
423   -/* used to embed an event loop inside another */
424   -/* the callback gets invoked when the event loop has handled events, and can be 0 */
425   -typedef struct ev_embed
426   -{
427   - EV_WATCHER (ev_embed)
428   -
429   - struct ev_loop *other; /* ro */
430   - ev_io io; /* private */
431   - ev_prepare prepare; /* private */
432   - ev_check check; /* unused */
433   - ev_timer timer; /* unused */
434   - ev_periodic periodic; /* unused */
435   - ev_idle idle; /* unused */
436   - ev_fork fork; /* private */
437   -#if EV_CLEANUP_ENABLE
438   - ev_cleanup cleanup; /* unused */
439   -#endif
440   -} ev_embed;
441   -#endif
442   -
443   -#if EV_ASYNC_ENABLE
444   -/* invoked when somebody calls ev_async_send on the watcher */
445   -/* revent EV_ASYNC */
446   -typedef struct ev_async
447   -{
448   - EV_WATCHER (ev_async)
449   -
450   - EV_ATOMIC_T sent; /* private */
451   -} ev_async;
452   -
453   -# define ev_async_pending(w) (+(w)->sent)
454   -#endif
455   -
456   -/* the presence of this union forces similar struct layout */
457   -union ev_any_watcher
458   -{
459   - struct ev_watcher w;
460   - struct ev_watcher_list wl;
461   -
462   - struct ev_io io;
463   - struct ev_timer timer;
464   - struct ev_periodic periodic;
465   - struct ev_signal signal;
466   - struct ev_child child;
467   -#if EV_STAT_ENABLE
468   - struct ev_stat stat;
469   -#endif
470   -#if EV_IDLE_ENABLE
471   - struct ev_idle idle;
472   -#endif
473   - struct ev_prepare prepare;
474   - struct ev_check check;
475   -#if EV_FORK_ENABLE
476   - struct ev_fork fork;
477   -#endif
478   -#if EV_CLEANUP_ENABLE
479   - struct ev_cleanup cleanup;
480   -#endif
481   -#if EV_EMBED_ENABLE
482   - struct ev_embed embed;
483   -#endif
484   -#if EV_ASYNC_ENABLE
485   - struct ev_async async;
486   -#endif
487   -};
488   -
489   -/* flag bits for ev_default_loop and ev_loop_new */
490   -enum {
491   - /* the default */
492   - EVFLAG_AUTO = 0x00000000U, /* not quite a mask */
493   - /* flag bits */
494   - EVFLAG_NOENV = 0x01000000U, /* do NOT consult environment */
495   - EVFLAG_FORKCHECK = 0x02000000U, /* check for a fork in each iteration */
496   - /* debugging/feature disable */
497   - EVFLAG_NOINOTIFY = 0x00100000U, /* do not attempt to use inotify */
498   -#if EV_COMPAT3
499   - EVFLAG_NOSIGFD = 0, /* compatibility to pre-3.9 */
500   -#endif
501   - EVFLAG_SIGNALFD = 0x00200000U, /* attempt to use signalfd */
502   - EVFLAG_NOSIGMASK = 0x00400000U /* avoid modifying the signal mask */
503   -};
504   -
505   -/* method bits to be ored together */
506   -enum {
507   - EVBACKEND_SELECT = 0x00000001U, /* about anywhere */
508   - EVBACKEND_POLL = 0x00000002U, /* !win */
509   - EVBACKEND_EPOLL = 0x00000004U, /* linux */
510   - EVBACKEND_KQUEUE = 0x00000008U, /* bsd */
511   - EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */
512   - EVBACKEND_PORT = 0x00000020U, /* solaris 10 */
513   - EVBACKEND_ALL = 0x0000003FU, /* all known backends */
514   - EVBACKEND_MASK = 0x0000FFFFU /* all future backends */
515   -};
516   -
517   -
518   -
519   -/* ev_run flags values */
520   -enum {
521   - EVRUN_NOWAIT = 1, /* do not block/wait */
522   - EVRUN_ONCE = 2 /* block *once* only */
523   -};
524   -
525   -/* ev_break how values */
526   -enum {
527   - EVBREAK_CANCEL = 0, /* undo unloop */
528   - EVBREAK_ONE = 1, /* unloop once */
529   - EVBREAK_ALL = 2 /* unloop all loops */
530   -};
531   -
532   -
533   -
534   -/* these may evaluate ev multiple times, and the other arguments at most once */
535   -/* either use ev_init + ev_TYPE_set, or the ev_TYPE_init macro, below, to first initialise a watcher */
536   -#define ev_init(ev,cb_) do { \
537   - ((ev_watcher *)(void *)(ev))->active = \
538   - ((ev_watcher *)(void *)(ev))->pending = 0; \
539   - ev_set_priority ((ev), 0); \
540   - ev_set_cb ((ev), cb_); \
541   -} while (0)
542   -
543   -#define ev_io_set(ev,fd_,events_) do { (ev)->fd = (fd_); (ev)->events = (events_) | EV__IOFDSET; } while (0)
544   -#define ev_timer_set(ev,after_,repeat_) do { ((ev_watcher_time *)(ev))->at = (after_); (ev)->repeat = (repeat_); } while (0)
545   -#define ev_periodic_set(ev,ofs_,ival_,rcb_) do { (ev)->offset = (ofs_); (ev)->interval = (ival_); (ev)->reschedule_cb = (rcb_); } while (0)
546   -#define ev_signal_set(ev,signum_) do { (ev)->signum = (signum_); } while (0)
547   -#define ev_child_set(ev,pid_,trace_) do { (ev)->pid = (pid_); (ev)->flags = !!(trace_); } while (0)
548   -#define ev_stat_set(ev,path_,interval_) do { (ev)->path = (path_); (ev)->interval = (interval_); (ev)->wd = -2; } while (0)
549   -#define ev_idle_set(ev) /* nop, yes, this is a serious in-joke */
550   -#define ev_prepare_set(ev) /* nop, yes, this is a serious in-joke */
551   -#define ev_check_set(ev) /* nop, yes, this is a serious in-joke */
552   -#define ev_embed_set(ev,other_) do { (ev)->other = (other_); } while (0)
553   -#define ev_fork_set(ev) /* nop, yes, this is a serious in-joke */
554   -#define ev_cleanup_set(ev) /* nop, yes, this is a serious in-joke */
555   -#define ev_async_set(ev) /* nop, yes, this is a serious in-joke */
556   -
557   -#define ev_io_init(ev,cb,fd,events) do { ev_init ((ev), (cb)); ev_io_set ((ev),(fd),(events)); } while (0)
558   -#define ev_timer_init(ev,cb,after,repeat) do { ev_init ((ev), (cb)); ev_timer_set ((ev),(after),(repeat)); } while (0)
559   -#define ev_periodic_init(ev,cb,ofs,ival,rcb) do { ev_init ((ev), (cb)); ev_periodic_set ((ev),(ofs),(ival),(rcb)); } while (0)
560   -#define ev_signal_init(ev,cb,signum) do { ev_init ((ev), (cb)); ev_signal_set ((ev), (signum)); } while (0)
561   -#define ev_child_init(ev,cb,pid,trace) do { ev_init ((ev), (cb)); ev_child_set ((ev),(pid),(trace)); } while (0)
562   -#define ev_stat_init(ev,cb,path,interval) do { ev_init ((ev), (cb)); ev_stat_set ((ev),(path),(interval)); } while (0)
563   -#define ev_idle_init(ev,cb) do { ev_init ((ev), (cb)); ev_idle_set ((ev)); } while (0)
564   -#define ev_prepare_init(ev,cb) do { ev_init ((ev), (cb)); ev_prepare_set ((ev)); } while (0)
565   -#define ev_check_init(ev,cb) do { ev_init ((ev), (cb)); ev_check_set ((ev)); } while (0)
566   -#define ev_embed_init(ev,cb,other) do { ev_init ((ev), (cb)); ev_embed_set ((ev),(other)); } while (0)
567   -#define ev_fork_init(ev,cb) do { ev_init ((ev), (cb)); ev_fork_set ((ev)); } while (0)
568   -#define ev_cleanup_init(ev,cb) do { ev_init ((ev), (cb)); ev_cleanup_set ((ev)); } while (0)
569   -#define ev_async_init(ev,cb) do { ev_init ((ev), (cb)); ev_async_set ((ev)); } while (0)
570   -
571   -#define ev_is_pending(ev) (0 + ((ev_watcher *)(void *)(ev))->pending) /* ro, true when watcher is waiting for callback invocation */
572   -#define ev_is_active(ev) (0 + ((ev_watcher *)(void *)(ev))->active) /* ro, true when the watcher has been started */
573   -
574   -#define ev_cb(ev) (ev)->cb /* rw */
575   -
576   -#if EV_MINPRI == EV_MAXPRI
577   -# define ev_priority(ev) ((ev), EV_MINPRI)
578   -# define ev_set_priority(ev,pri) ((ev), (pri))
579   -#else
580   -# define ev_priority(ev) (+(((ev_watcher *)(void *)(ev))->priority))
581   -# define ev_set_priority(ev,pri) ( (ev_watcher *)(void *)(ev))->priority = (pri)
582   -#endif
583   -
584   -#define ev_periodic_at(ev) (+((ev_watcher_time *)(ev))->at)
585   -
586   -#ifndef ev_set_cb
587   -# define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_)
588   -#endif
589   -
590   -EV_CPP(})
591   -
592   -#endif
593   -
388 src/unix/ev/Changes
... ... @@ -1,388 +0,0 @@
1   -Revision history for libev, a high-performance and full-featured event loop.
2   -
3   -4.04 Wed Feb 16 09:01:51 CET 2011
4   - - fix two problems in the native win32 backend, where reuse of fd's
5   - with different underlying handles caused handles not to be removed
6   - or added to the select set (analyzed and tested by Bert Belder).
7   - - do no rely on ceil() in ev_e?poll.c.
8   - - backport libev to HP-UX versions before 11 v3.
9   - - configure did not detect nanosleep and clock_gettime properly when
10   - they are available in the libc (as opposed to -lrt).
11   -
12   -4.03 Tue Jan 11 14:37:25 CET 2011
13   - - officially support polling files with all backends.
14   - - support files, /dev/zero etc. the same way as select in the epoll
15   - backend, by generating events on our own.
16   - - ports backend: work around solaris bug 6874410 and many related ones
17   - (EINTR, maybe more), with no performance loss (note that the solaris
18   - bug report is actually wrong, reality is far more bizarre and broken
19   - than that).
20   - - define EV_READ/EV_WRITE as macros in event.h, as some programs use
21   - #ifdef to test for them.
22   - - new (experimental) function: ev_feed_signal.
23   - - new (to become default) EVFLAG_NOSIGMASK flag.
24   - - new EVBACKEND_MASK symbol.
25   - - updated COMMON IDIOMS SECTION.
26   -
27   -4.01 Fri Nov 5 21:51:29 CET 2010
28   - - automake fucked it up, apparently, --add-missing -f is not quite enough
29   - to make it update its files, so 4.00 didn't install ev++.h and
30   - event.h on make install. grrr.
31   - - ev_loop(count|depth) didn't return anything (Robin Haberkorn).
32   - - change EV_UNDEF to 0xffffffff to silence some overzealous compilers.
33   - - use "(libev) " prefix for all libev error messages now.
34   -
35   -4.00 Mon Oct 25 12:32:12 CEST 2010
36   - - "PORTING FROM LIBEV 3.X TO 4.X" (in ev.pod) is recommended reading.
37   - - ev_embed_stop did not correctly stop the watcher (very good
38   - testcase by Vladimir Timofeev).
39   - - ev_run will now always update the current loop time - it erroneously
40   - didn't when idle watchers were active, causing timers not to fire.
41   - - fix a bug where a timeout of zero caused the timer not to fire
42   - in the libevent emulation (testcase by Péter Szabó).
43   - - applied win32 fixes by Michael Lenaghan (also James Mansion).
44   - - replace EV_MINIMAL by EV_FEATURES.
45   - - prefer EPOLL_CTL_ADD over EPOLL_CTL_MOD in some more cases, as it
46   - seems the former is *much* faster than the latter.
47   - - linux kernel version detection (for inotify bug workarounds)
48   - did not work properly.
49   - - reduce the number of spurious wake-ups with the ports backend.
50   - - remove dependency on sys/queue.h on freebsd (patch by Vanilla Hsu).
51   - - do async init within ev_async_start, not ev_async_set, which avoids
52   - an API quirk where the set function must be called in the C++ API
53   - even when there is nothing to set.
54   - - add (undocumented) EV_ENABLE when adding events with kqueue,
55   - this might help with OS X, which seems to need it despite documenting
56   - not to need it (helpfully pointed out by Tilghman Lesher).
57   - - do not use poll by default on freebsd, it's broken (what isn't
58   - on freebsd...).
59   - - allow to embed epoll on kernels >= 2.6.32.
60   - - configure now prepends -O3, not appends it, so one can still
61   - override it.
62   - - ev.pod: greatly expanded the portability section, added a porting
63   - section, a description of watcher states and made lots of minor fixes.
64   - - disable poll backend on AIX, the poll header spams the namespace
65   - and it's not worth working around dead platforms (reported
66   - and analyzed by Aivars Kalvans).
67   - - improve header file compatibility of the standalone eventfd code
68   - in an obscure case.
69   - - implement EV_AVOID_STDIO option.
70   - - do not use sscanf to parse linux version number (smaller, faster,
71   - no sscanf dependency).
72   - - new EV_CHILD_ENABLE and EV_SIGNAL_ENABLE configurable settings.
73   - - update libev.m4 HAVE_CLOCK_SYSCALL test for newer glibcs.
74   - - add section on accept() problems to the manpage.
75   - - rename EV_TIMEOUT to EV_TIMER.
76   - - rename ev_loop_count/depth/verify/loop/unloop.
77   - - remove ev_default_destroy and ev_default_fork.
78   - - switch to two-digit minor version.
79   - - work around an apparent gentoo compiler bug.
80   - - define _DARWIN_UNLIMITED_SELECT. just so.
81   - - use enum instead of #define for most constants.
82   - - improve compatibility to older C++ compilers.
83   - - (experimental) ev_run/ev_default_loop/ev_break/ev_loop_new have now
84   - default arguments when compiled as C++.
85   - - enable automake dependency tracking.
86   - - ev_loop_new no longer leaks memory when loop creation failed.
87   - - new ev_cleanup watcher type.
88   -
89   -3.9 Thu Dec 31 07:59:59 CET 2009
90   - - signalfd is no longer used by default and has to be requested
91   - explicitly - this means that easy to catch bugs become hard to
92   - catch race conditions, but the users have spoken.
93   - - point out the unspecified signal mask in the documentation, and
94   - that this is a race condition regardless of EV_SIGNALFD.
95   - - backport inotify code to C89.
96   - - inotify file descriptors could leak into child processes.
97   - - ev_stat watchers could keep an errornous extra ref on the loop,
98   - preventing exit when unregistering all watchers (testcases
99   - provided by ry@tinyclouds.org).
100   - - implement EV_WIN32_HANDLE_TO_FD and EV_WIN32_CLOSE_FD configuration
101   - symbols to make it easier for apps to do their own fd management.
102   - - support EV_IDLE_ENABLE being disabled in ev++.h
103   - (patch by Didier Spezia).
104   - - take advantage of inotify_init1, if available, to set cloexec/nonblock
105   - on fd creation, to avoid races.
106   - - the signal handling pipe wasn't always initialised under windows
107   - (analysed by lekma).
108   - - changed minimum glibc requirement from glibc 2.9 to 2.7, for
109   - signalfd.
110   - - add missing string.h include (Denis F. Latypoff).
111   - - only replace ev_stat.prev when we detect an actual difference,
112   - so prev is (almost) always different to attr. this might
113   - have caused the problems with 04_stat.t.
114   - - add ev::timer->remaining () method to C++ API.
115   -
116   -3.8 Sun Aug 9 14:30:45 CEST 2009
117   - - incompatible change: do not necessarily reset signal handler
118   - to SIG_DFL when a sighandler is stopped.
119   - - ev_default_destroy did not properly free or zero some members,
120   - potentially causing crashes and memory corruption on repeated
121   - ev_default_destroy/ev_default_loop calls.
122   - - take advantage of signalfd on GNU/Linux systems.
123   - - document that the signal mask might be in an unspecified
124   - state when using libev's signal handling.
125   - - take advantage of some GNU/Linux calls to set cloexec/nonblock
126   - on fd creation, to avoid race conditions.
127   -
128   -3.7 Fri Jul 17 16:36:32 CEST 2009
129   - - ev_unloop and ev_loop wrongly used a global variable to exit loops,
130   - instead of using a per-loop variable (bug caught by accident...).
131   - - the ev_set_io_collect_interval interpretation has changed.
132   - - add new functionality: ev_set_userdata, ev_userdata,
133   - ev_set_invoke_pending_cb, ev_set_loop_release_cb,
134   - ev_invoke_pending, ev_pending_count, together with a long example
135   - about thread locking.
136   - - add ev_timer_remaining (as requested by Denis F. Latypoff).
137   - - add ev_loop_depth.
138   - - calling ev_unloop in fork/prepare watchers will no longer poll
139   - for new events.
140   - - Denis F. Latypoff corrected many typos in example code snippets.
141   - - honor autoconf detection of EV_USE_CLOCK_SYSCALL, also double-
142   - check that the syscall number is available before trying to
143   - use it (reported by ry@tinyclouds).
144   - - use GetSystemTimeAsFileTime instead of _timeb on windows, for
145   - slightly higher accuracy.
146   - - properly declare ev_loop_verify and ev_now_update even when
147   - !EV_MULTIPLICITY.
148   - - do not compile in any priority code when EV_MAXPRI == EV_MINPRI.
149   - - support EV_MINIMAL==2 for a reduced API.
150   - - actually 0-initialise struct sigaction when installing signals.
151   - - add section on hibernate and stopped processes to ev_timer docs.
152   -
153   -3.6 Tue Apr 28 02:49:30 CEST 2009
154   - - multiple timers becoming ready within an event loop iteration
155   - will be invoked in the "correct" order now.
156   - - do not leave the event loop early just because we have no active
157   - watchers, fixing a problem when embedding a kqueue loop
158   - that has active kernel events but no registered watchers
159   - (reported by blacksand blacksand).
160   - - correctly zero the idx values for arrays, so destroying and
161   - reinitialising the default loop actually works (patch by
162   - Malek Hadj-Ali).
163   - - implement ev_suspend and ev_resume.
164   - - new EV_CUSTOM revents flag for use by applications.
165   - - add documentation section about priorites.
166   - - add a glossary to the dcoumentation.
167   - - extend the ev_fork description slightly.
168   - - optimize a jump out of call_pending.
169   -
170   -3.53 Sun Feb 15 02:38:20 CET 2009
171   - - fix a bug in event pipe creation on win32 that would cause a
172   - failed assertion on event loop creation (patch by Malek Hadj-Ali).
173   - - probe for CLOCK_REALTIME support at runtime as well and fall
174   - back to gettimeofday if there is an error, to support older
175   - operating systems with newer header files/libraries.
176   - - prefer gettimeofday over clock_gettime with USE_CLOCK_SYSCALL
177   - (default most everywhere), otherwise not.
178   -
179   -3.52 Wed Jan 7 21:43:02 CET 2009
180   - - fix compilation of select backend in fd_set mode when NFDBITS is
181   - missing (to get it to compile on QNX, reported by Rodrigo Campos).
182   - - better select-nfds handling when select backend is in fd_set mode.
183   - - diagnose fd_set overruns when select backend is in fd_set mode.
184   - - due to a thinko, instead of disabling everything but
185   - select on the borked OS X platform, everything but select was
186   - allowed (reported by Emanuele Giaquinta).
187   - - actually verify that local and remote port are matching in
188   - libev's socketpair emulation, which makes denial-of-service
189   - attacks harder (but not impossible - it's windows). Make sure
190   - it even works under vista, which thinks that getpeer/sockname
191   - should return fantasy port numbers.
192   - - include "libev" in all assertion messages for potentially
193   - clearer diagnostics.
194   - - event_get_version (libevent compatibility) returned
195   - a useless string instead of the expected version string
196   - (patch by W.C.A. Wijngaards).
197   -
198   -3.51 Wed Dec 24 23:00:11 CET 2008
199   - - fix a bug where an inotify watcher was added twice, causing
200   - freezes on hash collisions (reported and analysed by Graham Leggett).
201   - - new config symbol, EV_USE_CLOCK_SYSCALL, to make libev use
202   - a direct syscall - slower, but no dependency on librt et al.
203   - - assume negative return values != -1 signals success of port_getn
204   - (http://cvs.epicsol.org/cgi/viewcvs.cgi/epic5/source/newio.c?rev=1.52)
205   - (no known failure reports, but it doesn't hurt).
206   - - fork detection in ev_embed now stops and restarts the watcher
207   - automatically.
208   - - EXPERIMENTAL: default the method to operator () in ev++.h,
209   - to make it nicer to use functors (requested by Benedek László).
210   - - fixed const object callbacks in ev++.h.
211   - - replaced loop_ref argument of watcher.set (loop) by a direct
212   - ev_loop * in ev++.h, to avoid clashes with functor patch.
213   - - do not try to watch the empty string via inotify.
214   - - inotify watchers could be leaked under certain circumstances.
215   - - OS X 10.5 is actually even more broken than earlier versions,
216   - so fall back to select on that piece of garbage.
217   - - fixed some weirdness in the ev_embed documentation.
218   -
219   -3.49 Wed Nov 19 11:26:53 CET 2008
220   - - ev_stat watchers will now use inotify as a mere hint on
221   - kernels <2.6.25, or if the filesystem is not in the
222   - "known to be good" list.
223   - - better mingw32 compatibility (it's not as borked as native win32)
224   - (analysed by Roger Pack).
225   - - include stdio.h in the example program, as too many people are
226   - confused by the weird C language otherwise. I guess the next thing
227   - I get told is that the "..." ellipses in the examples don't compile
228   - with their C compiler.
229   -
230   -3.48 Thu Oct 30 09:02:37 CET 2008
231   - - further optimise away the EPOLL_CTL_ADD/MOD combo in the epoll
232   - backend by assuming the kernel event mask hasn't changed if
233   - ADD fails with EEXIST.
234   - - work around spurious event notification bugs in epoll by using
235   - a 32-bit generation counter. recreate kernel state if we receive
236   - spurious notifications or unwanted events. this is very costly,
237   - but I didn't come up with this horrible design.
238   - - use memset to initialise most arrays now and do away with the
239   - init functions.
240   - - expand time-out strategies into a "Be smart about timeouts" section.
241   - - drop the "struct" from all ev_watcher declarations in the
242   - documentation and did other clarifications (yeah, it was a mistake
243   - to have a struct AND a function called ev_loop).
244   - - fix a bug where ev_default would not initialise the default
245   - loop again after it was destroyed with ev_default_destroy.
246   - - rename syserr to ev_syserr to avoid name clashes when embedding,
247   - do similar changes for event.c.