summaryrefslogtreecommitdiffstats
path: root/xlib
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-26 14:55:18 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-26 14:55:18 (GMT)
commitb68e469c6fcec04a86935ae2e8853197213f40db (patch)
tree164aafce2e7295d828252e8f67e1696ed5720c73 /xlib
parent81b0bd7641a9d2f63154c97d41c27bbb696ef674 (diff)
downloadtk-b68e469c6fcec04a86935ae2e8853197213f40db.zip
tk-b68e469c6fcec04a86935ae2e8853197213f40db.tar.gz
tk-b68e469c6fcec04a86935ae2e8853197213f40db.tar.bz2
Change None/ControlMask on win32 (and MacOSX - which is harmless) to being an enum. This fixes (hopefully) the ***POTENTIAL INCOMPATABILITY*** in previous commit
Diffstat (limited to 'xlib')
-rw-r--r--xlib/X11/X.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/xlib/X11/X.h b/xlib/X11/X.h
index ad8f630..316683b 100644
--- a/xlib/X11/X.h
+++ b/xlib/X11/X.h
@@ -73,9 +73,7 @@ typedef unsigned long KeyCode; /* In order to use IME, the Macintosh needs
* RESERVED RESOURCE AND CONSTANT DEFINITIONS
*****************************************************************/
-#ifndef _WIN32 /* prevent conflicting define against windows.h, bug [9e31fd9449] */
-# define None 0L /* universal null resource or null atom */
-#endif
+/* define None 0L See bug [9e31fd9449] and below */
#define ParentRelative 1L /* background pixmap in CreateWindow
and ChangeWindowAttributes */
@@ -181,15 +179,16 @@ are reserved in the protocol for errors and replies. */
#define ShiftMask (1<<0)
#define LockMask (1<<1)
-#ifndef _WIN32 /* prevent conflicting define against windows.h, bug [9e31fd9449] */
-# define ControlMask (1<<2)
-#endif
+/* 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 _Bug9e31fd9449 { 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. */