2 ==================================================================
3 --- Makefile.am (revision 8794)
4 +++ Makefile.am (local)
6 AUTOMAKE_OPTIONS = foreign no-dependencies
8 -SUBDIRS = . sample test
10 bin_SCRIPTS = event_rpcgen.py
14 lib_LTLIBRARIES = libevent.la
20 +SYS_SRC = WIN32-Code/misc.c WIN32-Code/win32.c
21 +SYS_INCLUDES = -IWIN32-Code
25 +SUBDIRS = . sample test
32 libevent_la_SOURCES = event.c buffer.c evbuffer.c log.c event_tagging.c \
33 - http.c evhttp.h http-internal.h evdns.c evdns.h
34 -libevent_la_LIBADD = @LTLIBOBJS@
35 + http.c evhttp.h http-internal.h evdns.c evdns.h $(SYS_SRC)
36 +libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
37 libevent_la_LDFLAGS = -release @VERSION@ -version-info 1:3:0
39 include_HEADERS = event.h evhttp.h evdns.h
42 +INCLUDES = -Icompat $(SYS_INCLUDES)
47 - cd $(srcdir)/test && make verify
48 + cd $(srcdir)/test && make verify
52 ==================================================================
53 --- WIN32-Code/misc.c (revision 8794)
54 +++ WIN32-Code/misc.c (local)
56 #include <sys/timeb.h>
60 +/*our prototypes for timeval and timezone are in here, just in case the above
61 + headers don't have them*/
65 /****************************************************************************
67 * Function: gettimeofday(struct timeval *, struct timezone *)
69 ==================================================================
70 --- WIN32-Code/misc.h (revision 8794)
71 +++ WIN32-Code/misc.h (local)
79 int gettimeofday(struct timeval *,struct timezone *);
82 === WIN32-Code/win32.c
83 ==================================================================
84 --- WIN32-Code/win32.c (revision 8794)
85 +++ WIN32-Code/win32.c (local)
87 /* MSDN says this is required to handle SIGFPE */
88 volatile double SIGFPE_REQ = 0.0f;
90 -int signal_handler(int sig);
91 +static void signal_handler(int sig);
93 void signal_process(void);
94 int signal_recalc(void);
100 -win32_insert(struct win32op *win32op, struct event *ev)
101 +win32_insert(void *op, struct event *ev)
103 + struct win32op *win32op = op;
106 if (ev->ev_events & EV_SIGNAL) {
111 -win32_del(struct win32op *win32op, struct event *ev)
112 +win32_del(void *op, struct event *ev)
114 + struct win32op *win32op = op;
117 if (ev->ev_events & EV_SIGNAL)
122 -win32_dispatch(struct event_base *base, struct win32op *win32op,
123 +win32_dispatch(struct event_base *base, void *op,
126 + struct win32op *win32op = op;
130 @@ -389,13 +393,11 @@
136 signal_handler(int sig)
146 ==================================================================
147 --- buffer.c (revision 8794)
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')
159 ==================================================================
160 --- configure.in (revision 8794)
161 +++ configure.in (local)
166 +dnl - check if the macro WIN32 is defined on this compiler.
167 +dnl - (this is how we check for a windows version of GCC)
168 +AC_MSG_CHECKING(for WIN32)
175 + bwin32=true; AC_MSG_RESULT(yes),
176 + bwin32=false; AC_MSG_RESULT(no),
179 +AM_CONDITIONAL(BUILD_WIN32, test x$bwin32 = xtrue)
182 dnl Checks for typedefs, structures, and compiler characteristics.
186 ==================================================================
187 --- evbuffer.c (revision 8794)
188 +++ evbuffer.c (local)
189 @@ -163,12 +162,20 @@
190 if (EVBUFFER_LENGTH(bufev->output)) {
191 res = evbuffer_write(bufev->output, fd);
194 +/*todo. evbuffer uses WriteFile when WIN32 is set. WIN32 system calls do not
195 + *set errno. thus this error checking is not portable*/
196 if (errno == EAGAIN ||
198 errno == EINPROGRESS)
201 what |= EVBUFFER_ERROR;
207 } else if (res == 0) {
209 what |= EVBUFFER_EOF;