xserver: Branch 'master'

Jon TURNEY jturney at kemper.freedesktop.org
Fri Jun 5 11:22:42 PDT 2009


 hw/xwin/winclipboard.h       |   17 +----------------
 hw/xwin/winclipboardthread.c |    1 +
 2 files changed, 2 insertions(+), 16 deletions(-)

New commits:
commit 752508577aa7f0a1d80c8b7f4d3fe2b098e5e5fa
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Tue Jun 2 21:19:46 2009 +0100

    Cygwin/X: Tidy up a bodge to avoid collision between X header and native Win32 API definitions of ATOM
    
    Remove a bodge to avoid collision between X header and the native
    Win32 API definitions of ATOM, use X11/Xwindows.h which exists to
    address these issues
    
    Consequently, include misc.h in winclipboardthread.c, to provide the
    max() macro, as previously we were using the the one from windows.h
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winclipboard.h b/hw/xwin/winclipboard.h
index 0602229..089c291 100644
--- a/hw/xwin/winclipboard.h
+++ b/hw/xwin/winclipboard.h
@@ -48,27 +48,12 @@
 /* X headers */
 #include <X11/X.h>
 #include <X11/Xatom.h>
-/* NOTE: For some unknown reason, including Xproto.h solves
- * tons of problems with including windows.h.  Unknowns reasons
- * are usually bad, so someone should investigate this.
- */
 #include <X11/Xproto.h>
 #include <X11/Xutil.h>
 #include <X11/Xlocale.h>
 
-/* Fixups to prevent collisions between Windows and X headers */
-#define ATOM			DWORD
-
-#ifndef __CYGWIN__
-#define sleep(x) Sleep (1000 * (x))
-#endif
-
 /* Windows headers */
-#ifndef XFree86Server
-#define XFree86Server
-#endif
-#include <windows.h>
-#undef XFree86Server
+#include <X11/Xwindows.h>
 
 
 /* Clipboard module constants */
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c
index 9040f40..8eb825f 100644
--- a/hw/xwin/winclipboardthread.c
+++ b/hw/xwin/winclipboardthread.c
@@ -39,6 +39,7 @@
 #include <errno.h>
 #endif
 #include "X11/Xauth.h"
+#include "misc.h"
 
 
 /*


More information about the xorg-commit mailing list