aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--configure.ac3
-rw-r--r--lib/select.h8
-rw-r--r--src/main.c2
-rw-r--r--tests/server/util.c4
5 files changed, 17 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index de5295e1d..51c0778ed 100644
--- 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
diff --git a/configure.ac b/configure.ac
index 5f2e99055..dfb6d298a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)
diff --git a/lib/select.h b/lib/select.h
index 54c7c75cf..21ae02d72 100644
--- a/lib/select.h
+++ b/lib/select.h
@@ -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
diff --git a/src/main.c b/src/main.c
index 406740d98..4027ea42f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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
diff --git a/tests/server/util.c b/tests/server/util.c
index 8017081fa..95f8c521e 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -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