1 /*
2     Copyright (c) 2007-2010 iMatix Corporation
3 
4     This file is part of 0MQ.
5 
6     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     the Free Software Foundation; either version 3 of the License, or
9     (at your option) any later version.
10 
11     0MQ is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     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     along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef __ZMQ_POLLER_HPP_INCLUDED__
21 #define __ZMQ_POLLER_HPP_INCLUDED__
22 
23 #include "epoll.hpp"
24 #include "poll.hpp"
25 #include "select.hpp"
26 #include "devpoll.hpp"
27 #include "kqueue.hpp"
28 
29 namespace zmq
30 {
31 
32 #if defined ZMQ_FORCE_SELECT
33     typedef select_t poller_t;
34 #elif defined ZMQ_FORCE_POLL
35     typedef poll_t poller_t;
36 #elif defined ZMQ_FORCE_EPOLL
37     typedef epoll_t poller_t;
38 #elif defined ZMQ_FORCE_DEVPOLL
39     typedef devpoll_t poller_t;
40 #elif defined ZMQ_FORCE_KQUEUE
41     typedef kqueue_t poller_t;
42 #elif defined ZMQ_HAVE_LINUX
43     typedef epoll_t poller_t;
44 #elif defined ZMQ_HAVE_WINDOWS
45     typedef select_t poller_t;
46 #elif defined ZMQ_HAVE_FREEBSD
47     typedef kqueue_t poller_t;
48 #elif defined ZMQ_HAVE_OPENBSD
49     typedef kqueue_t poller_t;
50 #elif defined ZMQ_HAVE_NETBSD
51     typedef kqueue_t poller_t;
52 #elif defined ZMQ_HAVE_SOLARIS
53     typedef devpoll_t poller_t;
54 #elif defined ZMQ_HAVE_OSX
55     typedef kqueue_t poller_t;
56 #elif defined ZMQ_HAVE_QNXNTO
57     typedef poll_t poller_t;
58 #elif defined ZMQ_HAVE_AIX
59     typedef poll_t poller_t;
60 #elif defined ZMQ_HAVE_HPUX
61     typedef devpoll_t poller_t;
62 #elif defined ZMQ_HAVE_OPENVMS
63     typedef select_t poller_t;
64 #elif defined ZMQ_HAVE_CYGWIN
65     typedef select_t poller_t;
66 #else
67 #error Unsupported platform
68 #endif
69 
70 }
71 
72 #endif
73