Add Windows WSAPool declaration, associated struct and constants. It allows 100% poll compatible POSIX API on Windows.
This commit is contained in:
parent
756e766295
commit
4bb5bc4401
1 changed files with 23 additions and 0 deletions
|
@ -1428,6 +1428,29 @@ extern "C" {
|
||||||
#define WSAGETSELECTEVENT(lParam) LOWORD(lParam)
|
#define WSAGETSELECTEVENT(lParam) LOWORD(lParam)
|
||||||
#define WSAGETSELECTERROR(lParam) HIWORD(lParam)
|
#define WSAGETSELECTERROR(lParam) HIWORD(lParam)
|
||||||
|
|
||||||
|
/* #if (_WIN32_WINNT >= 0x0600) */
|
||||||
|
#define POLLRDNORM 0x0100
|
||||||
|
#define POLLRDBAND 0x0200
|
||||||
|
#define POLLIN (POLLRDNORM | POLLRDBAND)
|
||||||
|
#define POLLPRI 0x0400
|
||||||
|
|
||||||
|
#define POLLWRNORM 0x0010
|
||||||
|
#define POLLOUT (POLLWRNORM)
|
||||||
|
#define POLLWRBAND 0x0020
|
||||||
|
|
||||||
|
#define POLLERR 0x0001
|
||||||
|
#define POLLHUP 0x0002
|
||||||
|
#define POLLNVAL 0x0004
|
||||||
|
|
||||||
|
typedef struct pollfd {
|
||||||
|
SOCKET fd;
|
||||||
|
SHORT events;
|
||||||
|
SHORT revents;
|
||||||
|
} WSAPOLLFD, *PWSAPOLLFD, FAR *LPWSAPOLLFD;
|
||||||
|
|
||||||
|
WINSOCK_API_LINKAGE int WSAAPI WSAPoll(LPWSAPOLLFD fdArray, ULONG fds, INT timeout);
|
||||||
|
/* #endif // (_WIN32_WINNT >= 0x0600) */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue