diff options
Diffstat (limited to 'libs/libcurl/src/select.h')
-rw-r--r-- | libs/libcurl/src/select.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libs/libcurl/src/select.h b/libs/libcurl/src/select.h index c00afe166f..4351786c39 100644 --- a/libs/libcurl/src/select.h +++ b/libs/libcurl/src/select.h @@ -7,11 +7,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2017, 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 - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -24,10 +24,10 @@ #include "curl_setup.h" -#ifdef HAVE_SYS_POLL_H -#include <sys/poll.h> -#elif defined(HAVE_POLL_H) +#ifdef HAVE_POLL_H #include <poll.h> +#elif defined(HAVE_SYS_POLL_H) +#include <sys/poll.h> #endif /* @@ -36,7 +36,8 @@ #if !defined(HAVE_STRUCT_POLLFD) && \ !defined(HAVE_SYS_POLL_H) && \ - !defined(HAVE_POLL_H) + !defined(HAVE_POLL_H) && \ + !defined(POLLIN) #define POLLIN 0x01 #define POLLPRI 0x02 @@ -73,11 +74,12 @@ struct pollfd int Curl_socket_check(curl_socket_t readfd, curl_socket_t readfd2, curl_socket_t writefd, - long timeout_ms); + time_t timeout_ms); -/* provide the former API internally */ -#define Curl_socket_ready(x,y,z) \ - Curl_socket_check(x, CURL_SOCKET_BAD, y, z) +#define SOCKET_READABLE(x,z) \ + Curl_socket_check(x, CURL_SOCKET_BAD, CURL_SOCKET_BAD, z) +#define SOCKET_WRITABLE(x,z) \ + Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z) int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); |