aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_util.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-12 18:20:04 +0000
committermarha <marha@users.sourceforge.net>2009-07-12 18:20:04 +0000
commitda8fe31a7ba4acf109097d5696ad0145b991cdfd (patch)
tree1c74d6f075702a73e557872f2a6f020ea4eb5432 /libxcb/src/xcb_util.c
parent6590f805a12779909cb8504c230fa367148fe38c (diff)
parent529dcfd0858d75cb3c87c73cb0f81dd20bbb9230 (diff)
downloadvcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.gz
vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.bz2
vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.zip
Changes for VC compilation
Diffstat (limited to 'libxcb/src/xcb_util.c')
-rw-r--r--libxcb/src/xcb_util.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/libxcb/src/xcb_util.c b/libxcb/src/xcb_util.c
index dd2305abd..9103e6acc 100644
--- a/libxcb/src/xcb_util.c
+++ b/libxcb/src/xcb_util.c
@@ -26,6 +26,10 @@
/* Utility functions implementable using only public APIs. */
#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef _MSC_VER
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@@ -35,16 +39,30 @@
#include <netdnet/dn.h>
#endif
#include <netdb.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
+
+#else
+#include <X11/Xwinsock.h>
+#include <X11\Xos.h>
+#define snprintf _snprintf
+#define HAVE_GETADDRINFO
+#endif
+
#include <string.h>
#include "xcb.h"
#include "xcbext.h"
#include "xcbint.h"
+#ifndef HAVE_GETADDRINFO
+#include "dummyin6.h"
+#include "getaddrinfo.h"
+#else
+#ifdef _MSC_VER
+#include <Ws2tcpip.h>
+#endif
+#endif
+
static const int error_connection = 1;
int xcb_popcount(uint32_t mask)