summaryrefslogtreecommitdiffstats
path: root/libvncclient/vncviewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncclient/vncviewer.c')
-rw-r--r--libvncclient/vncviewer.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
index 8237254..9d657ed 100644
--- a/libvncclient/vncviewer.c
+++ b/libvncclient/vncviewer.c
@@ -21,6 +21,11 @@
* vncviewer.c - the Xt-based VNC viewer.
*/
+#ifdef WIN32
+#undef SOCKET
+#include <winsock2.h>
+#endif
+
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
#define _POSIX_SOURCE
@@ -40,12 +45,10 @@ static rfbBool DummyPoint(rfbClient* client, int x, int y) {
static void DummyRect(rfbClient* client, int x, int y, int w, int h) {
}
-#ifdef __MINGW32__
+#ifdef WIN32
static char* NoPassword(rfbClient* client) {
return strdup("");
}
-#undef SOCKET
-#include <winsock2.h>
#define close closesocket
#else
#include <stdio.h>
@@ -53,9 +56,9 @@ static char* NoPassword(rfbClient* client) {
#endif
static char* ReadPassword(rfbClient* client) {
-#ifdef __MINGW32__
+#ifdef WIN32
/* FIXME */
- rfbClientErr("ReadPassword on MinGW32 NOT IMPLEMENTED\n");
+ rfbClientErr("ReadPassword on Windows NOT IMPLEMENTED\n");
return NoPassword(client);
#else
int i;
OpenPOWER on IntegriCloud