diff options
author | Daniel Cohen Gindi <danielgindi@gmail.com> | 2014-08-29 10:59:56 +0300 |
---|---|---|
committer | Johannes Schindelin <johannes.schindelin@gmx.de> | 2014-09-02 16:43:17 +0200 |
commit | 366dda995182b3d4b199a3df262cdacb6d40cecc (patch) | |
tree | 69a6768ea6a314e9ee6372c7b35abc3925d80790 /libvncclient/sockets.c | |
parent | 4c2cfb17f02b4eac9499ce2ba215426a1c85de8f (diff) | |
download | libtdevnc-366dda995182b3d4b199a3df262cdacb6d40cecc.tar.gz libtdevnc-366dda995182b3d4b199a3df262cdacb6d40cecc.zip |
Use WIN32 for Windows-specific #ifdef guards
To support Microsoft Visual C++, we must not guard Windows-specific code
in MinGW-specific #ifdef guards.
Happily, even 64-bit MSVC defines the WIN32 constant, therefore we can use
that instead.
[JES: fixed commit message, reordered commit, split out unrelated changes]
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'libvncclient/sockets.c')
-rw-r--r-- | libvncclient/sockets.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c index 7ddf1b2..e50ef0e 100644 --- a/libvncclient/sockets.c +++ b/libvncclient/sockets.c @@ -38,7 +38,9 @@ #ifdef WIN32 #undef SOCKET #include <winsock2.h> +#ifdef MINGW32 #define EWOULDBLOCK WSAEWOULDBLOCK +#endif #define close closesocket #define read(sock,buf,len) recv(sock,buf,len,0) #define write(sock,buf,len) send(sock,buf,len,0) @@ -109,7 +111,7 @@ ReadFromRFBServer(rfbClient* client, char *out, unsigned int n) diff.tv_sec--; diff.tv_usec+=1000000; } -#ifndef __MINGW32__ +#ifndef WIN32 sleep (diff.tv_sec); usleep (diff.tv_usec); #else |