From 752508577aa7f0a1d80c8b7f4d3fe2b098e5e5fa Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 2 Jun 2009 21:19:46 +0100 Subject: [PATCH] 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 --- hw/xwin/winclipboard.h | 17 +---------------- hw/xwin/winclipboardthread.c | 1 + 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/hw/xwin/winclipboard.h b/hw/xwin/winclipboard.h index 0602229e3..089c2913b 100644 --- a/hw/xwin/winclipboard.h +++ b/hw/xwin/winclipboard.h @@ -48,27 +48,12 @@ /* X headers */ #include #include -/* 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 #include #include -/* 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 -#undef XFree86Server +#include /* Clipboard module constants */ diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c index 9040f400c..8eb825fa8 100644 --- a/hw/xwin/winclipboardthread.c +++ b/hw/xwin/winclipboardthread.c @@ -39,6 +39,7 @@ #include #endif #include "X11/Xauth.h" +#include "misc.h" /*