summaryrefslogtreecommitdiff
path: root/ev_select.c
diff options
context:
space:
mode:
authorroot <root>2008-05-26 03:54:40 +0000
committerroot <root>2008-05-26 03:54:40 +0000
commitd993d6efe358429d7aec3709f3ce85b50a756e2b (patch)
tree69ef97b637558a5736c3b91af5eae3af2a5dbd74 /ev_select.c
parentae82b3131532560f75a0b1e1e87624b881373d03 (diff)
*** empty log message ***
Diffstat (limited to 'ev_select.c')
-rw-r--r--ev_select.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ev_select.c b/ev_select.c
index fcebcc6..9c63f0d 100644
--- a/ev_select.c
+++ b/ev_select.c
@@ -134,7 +134,16 @@ select_poll (EV_P_ ev_tstamp timeout)
tv.tv_sec = (long)timeout;
tv.tv_usec = (long)((timeout - (ev_tstamp)tv.tv_sec) * 1e6);
+#ifdef _WIN32
+ /* pass in the write set as except set.
+ * the idea behind this is to work around a windows bug that causes
+ * errors to be reported as an exception and not by setting
+ * the writable bit. this is so uncontrollably lame.
+ */
+ res = select (vec_max * NFDBITS, (fd_set *)vec_ro, (fd_set *)vec_wo, (fd_set *)vec_wo, &tv);
+#else
res = select (vec_max * NFDBITS, (fd_set *)vec_ro, (fd_set *)vec_wo, 0, &tv);
+#endif
if (expect_false (res < 0))
{