summaryrefslogtreecommitdiff
path: root/os/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/io.c')
-rw-r--r--os/io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/io.c b/os/io.c
index 956a53300..75aebcb5e 100644
--- a/os/io.c
+++ b/os/io.c
@@ -94,6 +94,7 @@ CallbackListPtr FlushCallback;
* systems are broken and return EWOULDBLOCK when they should return EAGAIN
*/
#ifndef __UNIXOS2__
+#ifndef WIN32
#if defined(EAGAIN) && defined(EWOULDBLOCK)
#define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK)
#else
@@ -103,6 +104,9 @@ CallbackListPtr FlushCallback;
#define ETEST(err) (err == EWOULDBLOCK)
#endif
#endif
+#else /* WIN32 The socket errorcodes differ from the normal errors*/
+#define ETEST(err) (err == EAGAIN || err == WSAEWOULDBLOCK)
+#endif
#else /* __UNIXOS2__ Writing to full pipes may return ENOSPC */
#define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK || err == ENOSPC)
#endif