summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2022-06-22 10:35:26 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-07-23 23:38:19 +0000
commitede86501a4e051690f698de24a5140fa3a3c0762 (patch)
treee31ab31e8322892bd64a625a20115560788ade11
parent7ca8d2042d1cac990d77982a2bcf492ed0548a8b (diff)
Win32: Fix collision over 'ControlMask'
Workaround the collision between ControlMask #defined in X11/X.h and ControlMask used as the name of a structure member in w32api/processthreadsapi.h in w32api 10.0.0
-rw-r--r--include/X11/Xwindows.h3
-rw-r--r--include/X11/Xwinsock.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/include/X11/Xwindows.h b/include/X11/Xwindows.h
index 70e1deb..33f98a6 100644
--- a/include/X11/Xwindows.h
+++ b/include/X11/Xwindows.h
@@ -72,6 +72,8 @@ The Open Group.
#define ATOM wATOM
#define BYTE wBYTE
#define FreeResource wFreeResource
+#pragma push_macro ("ControlMask")
+#undef ControlMask
#include <windows.h>
#undef NOMINMAX
#undef Status
@@ -83,6 +85,7 @@ The Open Group.
#undef LONG64
#undef ATOM
#undef FreeResource
+#pragma pop_macro ("ControlMask")
#undef CreateWindowA
/*
diff --git a/include/X11/Xwinsock.h b/include/X11/Xwinsock.h
index 624047d..722a3cd 100644
--- a/include/X11/Xwinsock.h
+++ b/include/X11/Xwinsock.h
@@ -52,6 +52,8 @@ The Open Group.
#define ATOM wATOM
#define BYTE wBYTE
#define FreeResource wFreeResource
+#pragma push_macro ("ControlMask")
+#undef ControlMask
#include <winsock2.h>
#undef Status
#define Status int
@@ -60,6 +62,7 @@ The Open Group.
#undef INT32
#undef ATOM
#undef FreeResource
+#pragma pop_macro ("ControlMask")
#undef CreateWindowA
#undef RT_FONT
#undef RT_CURSOR