dix: workaround for win32 name clash on CreateWindow()

The problem is, ming32 headers unconditionally define CreateWindow() to
alias CreateWindowA() in winuser.h, which is included by windows.h, which
is included by *a lot* common headers. So it highly depends on the exact
include order, whether it works. (also weird things could happen, e.g.
the Xserver's CreateWindow() ending up renamed to CreateWindowA(), ...)

Until we've found a really clean solution to this problem (which might
involve fixing mingw32 first), just add a little workaround by undef'ing
CreateWindow symbol whereever necessary.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-03-11 10:08:13 +01:00 committed by Alan Coopersmith
parent 232cad9ec3
commit 1ca48d0a48

View File

@ -132,6 +132,9 @@ Equipment Corporation.
#include "client.h"
#include "xfixesint.h"
// temporary workaround for win32/mingw32 name clash
#undef CreateWindow
#ifdef XSERVER_DTRACE
#include "probes.h"
#endif