diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-11 13:17:51 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-11 13:17:51 +0000 |
commit | 4fa8511c80614427f70b62a5c74e0cbada7bbe21 (patch) | |
tree | 09abe47267efdf3f569e011984a8c5cd1dd56cc4 | |
parent | cb24915afb5410b0fa674af4d8f0849a999e4a0a (diff) |
Experimental WSAPoll (thanks for not just using poll(), guys) support for Windows. Untested, uncompiled.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10516 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/socketengines/socketengine_poll.h | 15 | ||||
-rw-r--r-- | src/socketengines/socketengine_poll.cpp | 1 |
2 files changed, 11 insertions, 5 deletions
diff --git a/include/socketengines/socketengine_poll.h b/include/socketengines/socketengine_poll.h index 4669ecfba..7c8a984ec 100644 --- a/include/socketengines/socketengine_poll.h +++ b/include/socketengines/socketengine_poll.h @@ -20,11 +20,18 @@ #include "inspircd_config.h" #include "inspircd.h" #include "socketengine.h" -#ifndef __USE_XOPEN - #define __USE_XOPEN /* fuck every fucking OS ever made. needed by poll.h to work.*/ + +#ifndef WINDOWS + #ifndef __USE_XOPEN + #define __USE_XOPEN /* fuck every fucking OS ever made. needed by poll.h to work.*/ + #endif + #include <poll.h> + #include <sys/poll.h> +#else + /* *grumble* */ + #define struct pollfd WSAPOLLFD + #define poll WSAPoll #endif -#include <poll.h> -#include <sys/poll.h> class InspIRCd; diff --git a/src/socketengines/socketengine_poll.cpp b/src/socketengines/socketengine_poll.cpp index d6ae59334..2a47aba65 100644 --- a/src/socketengines/socketengine_poll.cpp +++ b/src/socketengines/socketengine_poll.cpp @@ -14,7 +14,6 @@ #include "inspircd.h" #include "exitcodes.h" #include "socketengines/socketengine_poll.h" -#include <poll.h> #include <ulimit.h> PollEngine::PollEngine(InspIRCd* Instance) : SocketEngine(Instance) |