Commit a121b7b0 authored by Jon Turney's avatar Jon Turney Committed by Alan Coopersmith

Remove makekeys dependency on X headers

This is the patch from https://bugs.freedesktop.org/show_bug.cgi?id=6669
by Pierre Ossman, reworked for master.

Avoid using LIBS (which are for host, but we don't need) and rewrite
makekeys slightly to avoid needing to include any X headers, which
avoids potentially having -I with host paths in CFLAGS, which can cause
standard headers e.g. stdio.h for the host to also be used, which can
break things...
parent cbb59d17
......@@ -2,7 +2,6 @@
noinst_PROGRAMS=makekeys
AM_CFLAGS = \
$(X11_CFLAGS) \
$(CWARNFLAGS)
AM_CPPFLAGS = \
......@@ -12,6 +11,7 @@ CC = @CC_FOR_BUILD@
CPPFLAGS = @CPPFLAGS_FOR_BUILD@
CFLAGS = @CFLAGS_FOR_BUILD@
LDFLAGS = @LDFLAGS_FOR_BUILD@
LIBS =
EXTRA_DIST = mkks.sh
......
......@@ -28,17 +28,18 @@ from The Open Group.
/* Constructs hash tables for XStringToKeysym and XKeysymToString. */
#include <X11/X.h>
#include <X11/Xos.h>
#include <X11/Xresource.h>
#include <X11/keysymdef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../Xresinternal.h"
#define KTNUM 4000
#define XK_VoidSymbol 0xffffff /* Void symbol */
typedef unsigned long KeySym;
static struct info {
char *name;
KeySym val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment