summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2008-11-17 03:37:08 +0000
committerroot <root>2008-11-17 03:37:08 +0000
commitc27a91776c880e9033a7a508953a37a64adf8e32 (patch)
tree34a5fa0f008dcf81d89d16954cd89b6b260dd2b3
parent30085edcf5bec67cf26e3142f7a72bb96b8d6cd5 (diff)
*** empty log message ***
-rw-r--r--Changes2
-rw-r--r--ev.pod2
-rw-r--r--event.c4
-rw-r--r--event.h6
4 files changed, 10 insertions, 4 deletions
diff --git a/Changes b/Changes
index 0a388df..d707a2a 100644
--- a/Changes
+++ b/Changes
@@ -5,6 +5,8 @@ WISH? monotonic clocks times/GetTickCount for coarse corrections?
- ev_stat watchers will now use inotify as a mere hint on
kernels <2.6.25, or if the filesystem is not in the
"known to be good" list.
+ - better mingw32 compatibility (it's not as borked as native win32)
+ (analysed by Roger Pack).
3.48 Thu Oct 30 09:02:37 CET 2008
- further optimise away the EPOLL_CTL_ADD/MOD combo in the epoll
diff --git a/ev.pod b/ev.pod
index a892694..48e39da 100644
--- a/ev.pod
+++ b/ev.pod
@@ -11,6 +11,8 @@ libev - a high performance full-featured event loop written in C
// a single header file is required
#include <ev.h>
+ #include <stdio.h> // for puts
+
// every watcher type has its own typedef'd struct
// with the name ev_TYPE
ev_io stdin_watcher;
diff --git a/event.c b/event.c
index 20b56a7..4a9b1ee 100644
--- a/event.c
+++ b/event.c
@@ -41,10 +41,6 @@
#include <stdlib.h>
#include <assert.h>
-#ifndef WIN32
-# include <sys/time.h>
-#endif
-
#ifdef EV_EVENT_H
# include EV_EVENT_H
#else
diff --git a/event.h b/event.h
index b8c0862..3059118 100644
--- a/event.h
+++ b/event.h
@@ -50,6 +50,12 @@
extern "C" {
#endif
+/* we need sys/time.h for struct timeval only */
+#if !defined (WIN32) || defined (__MINGW32__)
+# include <time.h> /* mingw seems to need this, for whatever reason */
+# include <sys/time.h>
+#endif
+
struct event_base;
#define EVLIST_TIMEOUT 0x01