1 Only in libevent-1.1b: CHANGES
2 Only in libevent-1.1b: Makefile
3 diff -uwr libevent-1.1b-old/Makefile.am libevent-1.1b/Makefile.am
4 --- libevent-1.1b-old/Makefile.am Wed Aug 9 22:16:35 2006
5 +++ libevent-1.1b/Makefile.am Sat Sep 2 03:49:26 2006
7 AUTOMAKE_OPTIONS = foreign no-dependencies
9 -SUBDIRS = . sample test
11 EXTRA_DIST = acconfig.h event.h event-internal.h log.h evsignal.h event.3 \
12 kqueue.c epoll_sub.c epoll.c select.c rtsig.c poll.c signal.c \
15 lib_LTLIBRARIES = libevent.la
17 -libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c
18 -libevent_la_LIBADD = @LTLIBOBJS@
24 +SYS_SRC = WIN32-Code/misc.c WIN32-Code/win32.c
28 +SUBDIRS = . sample test
35 +CUST_SRC = custom/custom.c
40 +libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c $(CUST_SRC) $(SYS_SRC)
41 +libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
42 libevent_la_LDFLAGS = -release @VERSION@ -version-info 1:2:0
44 include_HEADERS = event.h
45 Only in libevent-1.1b: Makefile.in
46 diff -uwr libevent-1.1b-old/WIN32-Code/misc.c libevent-1.1b/WIN32-Code/misc.c
47 --- libevent-1.1b-old/WIN32-Code/misc.c Wed Aug 9 21:01:14 2006
48 +++ libevent-1.1b/WIN32-Code/misc.c Fri Sep 1 22:21:31 2006
50 #include <sys/timeb.h>
54 +/*our prototypes for timeval and timezone are in here, just in case the above
55 + headers don't have them*/
59 /****************************************************************************
61 * Function: gettimeofday(struct timeval *, struct timezone *)
62 diff -uwr libevent-1.1b-old/WIN32-Code/misc.h libevent-1.1b/WIN32-Code/misc.h
63 --- libevent-1.1b-old/WIN32-Code/misc.h Wed Aug 9 21:01:14 2006
64 +++ libevent-1.1b/WIN32-Code/misc.h Fri Sep 1 18:47:09 2006
72 int gettimeofday(struct timeval *,struct timezone *);
75 diff -uwr libevent-1.1b-old/WIN32-Code/win32.c libevent-1.1b/WIN32-Code/win32.c
76 --- libevent-1.1b-old/WIN32-Code/win32.c Wed Aug 9 21:25:48 2006
77 +++ libevent-1.1b/WIN32-Code/win32.c Sat Sep 2 00:45:55 2006
79 /* MSDN says this is required to handle SIGFPE */
80 volatile double SIGFPE_REQ = 0.0f;
82 -int signal_handler(int sig);
83 +static int signal_handler(int sig);
85 void signal_process(void);
86 int signal_recalc(void);
91 void *win32_init (void);
92 -int win32_insert (void *, struct event *);
93 -int win32_del (void *, struct event *);
94 +int win32_insert (struct win32op *, struct event *);
95 +int win32_del (struct win32op *, struct event *);
96 int win32_recalc (struct event_base *base, void *, int);
97 -int win32_dispatch (struct event_base *base, void *, struct timeval *);
98 +int win32_dispatch (struct event_base *base, struct win32op *, struct timeval *);
100 struct eventop win32ops = {
105 + (int (*) (void*, struct event*)) win32_insert,
106 + (int (*) (void*, struct event*)) win32_del,
109 + (int (*) (struct event_base*, void*, struct timeval*)) win32_dispatch
113 #define FD_SET_ALLOC_SIZE(n) ((sizeof(struct win_fd_set) + ((n)-1)*sizeof(SOCKET)))
117 if (ev->ev_events & (EV_READ|EV_WRITE))
118 event_errx(1, "%s: EV_SIGNAL incompatible use",
122 if((int)signal(EVENT_SIGNAL(ev), signal_handler) == -1)
124 + if((int)signal(EVENT_SIGNAL(ev), (void*) signal_handler) == -1)
132 /* Reinstall our signal handler. */
133 TAILQ_FOREACH(ev, &signalqueue, ev_signal_next) {
135 if((int)signal(EVENT_SIGNAL(ev), signal_handler) == -1)
137 + if((int)signal(EVENT_SIGNAL(ev), (void*) signal_handler) == -1)
144 Only in libevent-1.1b-old/: aclocal.m4
145 Only in libevent-1.1b: autom4te.cache
146 diff -uwr libevent-1.1b-old/buffer.c libevent-1.1b/buffer.c
147 --- libevent-1.1b-old/buffer.c Wed Aug 9 22:01:40 2006
148 +++ libevent-1.1b/buffer.c Fri Sep 1 18:52:56 2006
150 u_char *data = EVBUFFER_DATA(buffer);
151 size_t len = EVBUFFER_LENGTH(buffer);
156 for (i = 0; i < len; i++) {
157 if (data[i] == '\r' || data[i] == '\n')
158 Only in libevent-1.1b: config.guess
159 Only in libevent-1.1b: config.h
160 diff -uwr libevent-1.1b-old/config.h.in libevent-1.1b/config.h.in
161 --- libevent-1.1b-old/config.h.in Wed Aug 9 21:27:37 2006
162 +++ libevent-1.1b/config.h.in Sat Sep 2 02:23:17 2006
164 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
165 #undef TIME_WITH_SYS_TIME
167 +/* Define to 1 if you want to use a custom eventops variable */
168 +#undef USE_CUSTOM_EVENTOPS
170 /* Version number of package */
174 /* Define to empty if `const' does not conform to ANSI C. */
177 -/* Define to `__inline__' or `__inline' if that's what the C compiler
178 - calls it, or to nothing if 'inline' is not supported under any name. */
180 +/* Define as `__inline' if that's what the C compiler calls it, or to nothing
181 + if it is not supported. */
185 /* Define to `int' if <sys/types.h> does not define. */
187 Only in libevent-1.1b: config.h.in~
188 Only in libevent-1.1b: config.log
189 Only in libevent-1.1b: config.status
190 Only in libevent-1.1b: configure
191 diff -uwr libevent-1.1b-old/configure.in libevent-1.1b/configure.in
192 --- libevent-1.1b-old/configure.in Wed Aug 9 22:05:17 2006
193 +++ libevent-1.1b/configure.in Sat Sep 2 03:40:15 2006
195 CFLAGS="$CFLAGS -Wall"
198 +AC_ARG_ENABLE(custom-eventops,
199 + [ --enable-custom-eventops Use custom eventops variable],
200 + AC_DEFINE([USE_CUSTOM_EVENTOPS],[1],
201 + [Define to 1 to use a custom eventops variable])
203 +AC_ARG_ENABLE(custom-code,
204 + [ --enable-custom-code Use custom code from custom/],
208 +AM_CONDITIONAL(USE_CUSTOM_CODE, test x$customcodev = xtrue)
212 dnl Uncomment "AC_DISABLE_SHARED" to make shared librraries not get
214 AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
218 +dnl - check if the macro WIN32 is defined on this compiler.
219 +dnl - (this is how we check for a windows version of GCC)
220 +AC_MSG_CHECKING(for WIN32)
227 + bwin32=true; AC_MSG_RESULT(yes),
228 + bwin32=false; AC_MSG_RESULT(no),
231 +AM_CONDITIONAL(BUILD_WIN32, test x$bwin32 = xtrue)
234 dnl Checks for typedefs, structures, and compiler characteristics.
236 diff -uwr libevent-1.1b-old/evbuffer.c libevent-1.1b/evbuffer.c
237 --- libevent-1.1b-old/evbuffer.c Wed Aug 9 21:01:14 2006
238 +++ libevent-1.1b/evbuffer.c Fri Sep 1 19:18:13 2006
239 @@ -154,12 +154,20 @@
240 if (EVBUFFER_LENGTH(bufev->output)) {
241 res = evbuffer_write(bufev->output, fd);
244 +/*todo. evbuffer uses WriteFile when WIN32 is set. WIN32 system calls do not
245 + *set errno. thus this error checking is not portable*/
246 if (errno == EAGAIN ||
248 errno == EINPROGRESS)
251 what |= EVBUFFER_ERROR;
257 } else if (res == 0) {
259 what |= EVBUFFER_EOF;
265 if (EVBUFFER_LENGTH(bufev->output) != 0)
266 bufferevent_add(&bufev->ev_write, bufev->timeout_write);
268 diff -uwr libevent-1.1b-old/event.c libevent-1.1b/event.c
269 --- libevent-1.1b-old/event.c Wed Aug 9 21:25:48 2006
270 +++ libevent-1.1b/event.c Sat Sep 2 04:22:05 2006
272 #define WIN32_LEAN_AND_MEAN
274 #undef WIN32_LEAN_AND_MEAN
277 +#include "WIN32-Code/misc.h"
283 #include <sys/types.h>
284 #include <sys/tree.h>
285 #ifdef HAVE_SYS_TIME_H
287 #include "event-internal.h"
292 extern const struct eventop selectops;
295 extern const struct eventop win32ops;
298 +#ifndef USE_CUSTOM_EVENTOPS
300 /* In order of preference */
301 const struct eventop *eventops[] = {
302 #ifdef HAVE_WORKING_KQUEUE
308 +#include "custom-eventops.h"
309 +#endif //USE_CUSTOM_EVENTOPS
313 struct event_list signalqueue;
315 Only in libevent-1.1b: libtool
316 diff -uwr libevent-1.1b-old/log.c libevent-1.1b/log.c
317 --- libevent-1.1b-old/log.c Wed Aug 9 21:01:14 2006
318 +++ libevent-1.1b/log.c Fri Sep 1 19:09:45 2006
320 #define WIN32_LEAN_AND_MEAN
322 #undef WIN32_LEAN_AND_MEAN
325 +#include "WIN32-Code/misc.h"
331 #include <sys/types.h>
332 #include <sys/tree.h>
333 #ifdef HAVE_SYS_TIME_H
334 Only in libevent-1.1b/sample: Makefile
335 Only in libevent-1.1b/sample: Makefile.in
336 Only in libevent-1.1b: stamp-h1
337 Only in libevent-1.1b/test: Makefile
338 Only in libevent-1.1b/test: Makefile.in