Hi,
When using libevent 1.4.13 in another project on Windows, we found some
structure are redefined in _libevent_time.h and winsock2.h, for example
'struct timeval'.
I made a patch to solve this problem, but I'm not sure if it's correct
to exclude _libevent_time.h on Windows.
Regards,
Shiqing
--
--------------------------------------------------------------
Shiqing Fan http://www.hlrs.de/people/fan
High Performance Computing Tel.: +49 711 685 87234
Center Stuttgart (HLRS) Fax.: +49 711 685 65832
Address:Allmandring 30 email: f...@hlrs.de
70569 Stuttgart
--- devpoll.orig.c 2010-02-05 15:48:17.375000000 +0100
+++ devpoll.c 2010-02-05 15:50:10.390625000 +0100
@@ -33,7 +33,9 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
+# ifndef HAVE_WINSOCK2_H
#include <sys/_libevent_time.h>
+# endif
#endif
#include <sys/queue.h>
#include <sys/devpoll.h>
--- poll.orig.c 2010-02-05 15:49:03.843750000 +0100
+++ poll.c 2010-02-05 15:52:03.281250000 +0100
@@ -34,7 +34,9 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
+# ifndef HAVE_WINSOCK2_H
#include <sys/_libevent_time.h>
+# endif
#endif
#include <sys/queue.h>
#include <poll.h>
--- event.orig.c 2010-02-05 15:48:41.250000000 +0100
+++ event.c 2010-02-05 15:54:55.890625000 +0100
@@ -36,8 +36,10 @@
#include <sys/types.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
-#else
+#else
+# ifndef HAVE_WINSOCK2_H
#include <sys/_libevent_time.h>
+# endif
#endif
#include <sys/queue.h>
#include <stdio.h>
--- kqueue.orig.c 2010-02-05 15:48:51.468750000 +0100
+++ kqueue.c 2010-02-05 15:54:53.703125000 +0100
@@ -36,7 +36,9 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
+# ifndef HAVE_WINSOCK2_H
#include <sys/_libevent_time.h>
+# endif
#endif
#include <sys/queue.h>
#include <sys/event.h>
--- epoll.orig.c 2010-02-05 15:48:30.343750000 +0100
+++ epoll.c 2010-02-05 15:50:54.546875000 +0100
@@ -34,7 +34,9 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
+# ifndef HAVE_WINSOCK2_H
#include <sys/_libevent_time.h>
+# endif
#endif
#include <sys/queue.h>
#include <sys/epoll.h>
--- log.orig.c 2010-02-05 15:48:57.609375000 +0100
+++ log.c 2010-02-05 15:51:47.359375000 +0100
@@ -50,7 +50,9 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
+# ifndef HAVE_WINSOCK2_H
#include <sys/_libevent_time.h>
+# endif
#endif
#include <stdio.h>
#include <stdlib.h>
--- select.orig.c 2010-02-05 15:49:10.531250000 +0100
+++ select.c 2010-02-05 15:52:15.281250000 +0100
@@ -34,7 +34,9 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
+# ifndef HAVE_WINSOCK2_H
#include <sys/_libevent_time.h>
+# endif
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
--- configure.orig 2010-02-05 16:15:26.218750000 +0100
+++ configure 2010-02-05 16:15:31.171875000 +0100
@@ -20478,7 +20478,7 @@
-for ac_header in fcntl.h stdarg.h inttypes.h stdint.h poll.h signal.h unistd.h
sys/epoll.h sys/time.h sys/queue.h sys/event.h sys/param.h sys/ioctl.h
sys/select.h sys/devpoll.h port.h netinet/in6.h sys/socket.h
+for ac_header in fcntl.h stdarg.h inttypes.h stdint.h poll.h signal.h unistd.h
sys/epoll.h sys/time.h sys/queue.h sys/event.h sys/param.h sys/ioctl.h
sys/select.h sys/devpoll.h port.h netinet/in6.h sys/socket.h winsock2.h
do
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://lists.monkey.org:8080/listinfo/libevent-users