]> git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/include/poll.h
bump version to 0.0~git20240411.9e8c542-3~bpo12+pve1
[wasi-libc.git] / libc-top-half / musl / include / poll.h
1 #ifndef _POLL_H
2 #define _POLL_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include <features.h>
9
10 #include <bits/poll.h>
11
12 #ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */
13 #define POLLIN 0x001
14 #define POLLPRI 0x002
15 #define POLLOUT 0x004
16 #define POLLERR 0x008
17 #define POLLHUP 0x010
18 #define POLLNVAL 0x020
19 #define POLLRDNORM 0x040
20 #define POLLRDBAND 0x080
21 #ifndef POLLWRNORM
22 #define POLLWRNORM 0x100
23 #define POLLWRBAND 0x200
24 #endif
25 #ifndef POLLMSG
26 #define POLLMSG 0x400
27 #define POLLRDHUP 0x2000
28 #endif
29 #else
30 #include <__header_poll.h>
31 #endif
32
33 #ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */
34 typedef unsigned long nfds_t;
35 #else
36 #include <__typedef_nfds_t.h>
37 #endif
38
39 #ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */
40 struct pollfd {
41 int fd;
42 short events;
43 short revents;
44 };
45 #else
46 #include <__struct_pollfd.h>
47 #endif
48
49 int poll (struct pollfd *, nfds_t, int);
50
51 #ifdef _GNU_SOURCE
52 #define __NEED_time_t
53 #define __NEED_struct_timespec
54 #define __NEED_sigset_t
55 #include <bits/alltypes.h>
56 int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
57 #endif
58
59 #if _REDIR_TIME64
60 #ifdef _GNU_SOURCE
61 __REDIR(ppoll, __ppoll_time64);
62 #endif
63 #endif
64
65 #ifdef __cplusplus
66 }
67 #endif
68
69 #endif