1.0.42.41: use poll(2) instead of select(2) in SYSREAD-MAY-BLOCK-P
[sbcl.git] / tools-for-build / grovel-headers.c
index 3c3cebc..7f9ef4e 100644 (file)
@@ -32,6 +32,8 @@
   #include <shlobj.h>
   #undef boolean
 #else
+  #include <poll.h>
+  #include <sys/select.h>
   #include <sys/times.h>
   #include <sys/wait.h>
   #include <sys/ioctl.h>
@@ -41,7 +43,6 @@
 #endif
 
 #include <sys/stat.h>
-#include <sys/select.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <signal.h>
@@ -250,8 +251,15 @@ main(int argc, char *argv[])
 
     printf("(in-package \"SB!UNIX\")\n\n");
 
+    printf(";;; select()\n");
     defconstant("fd-setsize", FD_SETSIZE);
 
+    printf(";;; poll()\n");
+    defconstant("pollin", POLLIN);
+    defconstant("pollout", POLLOUT);
+    defconstant("pollpri", POLLPRI);
+    DEFTYPE("nfds-t", nfds_t);
+
     printf(";;; langinfo\n");
     defconstant("codeset", CODESET);