summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2009-06-02 21:19:46 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2009-06-05 19:22:16 +0100
commit752508577aa7f0a1d80c8b7f4d3fe2b098e5e5fa (patch)
treec751cb03c1922810b088f98ffaea65116da08a25
parent7f3456a4080d1bf21010170e126128cb653bd2ac (diff)
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@dronecode.org.uk>
-rw-r--r--hw/xwin/winclipboard.h17
-rw-r--r--hw/xwin/winclipboardthread.c1
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 <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 9040f400c..8eb825fa8 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"
/*