From a06fa7fc98b66652df8bbc4734b5010d43744373 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 20 Dec 2011 16:43:44 +0300 Subject: [PATCH] Xmd.h: Treat __ILP32__ targets as LONG32 ones amd64-x32 ABI defines sizeof(long) == sizeof (void*) == 4 Noticed on build failure of libXmu: libXmu-1.1.0/work/libXmu-1.1.0/src/EditresCom.c: In function '_XEditresGetStringValues': libXmu-1.1.0/work/libXmu-1.1.0/src/EditresCom.c:2198:6: error: duplicate case value libXmu-1.1.0/work/libXmu-1.1.0/src/EditresCom.c:2194:6: error: previously used here More info about x32: https://sites.google.com/site/x32abi/ Signed-off-by: Sergei Trofimovich Signed-off-by: James Cloos --- Xmd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Xmd.h b/Xmd.h index f3868b3..96cc08f 100644 --- a/Xmd.h +++ b/Xmd.h @@ -64,7 +64,9 @@ SOFTWARE. defined(__s390x__) || \ defined(__amd64__) || defined(amd64) || \ defined(__powerpc64__) -# define LONG64 /* 32/64-bit architecture */ +# if !defined(__ILP32__) /* amd64-x32 is 32bit */ +# define LONG64 /* 32/64-bit architecture */ +# endif /* !__ILP32__ */ # endif /*