|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _@GUARD_PREFIX@_POLL_H |
|
|
|
#if __GNUC__ >= 3 |
|
@PRAGMA_SYSTEM_HEADER@ |
|
#endif |
|
@PRAGMA_COLUMNS@ |
|
|
|
|
|
#if @HAVE_POLL_H@ |
|
# @INCLUDE_NEXT@ @NEXT_POLL_H@ |
|
#endif |
|
|
|
#ifndef _@GUARD_PREFIX@_POLL_H |
|
#define _@GUARD_PREFIX@_POLL_H |
|
|
|
|
|
|
|
|
|
#if @HAVE_WINSOCK2_H@ |
|
# include <winsock2.h> |
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !@HAVE_POLL_H@ |
|
|
|
# if @HAVE_WINSOCK2_H@ |
|
|
|
# undef POLLIN |
|
# undef POLLPRI |
|
# undef POLLOUT |
|
# undef POLLERR |
|
# undef POLLHUP |
|
# undef POLLNVAL |
|
# undef POLLRDNORM |
|
# undef POLLRDBAND |
|
# undef POLLWRNORM |
|
# undef POLLWRBAND |
|
# define pollfd rpl_pollfd |
|
# endif |
|
|
|
|
|
# define POLLIN 0x0001 |
|
# define POLLPRI 0x0002 |
|
# define POLLOUT 0x0004 |
|
# define POLLERR 0x0008 |
|
# define POLLHUP 0x0010 |
|
# define POLLNVAL 0x0020 |
|
# define POLLRDNORM 0x0040 |
|
# define POLLRDBAND 0x0080 |
|
# define POLLWRNORM 0x0100 |
|
# define POLLWRBAND 0x0200 |
|
|
|
# if !GNULIB_defined_poll_types |
|
|
|
struct pollfd |
|
{ |
|
int fd; |
|
short events; |
|
short revents; |
|
}; |
|
|
|
typedef unsigned long nfds_t; |
|
|
|
# define GNULIB_defined_poll_types 1 |
|
# endif |
|
|
|
|
|
# if !defined (_POSIX_C_SOURCE) && !defined (_XOPEN_SOURCE) |
|
# define INFTIM (-1) |
|
# endif |
|
|
|
#endif |
|
|
|
|
|
#if @GNULIB_POLL@ |
|
# if @REPLACE_POLL@ |
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
|
# undef poll |
|
# define poll rpl_poll |
|
# endif |
|
_GL_FUNCDECL_RPL (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); |
|
_GL_CXXALIAS_RPL (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); |
|
# else |
|
# if !@HAVE_POLL@ |
|
_GL_FUNCDECL_SYS (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); |
|
# endif |
|
_GL_CXXALIAS_SYS (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); |
|
# endif |
|
_GL_CXXALIASWARN (poll); |
|
#elif defined GNULIB_POSIXCHECK |
|
# undef poll |
|
# if HAVE_RAW_DECL_POLL |
|
_GL_WARN_ON_USE (poll, "poll is unportable - " |
|
"use gnulib module poll for portability"); |
|
# endif |
|
#endif |
|
|
|
|
|
#endif |
|
#endif |
|
|