1 d24ddaa6 2022-02-26 thomas /* $OpenBSD: poll.h,v 1.11 2003/12/10 23:10:08 millert Exp $ */
4 d24ddaa6 2022-02-26 thomas * Copyright (c) 1996 Theo de Raadt
5 d24ddaa6 2022-02-26 thomas * All rights reserved.
7 d24ddaa6 2022-02-26 thomas * Redistribution and use in source and binary forms, with or without
8 d24ddaa6 2022-02-26 thomas * modification, are permitted provided that the following conditions
10 d24ddaa6 2022-02-26 thomas * 1. Redistributions of source code must retain the above copyright
11 d24ddaa6 2022-02-26 thomas * notice, this list of conditions and the following disclaimer.
12 d24ddaa6 2022-02-26 thomas * 2. Redistributions in binary form must reproduce the above copyright
13 d24ddaa6 2022-02-26 thomas * notice, this list of conditions and the following disclaimer in the
14 d24ddaa6 2022-02-26 thomas * documentation and/or other materials provided with the distribution.
16 d24ddaa6 2022-02-26 thomas * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 d24ddaa6 2022-02-26 thomas * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 d24ddaa6 2022-02-26 thomas * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 d24ddaa6 2022-02-26 thomas * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 d24ddaa6 2022-02-26 thomas * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 d24ddaa6 2022-02-26 thomas * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 d24ddaa6 2022-02-26 thomas * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 d24ddaa6 2022-02-26 thomas * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 d24ddaa6 2022-02-26 thomas * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 d24ddaa6 2022-02-26 thomas * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 d24ddaa6 2022-02-26 thomas /* OPENBSD ORIGINAL: sys/sys/poll.h */
30 d24ddaa6 2022-02-26 thomas #ifndef _COMPAT_POLL_H_
31 d24ddaa6 2022-02-26 thomas #define _COMPAT_POLL_H_
33 d24ddaa6 2022-02-26 thomas #include <sys/time.h>
34 d24ddaa6 2022-02-26 thomas #include <time.h>
35 d24ddaa6 2022-02-26 thomas #include <sys/types.h>
36 d24ddaa6 2022-02-26 thomas #include <signal.h>
37 d24ddaa6 2022-02-26 thomas #include <poll.h>
39 d24ddaa6 2022-02-26 thomas #ifndef HAVE_STRUCT_POLLFD_FD
40 d24ddaa6 2022-02-26 thomas #define POLLIN 0x0001
41 d24ddaa6 2022-02-26 thomas #define POLLPRI 0x0002
42 d24ddaa6 2022-02-26 thomas #define POLLOUT 0x0004
43 d24ddaa6 2022-02-26 thomas #define POLLERR 0x0008
44 d24ddaa6 2022-02-26 thomas #define POLLHUP 0x0010
45 d24ddaa6 2022-02-26 thomas #define POLLNVAL 0x0020
47 d24ddaa6 2022-02-26 thomas /* the following are currently not implemented */
48 d24ddaa6 2022-02-26 thomas #define POLLRDNORM 0x0040
49 d24ddaa6 2022-02-26 thomas #define POLLNORM POLLRDNORM
50 d24ddaa6 2022-02-26 thomas #define POLLWRNORM POLLOUT
51 d24ddaa6 2022-02-26 thomas #define POLLRDBAND 0x0080
52 d24ddaa6 2022-02-26 thomas #define POLLWRBAND 0x0100
54 d24ddaa6 2022-02-26 thomas #endif /* !HAVE_STRUCT_POLLFD_FD */
56 d24ddaa6 2022-02-26 thomas typedef unsigned int nfds_t;
58 d24ddaa6 2022-02-26 thomas int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
59 d24ddaa6 2022-02-26 thomas #endif /* !_COMPAT_POLL_H_ */