diff options
Diffstat (limited to 'src/CommonAPI/MainLoopContext.h')
-rw-r--r-- | src/CommonAPI/MainLoopContext.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/CommonAPI/MainLoopContext.h b/src/CommonAPI/MainLoopContext.h index c988f9c..6949c0b 100644 --- a/src/CommonAPI/MainLoopContext.h +++ b/src/CommonAPI/MainLoopContext.h @@ -14,16 +14,29 @@ #include <stdint.h> + +#ifdef WIN32 +#include <WinSock2.h> +#else #include <poll.h> +#endif + +#ifdef WIN32 +#undef max +#endif + #include <limits> #include <vector> #include <chrono> #include <list> +#include <functional> namespace CommonAPI { + + enum class DispatchPriority { VERY_HIGH, HIGH, @@ -114,9 +127,8 @@ struct Watch { virtual const std::vector<DispatchSource*>& getDependentDispatchSources() = 0; }; - -constexpr int64_t TIMEOUT_INFINITE = std::numeric_limits<int64_t>::max(); -constexpr int64_t TIMEOUT_NONE = 0; +const int64_t TIMEOUT_INFINITE = std::numeric_limits<int64_t>::max(); +const int64_t TIMEOUT_NONE = 0; /** |