summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2013-04-08 07:57:13 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2013-04-08 07:57:13 (GMT)
commitb7dadc85b043ff2638ff16ef09faea846ae395e1 (patch)
tree1a90ac384decb48a4e530f90f3fecd7d8536b648
parent83c6dcb394ac667517441086a3a2f2b9c164dd97 (diff)
parentd4e787a455f335367306313c6963dcfb8b6e7707 (diff)
downloadtk-b7dadc85b043ff2638ff16ef09faea846ae395e1.zip
tk-b7dadc85b043ff2638ff16ef09faea846ae395e1.tar.gz
tk-b7dadc85b043ff2638ff16ef09faea846ae395e1.tar.bz2
Don't work around XkbOpenDisplay's non-const-ness with a macro, when there is only a single call. A type-cast suffices.
-rw-r--r--unix/tkUnixEvent.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index afb3db0..9b32502 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
@@ -153,8 +150,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",