summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-04-08 07:52:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-04-08 07:52:43 (GMT)
commit7aee8ed2b10f0405745287f078b14e3ddf7a0367 (patch)
tree90799a7b2f4b7234b334f330b8d6caac5b824948 /unix
parent46aecf3d998cb19bd8107932e7f95cf5abbc41a9 (diff)
parent7d38dfda3ce110288097bed15c0ebc8728e3e70c (diff)
downloadtk-7aee8ed2b10f0405745287f078b14e3ddf7a0367.zip
tk-7aee8ed2b10f0405745287f078b14e3ddf7a0367.tar.gz
tk-7aee8ed2b10f0405745287f078b14e3ddf7a0367.tar.bz2
Don't work around XkbOpenDisplay's non-const-ness with a macro, when there is only a single call. A type-cate suffices.
Merge-mark core-8-5-14, just to document that really all changes are merged back.
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixEvent.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index 53e01ed..0cc3731 100644
--- a/unix/tkUnixEvent.c
+++ b/unix/tkUnixEvent.c
@@ -14,9 +14,6 @@
#include <signal.h>
#ifdef HAVE_XKBKEYCODETOKEYSYM
# include <X11/XKBlib.h>
-/* Work around stupid un-const-ified Xkb headers. Grrrrr.... */
-# define XkbOpenDisplay(D,V,E,M,m,R) \
- (XkbOpenDisplay)((char *)(D),(V),(E),(M),(m),(R))
#else
# define XkbOpenDisplay(D,V,E,M,m,R) (V),(E),(M),(m),(R),(NULL)
#endif
@@ -137,8 +134,11 @@ TkpOpenDisplay(
** that the serve supports it. The XkbOpenDisplay call
** will perform this check and return NULL if the extension
** is not supported.
+ **
+ ** Work around un-const-ified Xkb headers using (char *) cast.
*/
- display = XkbOpenDisplay(displayNameStr, &event, &error, &major, &minor, &reason);
+ display = XkbOpenDisplay((char *)displayNameStr, &event, &error, &major,
+ &minor, &reason);
if (display == NULL) {
/*fprintf(stderr,"event=%d error=%d major=%d minor=%d reason=%d\nDisabling xkb\n",