* TextBoxTest: More of these tests work now.
[mono-project.git] / mono / utils / mono-poll.h
blobffbe4d88c6bae7d96636e233b3bce8800beb7b8c
1 #ifndef MONO_POLL_H
2 #define MONO_POLL_H
4 #include <config.h>
5 #include <sys/time.h>
6 #include <sys/types.h>
7 #include <unistd.h>
9 #ifdef HAVE_POLL
10 #include <sys/poll.h>
12 #define MONO_POLLIN POLLIN
13 #define MONO_POLLPRI POLLPRI
14 #define MONO_POLLOUT POLLOUT
15 #define MONO_POLLERR POLLERR
16 #define MONO_POLLHUP POLLHUP
17 #define MONO_POLLNVAL POLLNVAL
19 typedef struct pollfd mono_pollfd;
21 #else
23 #ifdef PLATFORM_WIN32
24 #include <windows.h>
25 #endif
26 #define MONO_POLLIN 1
27 #define MONO_POLLPRI 2
28 #define MONO_POLLOUT 4
29 #define MONO_POLLERR 8
30 #define MONO_POLLHUP 0x10
31 #define MONO_POLLNVAL 0x20
33 typedef struct {
34 int fd;
35 short events;
36 short revents;
37 } mono_pollfd;
39 #endif
41 int mono_poll (mono_pollfd *ufds, unsigned int nfds, int timeout);
43 #endif /* MONO_POLL_H */