From: Simon Marlow Date: Thu, 30 Aug 2007 13:11:15 +0000 (+0000) Subject: make hWaitForInput/hReady not fail with "invalid argument" on Windows X-Git-Tag: 2007-09-13~3 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8aeccbecaca833ede3c88a95094368150ac62c21;p=ghc-base.git make hWaitForInput/hReady not fail with "invalid argument" on Windows See #1198. This doesn't fully fix it, because hReady still always returns False on file handles. I'm not really sure how to fix that. --- diff --git a/cbits/inputReady.c b/cbits/inputReady.c index f539110..947cc4f 100644 --- a/cbits/inputReady.c +++ b/cbits/inputReady.c @@ -75,7 +75,8 @@ fdReady(int fd, int write, int msecs, int isSock) if (rc == ERROR_BROKEN_PIPE) { return 1; // this is probably what we want } - if (rc != ERROR_INVALID_HANDLE) { + if (rc != ERROR_INVALID_HANDLE && rc != ERROR_INVALID_FUNCTION) { + maperrno(); return -1; } }