From: Ben Gras Date: Fri, 13 Dec 2013 10:58:44 +0000 (+0100) Subject: X-Git-Tag: v3.3.0~447 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/dnssec-keyfromlabel.html?a=commitdiff_plain;h=7435a20c91e83cf07d30e46f255b74f165f6fb95;p=minix.git Change-Id: I8758d224115bdd1344cd00da6e636c529b1c191e --- diff --git a/sys/sys/poll.h b/sys/sys/poll.h index e429710e9..8267c008d 100644 --- a/sys/sys/poll.h +++ b/sys/sys/poll.h @@ -29,12 +29,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _NBCOMPAT_POLL_H_ -#define _NBCOMPAT_POLL_H_ +#ifndef _SYS_POLL_H_ +#define _SYS_POLL_H_ -typedef unsigned int nfds_t; +#include -#define INFTIM -1 +typedef unsigned int nfds_t; struct pollfd { int fd; /* file descriptor */ @@ -60,8 +60,42 @@ struct pollfd { #define POLLHUP 0x0010 #define POLLNVAL 0x0020 +#if defined(_NETBSD_SOURCE) +/* + * Infinite timeout value. + */ +#define INFTIM -1 +#endif + +#ifdef _KERNEL +#include /* for sigset_t */ + +struct lwp; +struct timespec; + +int pollcommon(register_t *, struct pollfd *, u_int, + struct timespec *, sigset_t *); + +#else +#include + __BEGIN_DECLS int poll(struct pollfd *, nfds_t, int); __END_DECLS -#endif /* !_NBCOMPAT_POLL_H_ */ +#ifdef _NETBSD_SOURCE +#include /* for sigset_t */ +struct timespec; + +__BEGIN_DECLS +#ifndef __LIBC12_SOURCE__ +int pollts(struct pollfd * __restrict, nfds_t, + const struct timespec * __restrict, const sigset_t * __restrict) + __RENAME(__pollts50); +#endif /* __LIBC12_SOURCE__ */ +__END_DECLS +#endif /* _NETBSD_SOURCE */ + +#endif /* _KERNEL */ + +#endif /* !_SYS_POLL_H_ */