summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 07ad5a1)
raw | patch | inline | side by side (parent: 07ad5a1)
author | Johannes Sixt <johannes.sixt@telecom.at> | |
Tue, 23 Sep 2008 06:52:16 +0000 (08:52 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 29 Sep 2008 15:22:40 +0000 (08:22 -0700) |
Our poll() emulation did not support the timeout argument. With this patch
we support it for the simple case where poll() does not need to wait on
file descriptors as well because this case amounts to a mere Sleep().
This is needed if the user sets help.autocorrect is set to a positive
value.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
we support it for the simple case where poll() does not need to wait on
file descriptors as well because this case amounts to a mere Sleep().
This is needed if the user sets help.autocorrect is set to a positive
value.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
compat/mingw.c | patch | blob | history |
diff --git a/compat/mingw.c b/compat/mingw.c
index ccfa2a0a3d3263862beb0d2796be1aba78574986..7eed60db1b10cc303f37e1bf3307058af94b8f9d 100644 (file)
--- a/compat/mingw.c
+++ b/compat/mingw.c
{
int i, pending;
- if (timeout != -1)
+ if (timeout >= 0) {
+ if (nfds == 0) {
+ Sleep(timeout);
+ return 0;
+ }
return errno = EINVAL, error("poll timeout not supported");
+ }
/* When there is only one fd to wait for, then we pretend that
* input is available and let the actual wait happen when the