flush
[m6w6/ext-psi] / m4 / poll.m4
diff --git a/m4/poll.m4 b/m4/poll.m4
new file mode 100644 (file)
index 0000000..2105a64
--- /dev/null
@@ -0,0 +1,24 @@
+PSI_CHECK_POLL() {
+       AC_CHECK_HEADERS(poll.h)
+
+       PSI_STRUCT(struct pollfd, [
+               int fd,
+               short events,
+               short revents]
+       )
+
+       PSI_TYPE(nfds_t, uint)
+
+       PSI_CONST(POLLIN, int)
+       PSI_CONST(POLLRDNORM, int)
+       PSI_CONST(POLLRDBAND, int)
+       PSI_CONST(POLLPRI, int)
+       PSI_CONST(POLLOUT, int)
+       PSI_CONST(POLLWRNORM, int)
+       PSI_CONST(POLLRWBAND, int)
+       PSI_CONST(POLLERR, int)
+       PSI_CONST(POLLHUP, int)
+       PSI_CONST(POLLNVAL, int)
+
+       PSI_DECL(int poll, [(struct pollfd *fds, nfds_t nfds, int timeout)])
+}