[PATCH libXt] Fix builds on X32

Mark Kettenis mark.kettenis at xs4all.nl
Mon May 18 10:37:11 PDT 2015


> From: Ross Burton <ross.burton at intel.com>
> Date: Mon, 18 May 2015 17:05:46 +0100
> 
> The x86 X32 ABI is a 32-bit environment on 64-bit processors, so __amd64__ is
> defined but pointers and longs are 32-bit. Handle this case by also checking
> __LP64__.

That's the wrong way to handle it.  Not all 64-bit amd64 systems
define __LP64__.  Take a look at x11proto/Xmd.h.  It checks __ILP32__
to decide between x32 and a proper amd64 system.

Cheers,

Mark

> Signed-off-by: Ross Burton <ross.burton at intel.com>
> ---
>  include/X11/Xtos.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/X11/Xtos.h b/include/X11/Xtos.h
> index 64b2da8..44f52c2 100644
> --- a/include/X11/Xtos.h
> +++ b/include/X11/Xtos.h
> @@ -59,7 +59,7 @@ SOFTWARE.
>      defined(__sparc64__) || \
>      defined(__s390x__) || \
>      (defined(__hppa__) && defined(__LP64__)) || \
> -    defined(__amd64__) || defined(amd64) || \
> +    ((defined(__amd64__) || defined(amd64)) && defined(__LP64__)) || \
>      defined(__powerpc64__) || \
>      (defined(sgi) && (_MIPS_SZLONG == 64))
>  #define LONG64
> -- 
> 2.1.4
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 
> 


More information about the xorg-devel mailing list