aboutsummaryrefslogtreecommitdiff
path: root/lib/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/select.c')
-rw-r--r--lib/select.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/select.c b/lib/select.c
index f370b1110..343dc469f 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -50,8 +50,8 @@
#include "connect.h"
#include "select.h"
-#ifdef WIN32
-#define VERIFY_SOCK(x) /* Win-sockets are not in range [0..FD_SETSIZE> */
+#if defined(WIN32) || defined(TPF)
+#define VERIFY_SOCK(x) /* sockets are not in range [0..FD_SETSIZE] */
#else
#define VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
#define VERIFY_SOCK(x) do { \
@@ -261,3 +261,23 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
#endif
return r;
}
+
+#ifdef TPF
+/*
+ * This is a replacement for select() on the TPF platform.
+ * It is used whenever libcurl calls select().
+ * The call below to tpf_process_signals() is required because
+ * TPF's select calls are not signal interruptible.
+ *
+ * Return values are the same as select's.
+ */
+int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes,
+ fd_set* excepts, struct timeval* tv)
+{
+ int rc;
+
+ rc = tpf_select_bsd(maxfds, reads, writes, excepts, tv);
+ tpf_process_signals();
+ return(rc);
+}
+#endif /* TPF */