[PATCH v3 1/3] winex11.drv: Define ControlMask when not available

Alistair Leslie-Hughes wine at gitlab.winehq.org
Tue May 24 02:56:16 CDT 2022


From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/winex11.drv/bitblt.c      | 3 +++
 dlls/winex11.drv/event.c       | 3 +++
 dlls/winex11.drv/keyboard.c    | 8 ++++++++
 dlls/winex11.drv/mouse.c       | 4 ++++
 dlls/winex11.drv/window.c      | 2 ++
 dlls/winex11.drv/x11drv.h      | 3 +++
 dlls/winex11.drv/x11drv_main.c | 3 +++
 7 files changed, 26 insertions(+)

diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c
index d1e6407d87c..09e999c266a 100644
--- a/dlls/winex11.drv/bitblt.c
+++ b/dlls/winex11.drv/bitblt.c
@@ -46,6 +46,9 @@
 # endif
 #endif
 
+/* X.h defines ControlMask but conflicts with struct variable name */
+#undef ControlMask
+
 #include "windef.h"
 #include "winbase.h"
 #include "x11drv.h"
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index cbab1dcfe13..212c1d780eb 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -39,6 +39,9 @@
 #include <stdarg.h>
 #include <string.h>
 
+/* X.h defines ControlMask but conflicts with struct variable name */
+#undef ControlMask
+
 #include "windef.h"
 #include "winbase.h"
 
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index 6157548474b..5409618a4ce 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -44,6 +44,9 @@
 
 #define NONAMELESSUNION
 
+/* X.h defines ControlMask but conflicts with struct variable name */
+#undef ControlMask
+
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
@@ -64,6 +67,11 @@
 WINE_DEFAULT_DEBUG_CHANNEL(keyboard);
 WINE_DECLARE_DEBUG_CHANNEL(key);
 
+/* X.h defines ControlMask but conflicts with struct variable name */
+#ifndef ControlMask
+#define ControlMask (1<<2)
+#endif
+
 static int min_keycode, max_keycode, keysyms_per_keycode;
 static KeySym *key_mapping;
 static WORD keyc2vkey[256], keyc2scan[256];
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index d0cdd3d4984..e14ce6d324b 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -50,6 +50,10 @@ MAKE_FUNCPTR(XcursorLibraryLoadCursor);
 
 #define NONAMELESSUNION
 #define OEMRESOURCE
+
+/* X.h defines ControlMask but conflicts with struct variable name */
+#undef ControlMask
+
 #include "windef.h"
 #include "winbase.h"
 #include "winreg.h"
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 773fa81f5f3..0232a1a048d 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -43,6 +43,8 @@
 
 /* avoid conflict with field names in included win32 headers */
 #undef Status
+#undef ControlMask
+
 #include "ntstatus.h"
 #define WIN32_NO_STATUS
 #include "windef.h"
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 613dc0e05fe..193852cc316 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -57,6 +57,9 @@
 #undef Status  /* avoid conflict with wintrnl.h */
 typedef int Status;
 
+/* X.h defines ControlMask but conflicts with struct variable name */
+#undef ControlMask
+
 #include "windef.h"
 #include "winbase.h"
 #include "ntgdi.h"
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index 40d0e750d1b..885f8376a07 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -43,6 +43,9 @@
 #include <X11/extensions/Xrender.h>
 #endif
 
+/* X.h defines ControlMask but conflicts with struct variable name */
+#undef ControlMask
+
 #include "ntstatus.h"
 #define WIN32_NO_STATUS
 #include "windef.h"
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/115



More information about the wine-devel mailing list