summaryrefslogtreecommitdiff
path: root/src/common/fakepoll.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-08-12 03:08:41 +0000
committerNick Mathewson <nickm@torproject.org>2003-08-12 03:08:41 +0000
commitc336c99e609b2918ca664bc1fdbfb916a6811508 (patch)
treeff04c4774b60cef2dce98d88497ac5ac4a3cb8e7 /src/common/fakepoll.c
parent5126f203f23773f64b51e5c0c7b7e1d702f26ca9 (diff)
downloadtor-c336c99e609b2918ca664bc1fdbfb916a6811508.tar.gz
tor-c336c99e609b2918ca664bc1fdbfb916a6811508.zip
Start of port to win32. Missing are:
- signal support - forking for DNS farm - changes for async IO - daemonizing In other words, some files still don't build, and the ones that do build, do nonblocking IO incorrectly. I'm also not checking in the project files till I have a good place for them. svn:r380
Diffstat (limited to 'src/common/fakepoll.c')
-rw-r--r--src/common/fakepoll.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/common/fakepoll.c b/src/common/fakepoll.c
index 9b2493e62b..b059da5716 100644
--- a/src/common/fakepoll.c
+++ b/src/common/fakepoll.c
@@ -6,13 +6,24 @@
* Nick Mathewson <nickm@freehaven.net>
*/
-#include "fakepoll.h"
-
+#include "orconfig.h"
#ifdef USE_FAKE_POLL
-#include <sys/time.h>
#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
+#if _MSC_VER > 1300
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#elif defined(_MSC_VER)
+#include <winsock.h>
+#endif
+
+#include "fakepoll.h"
+#include "util.h"
int
poll(struct pollfd *ufds, unsigned int nfds, int timeout)