summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/select.c
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2010-12-16 19:59:05 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-12-16 19:59:05 (GMT)
commit8d3689072394e6410c766eac9a8b0cae598f6500 (patch)
treea0591d8bae8625071f9337049b5d9f33f3e900e0 /Utilities/cmcurl/select.c
parentc5cbb318c5bc9c5bf0d5decb7c05b44853180cc0 (diff)
downloadCMake-8d3689072394e6410c766eac9a8b0cae598f6500.zip
CMake-8d3689072394e6410c766eac9a8b0cae598f6500.tar.gz
CMake-8d3689072394e6410c766eac9a8b0cae598f6500.tar.bz2
Use _POLL_EMUL_H_ instead of HAVE_POLL_FINE
Headers define _POLL_EMUL_H_ if they are not in the kernel, so a try_run check for them is not necessary.
Diffstat (limited to 'Utilities/cmcurl/select.c')
-rw-r--r--Utilities/cmcurl/select.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Utilities/cmcurl/select.c b/Utilities/cmcurl/select.c
index d3967ed..3656edd 100644
--- a/Utilities/cmcurl/select.c
+++ b/Utilities/cmcurl/select.c
@@ -78,7 +78,7 @@
*/
int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
{
-#if defined(HAVE_POLL_FINE) || defined(CURL_HAVE_WSAPOLL)
+#if !defined(_POLL_EMUL_H_) || defined(CURL_HAVE_WSAPOLL)
struct pollfd pfd[2];
int num;
int r;
@@ -96,7 +96,7 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
num++;
}
-#ifdef HAVE_POLL_FINE
+#ifndef _POLL_EMUL_H_
do {
r = poll(pfd, num, timeout_ms);
} while((r == -1) && (errno == EINTR));
@@ -220,7 +220,7 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
{
int r;
-#ifdef HAVE_POLL_FINE
+#ifndef _POLL_EMUL_H_
do {
r = poll(ufds, nfds, timeout_ms);
} while((r == -1) && (errno == EINTR));