diff options
author | Yang Tse <yangsita@gmail.com> | 2006-10-09 00:35:36 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2006-10-09 00:35:36 +0000 |
commit | eceb37bde2a0a5ce6be3a141d8d420be28a12fa0 (patch) | |
tree | c4d8025badec9cbd0c03d6c85c6e5fab28d4e387 /lib | |
parent | 56fcf85ab61b4dc44796f1241e1b7c2349afc6ea (diff) | |
download | curl-eceb37bde2a0a5ce6be3a141d8d420be28a12fa0.tar.gz |
Cygwin 1.5.21 needs this hack to pass test 160.
In this way 304 tests out of 304 reported OK.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/select.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/select.c b/lib/select.c index 4a7fee492..7c2f2624f 100644 --- a/lib/select.c +++ b/lib/select.c @@ -110,8 +110,15 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms) if (readfd != CURL_SOCKET_BAD) { if (pfd[num].revents & (POLLIN|POLLHUP)) ret |= CSELECT_IN; - if (pfd[num].revents & POLLERR) - ret |= CSELECT_ERR; + if (pfd[num].revents & POLLERR) { +#ifdef __CYGWIN__ + /* Cygwin 1.5.21 needs this hack to pass test 160 */ + if (errno == EINPROGRESS) + ret |= CSELECT_IN; + else +#endif + ret |= CSELECT_ERR; + } num++; } if (writefd != CURL_SOCKET_BAD) { |