]> git.proxmox.com Git - wasi-libc.git/blame - libc-top-half/musl/include/poll.h
Update to musl 1.2.0.
[wasi-libc.git] / libc-top-half / musl / include / poll.h
CommitLineData
320054e8
DG
1#ifndef _POLL_H
2#define _POLL_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <features.h>
9
10#include <bits/poll.h>
11
e5f14be3 12#ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */
320054e8
DG
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
e5f14be3 33#ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */
320054e8
DG
34typedef unsigned long nfds_t;
35#else
36#include <__typedef_nfds_t.h>
37#endif
38
e5f14be3 39#ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */
320054e8
DG
40struct pollfd {
41 int fd;
42 short events;
43 short revents;
44};
45#else
46#include <__struct_pollfd.h>
47#endif
48
49int 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>
56int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
57#endif
58
575e1579
DG
59#if _REDIR_TIME64
60#ifdef _GNU_SOURCE
61__REDIR(ppoll, __ppoll_time64);
62#endif
63#endif
64
320054e8
DG
65#ifdef __cplusplus
66}
67#endif
68
69#endif