diff options
Diffstat (limited to 'libX11/src/XlibInt.c')
-rw-r--r-- | libX11/src/XlibInt.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libX11/src/XlibInt.c b/libX11/src/XlibInt.c index 92a434004..8a51f49c4 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> @@ -42,6 +43,7 @@ from The Open Group. #include <X11/Xpoll.h> #include <assert.h> #include <stdio.h> +#include <unistd.h> #ifdef WIN32 #include <direct.h> #endif @@ -145,6 +147,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 +213,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; |