diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-02-16 10:04:34 +0900 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-02-16 10:04:34 +0900 |
commit | c918272cc9eb3555d259e22dc587ee01e1c74324 (patch) | |
tree | f9b74a454a3066e26b62fcd5df5a89ac267940b1 /src/poller.hpp | |
parent | 35797d6c69032fc9eaa472c501b7fbba8e388026 (diff) |
Simplify mechanism for choosing polling mechanism
Till now the selection process was implemented both
in autotools build system and in the code itself.
From now on, it's exclusively build system's taks to
choose the right polling mechanism.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/poller.hpp')
-rw-r--r-- | src/poller.hpp | 54 |
1 files changed, 4 insertions, 50 deletions
diff --git a/src/poller.hpp b/src/poller.hpp index bf3c38f..eff2e5e 100644 --- a/src/poller.hpp +++ b/src/poller.hpp @@ -22,61 +22,15 @@ #ifndef __XS_POLLER_HPP_INCLUDED__ #define __XS_POLLER_HPP_INCLUDED__ -#include "platform.hpp" +namespace xs +{ + typedef void* handle_t; +} -#if defined XS_FORCE_SELECT -#define XS_USE_SELECT -#include "select.hpp" -#elif defined XS_FORCE_POLL -#define XS_USE_POLL -#include "poll.hpp" -#elif defined XS_FORCE_EPOLL -#define XS_USE_EPOLL -#include "epoll.hpp" -#elif defined XS_FORCE_DEVPOLL -#define XS_USE_DEVPOLL #include "devpoll.hpp" -#elif defined XS_FORCE_KQUEUE -#define XS_USE_KQUEUE -#include "kqueue.hpp" -#elif defined XS_HAVE_LINUX -#define XS_USE_EPOLL #include "epoll.hpp" -#elif defined XS_HAVE_WINDOWS -#define XS_USE_SELECT -#include "select.hpp" -#elif defined XS_HAVE_FREEBSD -#define XS_USE_KQUEUE -#include "kqueue.hpp" -#elif defined XS_HAVE_OPENBSD -#define XS_USE_KQUEUE -#include "kqueue.hpp" -#elif defined XS_HAVE_NETBSD -#define XS_USE_KQUEUE #include "kqueue.hpp" -#elif defined XS_HAVE_SOLARIS -#define XS_USE_DEVPOLL -#include "devpoll.hpp" -#elif defined XS_HAVE_OSX -#define XS_USE_KQUEUE -#include "kqueue.hpp" -#elif defined XS_HAVE_QNXNTO -#define XS_USE_POLL -#include "poll.hpp" -#elif defined XS_HAVE_AIX -#define XS_USE_POLL #include "poll.hpp" -#elif defined XS_HAVE_HPUX -#define XS_USE_DEVPOLL -#include "devpoll.hpp" -#elif defined XS_HAVE_OPENVMS -#define XS_USE_SELECT -#include "select.hpp" -#elif defined XS_HAVE_CYGWIN -#define XS_USE_SELECT #include "select.hpp" -#else -#error Unsupported platform -#endif #endif |