poller.hpp 2.12 KB
Newer Older
1
/*
2
    Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file
3 4 5 6

    This file is part of 0MQ.

    0MQ is free software; you can redistribute it and/or modify it under
7
    the terms of the GNU Lesser General Public License as published by
8 9 10 11 12 13
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    0MQ is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU Lesser General Public License for more details.
15

16
    You should have received a copy of the GNU Lesser General Public License
17 18 19 20 21 22
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __ZMQ_POLLER_HPP_INCLUDED__
#define __ZMQ_POLLER_HPP_INCLUDED__

23
#include "platform.hpp"
24 25

#if defined ZMQ_FORCE_SELECT
26 27
#define ZMQ_USE_SELECT
#include "select.hpp"
28
#elif defined ZMQ_FORCE_POLL
29 30
#define ZMQ_USE_POLL
#include "poll.hpp"
31
#elif defined ZMQ_FORCE_EPOLL
32 33
#define ZMQ_USE_EPOLL
#include "epoll.hpp"
34
#elif defined ZMQ_FORCE_DEVPOLL
35 36
#define ZMQ_USE_DEVPOLL
#include "devpoll.hpp"
37
#elif defined ZMQ_FORCE_KQUEUE
38 39
#define ZMQ_USE_KQUEUE
#include "kqueue.hpp"
40
#elif defined ZMQ_HAVE_LINUX
41 42
#define ZMQ_USE_EPOLL
#include "epoll.hpp"
43
#elif defined ZMQ_HAVE_WINDOWS
44 45
#define ZMQ_USE_SELECT
#include "select.hpp"
46
#elif defined ZMQ_HAVE_FREEBSD
47 48
#define ZMQ_USE_KQUEUE
#include "kqueue.hpp"
49
#elif defined ZMQ_HAVE_OPENBSD
50 51
#define ZMQ_USE_KQUEUE
#include "kqueue.hpp"
Martin Lucina's avatar
Martin Lucina committed
52
#elif defined ZMQ_HAVE_NETBSD
53 54
#define ZMQ_USE_KQUEUE
#include "kqueue.hpp"
55
#elif defined ZMQ_HAVE_SOLARIS
56 57
#define ZMQ_USE_DEVPOLL
#include "devpoll.hpp"
58
#elif defined ZMQ_HAVE_OSX
59 60
#define ZMQ_USE_KQUEUE
#include "kqueue.hpp"
61
#elif defined ZMQ_HAVE_QNXNTO
62 63
#define ZMQ_USE_POLL
#include "poll.hpp"
64
#elif defined ZMQ_HAVE_AIX
65 66
#define ZMQ_USE_POLL
#include "poll.hpp"
67
#elif defined ZMQ_HAVE_HPUX
68 69
#define ZMQ_USE_DEVPOLL
#include "devpoll.hpp"
70
#elif defined ZMQ_HAVE_OPENVMS
71 72
#define ZMQ_USE_SELECT
#include "select.hpp"
Martin Sustrik's avatar
Martin Sustrik committed
73
#elif defined ZMQ_HAVE_CYGWIN
74 75
#define ZMQ_USE_SELECT
#include "select.hpp"
76 77 78 79 80
#else
#error Unsupported platform
#endif

#endif