Commit e26aeb40 authored by Daniel Cohen Gindi's avatar Daniel Cohen Gindi Committed by Johannes Schindelin

MSVC: Use the Unix emulation headers

[JES: provided commit message, split out unrelated changes]
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent 366dda99
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include "tls.h" #include "tls.h"
#ifdef _MSC_VER #ifdef _MSC_VER
#include <BaseTsd.h> // That's for SSIZE_T
typedef SSIZE_T ssize_t;
#define snprintf _snprintf #define snprintf _snprintf
#endif #endif
...@@ -308,7 +310,11 @@ return TRUE; ...@@ -308,7 +310,11 @@ return TRUE;
if (ret != -1) if (ret != -1)
{ {
rfbClientLog("TLS handshake blocking.\n"); rfbClientLog("TLS handshake blocking.\n");
sleep(1); #ifdef WIN32
Sleep(1000);
#else
sleep(1);
#endif
timeout--; timeout--;
continue; continue;
} }
......
...@@ -108,6 +108,10 @@ typedef int8_t rfbBool; ...@@ -108,6 +108,10 @@ typedef int8_t rfbBool;
#define TRUE -1 #define TRUE -1
#endif #endif
#ifdef _MSC_VER
#include <stdint.h>
#endif
typedef uint32_t rfbKeySym; typedef uint32_t rfbKeySym;
typedef uint32_t rfbPixel; typedef uint32_t rfbPixel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment