Revert addition of verify, for BSD/OS.
[gnulib.git] / lib / poll.c
index 2278aa8..ed81dba 100644 (file)
 #define EOVERFLOW EINVAL
 #endif
 
+/* BeOS does not have MSG_PEEK.  */
+#ifndef MSG_PEEK
+#define MSG_PEEK 0
+#endif
+
 int
 poll (pfd, nfd, timeout)
      struct pollfd *pfd;
@@ -125,11 +130,16 @@ poll (pfd, nfd, timeout)
                               | POLLWRNORM | POLLWRBAND)))
        {
          maxfd = pfd[i].fd;
+
+         /* Windows use a linear array of sockets (of size FD_SETSIZE). The
+            descriptor value is not used to address the array.  */ 
+#if defined __CYGWIN__ || (!defined _WIN32 && !defined __WIN32__)
          if (maxfd > FD_SETSIZE)
            {
              errno = EOVERFLOW;
              return -1;
            }
+#endif
        }
     }