poller.hpp 2.17 KB
Newer Older
1
/*
2 3
    Copyright (c) 2007-2011 iMatix Corporation
    Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
4 5 6 7

    This file is part of 0MQ.

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

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

#ifndef __ZMQ_POLLER_HPP_INCLUDED__
#define __ZMQ_POLLER_HPP_INCLUDED__

24
#include "platform.hpp"
25 26

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

#endif