poller.hpp 2.21 KB
Newer Older
1
/*
2 3
    Copyright (c) 2010-2011 250bpm s.r.o.
    Copyright (c) 2007-2009 iMatix Corporation
4
    Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
5 6 7 8

    This file is part of 0MQ.

    0MQ is free software; you can redistribute it and/or modify it under
9
    the terms of the GNU Lesser General Public License as published by
10 11 12 13 14 15
    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
16
    GNU Lesser General Public License for more details.
17

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

#ifndef __ZMQ_POLLER_HPP_INCLUDED__
#define __ZMQ_POLLER_HPP_INCLUDED__

25
#include "platform.hpp"
26 27

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

#endif