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>
This commit is contained in:
parent
7f3456a408
commit
752508577a
|
@ -48,27 +48,12 @@
|
||||||
/* X headers */
|
/* X headers */
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xatom.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/Xproto.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/Xlocale.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 */
|
/* Windows headers */
|
||||||
#ifndef XFree86Server
|
#include <X11/Xwindows.h>
|
||||||
#define XFree86Server
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
|
||||||
#undef XFree86Server
|
|
||||||
|
|
||||||
|
|
||||||
/* Clipboard module constants */
|
/* Clipboard module constants */
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
#include "X11/Xauth.h"
|
#include "X11/Xauth.h"
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user