]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Cygwin 1.5.21 needs this hack to pass test 160.
authorYang Tse <yangsita@gmail.com>
Mon, 9 Oct 2006 00:35:36 +0000 (00:35 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 9 Oct 2006 00:35:36 +0000 (00:35 +0000)
In this way 304 tests out of 304 reported OK.

lib/select.c

index 4a7fee4921bc3edec5de0724886203d86d8e185e..7c2f2624f1d6119af95caff6ab1a770934a1c018 100644 (file)
@@ -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) {