New Internal wrapper function Curl_select() around select (2), it

uses poll() when a fine poll() is available, so now libcurl can be
built without select() support at all if a fine poll() is available.
This commit is contained in:
Yang Tse
2007-03-27 18:15:26 +00:00
parent 59eaae42b8
commit eed47311f8
6 changed files with 222 additions and 10 deletions

View File

@@ -61,10 +61,6 @@
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#endif /* WIN32 ... */
#include "urldata.h"
@@ -79,6 +75,7 @@
#include "memory.h"
#include "progress.h"
#include "easyif.h"
#include "select.h"
#include "sendf.h" /* for failf function prototype */
#include <ca-bundle.h>
@@ -417,7 +414,7 @@ CURLcode curl_easy_perform(CURL *easy)
/* get file descriptors from the transfers */
curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
rc = Curl_select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
if(rc == -1)
/* select error */