Commit bdb2beb8 authored by Yang Tse's avatar Yang Tse
Browse files

check availability of poll.h header at configuration time, and include

it when sys/poll.h is unavailable
parent 727e2332
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -6,6 +6,9 @@


                                  Changelog
                                  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)
Daniel S (22 Jan 2008)
- Dmitry Kurochkin removed the cancelled state for pipelining, as we agreed
- 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
  that it is bad anyway. Starting now, removing a handle that is in used in a
+3 −0
Original line number Original line Diff line number Diff line
@@ -1865,6 +1865,7 @@ AC_CHECK_HEADERS(
        utime.h \
        utime.h \
        sys/utime.h \
        sys/utime.h \
        sys/poll.h \
        sys/poll.h \
        poll.h \
        sys/resource.h \
        sys/resource.h \
        libgen.h \
        libgen.h \
        locale.h \
        locale.h \
@@ -2127,6 +2128,8 @@ if test "$disable_poll" = "no"; then
    AC_RUN_IFELSE([
    AC_RUN_IFELSE([
#ifdef HAVE_SYS_POLL_H
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#include <sys/poll.h>
#elif defined(HAVE_POLL_H)
#include <poll.h>
#endif
#endif


  int main(void)
  int main(void)
+6 −2
Original line number Original line Diff line number Diff line
@@ -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
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * you should have received as part of this distribution. The terms
@@ -27,6 +27,8 @@


#ifdef HAVE_SYS_POLL_H
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#include <sys/poll.h>
#elif defined(HAVE_POLL_H)
#include <poll.h>
#endif
#endif


/*
/*
@@ -49,7 +51,9 @@
 * Definition of pollfd struct and constants for platforms lacking them.
 * 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 POLLIN      0x01
#define POLLPRI     0x02
#define POLLPRI     0x02
+2 −0
Original line number Original line Diff line number Diff line
@@ -85,6 +85,8 @@


#ifdef HAVE_SYS_POLL_H
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#include <sys/poll.h>
#elif defined(HAVE_POLL_H)
#include <poll.h>
#endif
#endif


#ifdef HAVE_LOCALE_H
#ifdef HAVE_LOCALE_H
+3 −1
Original line number Original line Diff line number Diff line
@@ -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
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * you should have received as part of this distribution. The terms
@@ -47,6 +47,8 @@
#endif
#endif
#ifdef HAVE_SYS_POLL_H
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#include <sys/poll.h>
#elif defined(HAVE_POLL_H)
#include <poll.h>
#endif
#endif


#define ENABLE_CURLX_PRINTF
#define ENABLE_CURLX_PRINTF