From 19ef40482a39402270840660b204cbdfec4eb98d Mon Sep 17 00:00:00 2001 From: Slaven Rezic Date: Sun, 5 Nov 2023 11:06:02 +0100 Subject: [PATCH] prevent conflicting defines with Windows (ControlMask, None) (GH #87) --- pTk/mTk/xlib/X11/X.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pTk/mTk/xlib/X11/X.h b/pTk/mTk/xlib/X11/X.h index a1cf10c8..6aebc5fc 100644 --- a/pTk/mTk/xlib/X11/X.h +++ b/pTk/mTk/xlib/X11/X.h @@ -73,7 +73,7 @@ typedef unsigned long KeyCode; /* In order to use IME, the Macintosh needs * RESERVED RESOURCE AND CONSTANT DEFINITIONS *****************************************************************/ -#define None 0L /* universal null resource or null atom */ +/* #define None 0L See bug [9e31fd9449] and below */ #define ParentRelative 1L /* background pixmap in CreateWindow and ChangeWindowAttributes */ @@ -179,13 +179,16 @@ are reserved in the protocol for errors and replies. */ #define ShiftMask (1<<0) #define LockMask (1<<1) -#define ControlMask (1<<2) +/* #define ControlMask (1<<2) See bug [9e31fd9449] and below */ #define Mod1Mask (1<<3) #define Mod2Mask (1<<4) #define Mod3Mask (1<<5) #define Mod4Mask (1<<6) #define Mod5Mask (1<<7) +/* See bug [9e31fd9449], this way prevents conflicts with Win32 headers */ +enum { None = 0, ControlMask = (1<<2) }; + /* modifier names. Used to build a SetModifierMapping request or to read a GetModifierMapping request. These correspond to the masks defined above. */