aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/XlibInt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/XlibInt.c')
-rw-r--r--libX11/src/XlibInt.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/libX11/src/XlibInt.c b/libX11/src/XlibInt.c
index 2827c106a..59a7585d8 100644
--- a/libX11/src/XlibInt.c
+++ b/libX11/src/XlibInt.c
@@ -33,6 +33,7 @@ from The Open Group.
#ifdef WIN32
#define _XLIBINT_
+#include <X11\Xw32defs.h>
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -145,6 +146,19 @@ xthread_t (*_Xthread_self_fn)(void) = NULL;
#define POLLFD_CACHE_SIZE 5
+#if _WIN32_WINNT < _WIN32_WINNT_VISTA
+struct pollfd {
+
+ SOCKET fd;
+ SHORT events;
+ SHORT revents;
+
+};
+#define POLLRDNORM 0x0100
+#define POLLRDBAND 0x0200
+#define POLLIN (POLLRDNORM | POLLRDBAND)
+#endif
+
/* initialize the struct array passed to poll() below */
Bool _XPollfdCacheInit(
Display *dpy)
@@ -198,6 +212,11 @@ void _XPollfdCacheDel(
#endif
}
+#ifdef _MSC_VER
+#undef min
+#define min __min
+#endif
+
static int sync_hazard(Display *dpy)
{
unsigned long span = dpy->request - dpy->last_request_read;
@@ -239,7 +258,7 @@ void _XSeqSyncFunction(
static int
_XPrivSyncFunction (Display *dpy)
{
-#if XTHREADS
+#ifdef XTHREADS
assert(!dpy->lock_fns);
#endif
assert(dpy->synchandler == _XPrivSyncFunction);