summaryrefslogtreecommitdiffstats
path: root/xlib/X11
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-03 20:53:24 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-03 20:53:24 (GMT)
commitd2747a371058fa4128dbd7896fe040f0b3ee6be7 (patch)
tree636e7fd05c44d1f45b621dad17cfeed7d672199b /xlib/X11
parentf2b5a87d6dc6d3468828d48929583d950690a40b (diff)
downloadtk-d2747a371058fa4128dbd7896fe040f0b3ee6be7.zip
tk-d2747a371058fa4128dbd7896fe040f0b3ee6be7.tar.gz
tk-d2747a371058fa4128dbd7896fe040f0b3ee6be7.tar.bz2
Bring back more original "None" usages, and fix other warnings which gradually slipped in.
Wherever possible, pragma's are used in MSVC to silence useless compiler warnings.
Diffstat (limited to 'xlib/X11')
-rw-r--r--xlib/X11/X.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/xlib/X11/X.h b/xlib/X11/X.h
index 316683b..b43967e 100644
--- a/xlib/X11/X.h
+++ b/xlib/X11/X.h
@@ -73,7 +73,9 @@ typedef unsigned long KeyCode; /* In order to use IME, the Macintosh needs
* RESERVED RESOURCE AND CONSTANT DEFINITIONS
*****************************************************************/
-/* define None 0L See bug [9e31fd9449] and below */
+#ifndef _WIN32
+# define None 0L /* See bug [9e31fd9449] and below */
+#endif
#define ParentRelative 1L /* background pixmap in CreateWindow
and ChangeWindowAttributes */
@@ -179,7 +181,9 @@ are reserved in the protocol for errors and replies. */
#define ShiftMask (1<<0)
#define LockMask (1<<1)
-/* define ControlMask (1<<2) See bug [9e31fd9449] and below */
+#ifndef _WIN32
+# define ControlMask (1<<2) /* See bug [9e31fd9449] and below */
+#endif
#define Mod1Mask (1<<3)
#define Mod2Mask (1<<4)
#define Mod3Mask (1<<5)
@@ -187,7 +191,9 @@ are reserved in the protocol for errors and replies. */
#define Mod5Mask (1<<7)
/* See bug [9e31fd9449], this way prevents conflicts with Win32 headers */
+#ifdef _WIN32
enum _Bug9e31fd9449 { None = 0, ControlMask = (1<<2) };
+#endif
/* modifier names. Used to build a SetModifierMapping request or
to read a GetModifierMapping request. These correspond to the
@@ -297,7 +303,7 @@ enum _Bug9e31fd9449 { None = 0, ControlMask = (1<<2) };
/* Used in SetInputFocus, GetInputFocus */
-#define RevertToNone 0
+#define RevertToNone (int)None
#define RevertToPointerRoot (int)PointerRoot
#define RevertToParent 2