aboutsummaryrefslogtreecommitdiff
path: root/lib/select.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-04-07 21:50:47 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-04-07 21:50:47 +0000
commit5a4b43848ac21b3d831f00ce11136e20f820f0a0 (patch)
tree981b8520e1f9aa683da489c8a283fb513dd26f16 /lib/select.c
parentd98869a0889195a9e0d353cf691219f78186ac93 (diff)
First commit of David McCreedy's EBCDIC and TPF changes.
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 */