From 62e5b0ff80f91a66163386e2192bcb8e0b2d1721 Mon Sep 17 00:00:00 2001 From: Derek Buitenhuis Date: Thu, 22 Sep 2011 18:44:13 -0400 Subject: makekeys: Fix build/target word size mismatch when cross-compiling Since makekeys is built using build environment's gcc and runs natively, we have to make sure that the size of the Signature type is the same on both the native environment and the target, otherwise we get mismatches upon running X, and some LSB test failures (xts5). Use an unsigned 32-bit integer on all platforms. Also, eliminate the redundant multiple typedefs for the Signature type. Signed-off-by: Derek Buitenhuis Reviewed-by: Daniel Stone --- nx-X11/lib/X11/util/makekeys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nx-X11/lib/X11/util/makekeys.c') diff --git a/nx-X11/lib/X11/util/makekeys.c b/nx-X11/lib/X11/util/makekeys.c index 55f8e346e..170ab5dee 100644 --- a/nx-X11/lib/X11/util/makekeys.c +++ b/nx-X11/lib/X11/util/makekeys.c @@ -30,11 +30,12 @@ from The Open Group. #include #include +#include #include #include #include -typedef unsigned long Signature; +#include "../Xresinternal.h" #define KTNUM 4000 @@ -212,7 +213,7 @@ next1: ; offsets[j] = k; indexes[i] = k; val = info[i].val; - printf("0x%.2lx, 0x%.2lx, 0x%.2lx, 0x%.2lx, 0x%.2lx, 0x%.2lx, ", + printf("0x%.2"PRIx32", 0x%.2"PRIx32", 0x%.2lx, 0x%.2lx, 0x%.2lx, 0x%.2lx, ", (sig >> 8) & 0xff, sig & 0xff, (val >> 24) & 0xff, (val >> 16) & 0xff, (val >> 8) & 0xff, val & 0xff); -- cgit v1.2.3