summaryrefslogtreecommitdiff
path: root/lib/select.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-03-27 18:15:26 +0000
committerYang Tse <yangsita@gmail.com>2007-03-27 18:15:26 +0000
commiteed47311f8afb47b5a68b512c58c7031b91ff180 (patch)
tree3fe5f336c02a11f73ea7899b93ef4686275e94a6 /lib/select.h
parent59eaae42b8f4275e044cb9ed186be0054274c74a (diff)
downloadcurl-eed47311f8afb47b5a68b512c58c7031b91ff180.tar.gz
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.
Diffstat (limited to 'lib/select.h')
-rw-r--r--lib/select.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/select.h b/lib/select.h
index 8c59f155e..5a62a6fd8 100644
--- a/lib/select.h
+++ b/lib/select.h
@@ -64,6 +64,18 @@ struct pollfd
#endif
+#ifndef POLLRDNORM
+#define POLLRDNORM POLLIN
+#endif
+
+#ifndef POLLWRNORM
+#define POLLWRNORM POLLOUT
+#endif
+
+#ifndef POLLRDBAND
+#define POLLRDBAND POLLPRI
+#endif
+
#define CSELECT_IN 0x01
#define CSELECT_OUT 0x02
#define CSELECT_ERR 0x04
@@ -72,6 +84,10 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd, int timeout_m
int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
+int Curl_select(int nfds,
+ fd_set *fds_read, fd_set *fds_write, fd_set *fds_excep,
+ struct timeval *timeout);
+
#ifdef TPF
int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes,
fd_set* excepts, struct timeval* tv);