]> granicus.if.org Git - curl/commitdiff
check availability of poll.h header at configuration time, and include
authorYang Tse <yangsita@gmail.com>
Tue, 22 Jan 2008 14:52:54 +0000 (14:52 +0000)
committerYang Tse <yangsita@gmail.com>
Tue, 22 Jan 2008 14:52:54 +0000 (14:52 +0000)
it when sys/poll.h is unavailable

CHANGES
configure.ac
lib/select.h
src/main.c
tests/server/util.c

diff --git a/CHANGES b/CHANGES
index de5295e1d3b1b4c60a4ff03e6abfbd6d40a5da0f..51c0778edcebf277451e0af2666f383ac32d0f07 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,9 @@
 
                                   Changelog
 
+Yang Tse (22 Jan 2008)
+- Check poll.h at configuration time, and use it when sys/poll.h unavailable
+
 Daniel S (22 Jan 2008)
 - Dmitry Kurochkin removed the cancelled state for pipelining, as we agreed
   that it is bad anyway. Starting now, removing a handle that is in used in a
index 5f2e99055075ab20983203c19428034429d80913..dfb6d298afbed797e88d245cc0c0a6f09d3bc174 100644 (file)
@@ -1865,6 +1865,7 @@ AC_CHECK_HEADERS(
         utime.h \
         sys/utime.h \
         sys/poll.h \
+        poll.h \
         sys/resource.h \
         libgen.h \
         locale.h \
@@ -2127,6 +2128,8 @@ if test "$disable_poll" = "no"; then
     AC_RUN_IFELSE([
 #ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>
+#elif defined(HAVE_POLL_H)
+#include <poll.h>
 #endif
 
   int main(void)
index 54c7c75cfada15272e239b63f5d5f8042857ff2e..21ae02d72183a3445b4b639d3e5cf6b609220e0c 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -27,6 +27,8 @@
 
 #ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>
+#elif defined(HAVE_POLL_H)
+#include <poll.h>
 #endif
 
 /*
@@ -49,7 +51,9 @@
  * Definition of pollfd struct and constants for platforms lacking them.
  */
 
-#if !defined(HAVE_STRUCT_POLLFD) && !defined(HAVE_SYS_POLL_H)
+#if !defined(HAVE_STRUCT_POLLFD) && \
+    !defined(HAVE_SYS_POLL_H) && \
+    !defined(HAVE_POLL_H)
 
 #define POLLIN      0x01
 #define POLLPRI     0x02
index 406740d983cd7d65ff037031f4bb677880c05a54..4027ea42fc84e3d300deb57241d2c41b5ebb30ca 100644 (file)
@@ -85,6 +85,8 @@
 
 #ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>
+#elif defined(HAVE_POLL_H)
+#include <poll.h>
 #endif
 
 #ifdef HAVE_LOCALE_H
index 8017081faba3440e3c24a27687f8888b1e954ed6..95f8c521e7d0a16aa99d5f8f1f89425d27c2b4ac 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -47,6 +47,8 @@
 #endif
 #ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>
+#elif defined(HAVE_POLL_H)
+#include <poll.h>
 #endif
 
 #define ENABLE_CURLX_PRINTF