X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=cbits%2FinputReady.c;h=f827fe5def79ec1f5deb0a0521f8847281d4bdd4;hb=39a5ea109fa64862651574cb25e1c2b0c792c95d;hp=2949e9494bbef90696f4c1d613018dc5b9f3cf30;hpb=4c022a01d14aa47330f3203e6b25e316a502f999;p=haskell-directory.git diff --git a/cbits/inputReady.c b/cbits/inputReady.c index 2949e94..f827fe5 100644 --- a/cbits/inputReady.c +++ b/cbits/inputReady.c @@ -17,10 +17,10 @@ int inputReady(int fd, int msecs, int isSock) { if -#ifndef mingw32_HOST_OS - ( 1 ) { -#else +#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) ( isSock ) { +#else + ( 1 ) { #endif int maxfd, ready; fd_set rfd; @@ -45,7 +45,7 @@ inputReady(int fd, int msecs, int isSock) /* 1 => Input ready, 0 => not ready, -1 => error */ return (ready); } -#ifdef mingw32_HOST_OS +#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) else { DWORD rc; HANDLE hFile = (HANDLE)_get_osfhandle(fd);