forked from bellard/quickjs
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwin32-poll.h
More file actions
77 lines (63 loc) · 1.36 KB
/
Copy pathwin32-poll.h
File metadata and controls
77 lines (63 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* @file poll.h
*/
#ifndef WIN32_POLL_H
#define WIN32_POLL_H
#ifndef HAVE_POLL_H
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
enum {
#undef POLLIN
POLLIN = 0x0001,
#undef POLLPRI
POLLPRI = 0x0002,
#undef POLLOUT
POLLOUT = 0x0004,
#undef POLLERR
POLLERR = 0x0008,
#undef POLLHUP
POLLHUP = 0x0010,
#undef POLLNVAL
POLLNVAL = 0x0020,
#undef POLLRDNORM
POLLRDNORM = 0x0040,
#undef POLLRDBAND
POLLRDBAND = 0x0080,
#undef POLLWRNORM
POLLWRNORM = 0x0100,
#undef POLLWRBAND
POLLWRBAND = 0x0200,
#undef POLLMSG
POLLMSG = 0x0400,
#undef POLLREMOVE
/* POLLREMOVE is for /dev/epoll (/dev/misc/eventpoll),
* a new event notification mechanism for 2.6 */
POLLREMOVE = 0x1000,
};
#if defined(__sparc__) || defined(__mips__)
#define POLLWRNORM POLLOUT
#endif
#ifndef struct_pollfd_defined
#define struct_pollfd_defined 1
struct pollfd {
int fd;
short events;
short revents;
};
#endif
typedef unsigned int nfds_t;
extern int poll(struct pollfd* ufds, nfds_t nfds, int timeout);
#if defined(_WIN32) && !defined(CYGWIN)
typedef int sigset_t[32];
#endif
#ifdef _GNU_SOURCE
#include <signal.h>
int ppoll(struct pollfd* fds, nfds_t nfds, const struct timespec* timeout, const sigset_t* sigmask);
#endif
#ifdef __cplusplus
}
#endif /* defined(__cplusplus) */
#endif /* defined(HAVE_POLL_H) */
#endif /* WIN32_POLL_H */