From 4a1cacfb1a21b2583809451089d115fc8a23133e Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 16 Jun 2021 11:03:25 +0100 Subject: Define LONG64 if __SIZEOF_LONG__ indicates 64-bit long All modern compilers (GCC>=4.6, Clang>=3.0) define this macro, so we can use it to detect 64-bit longs without adding to the architecture list. This change is needed to successfully run xeyes on a FreeBSD CHERI-RISC-V QEMU VM via SSH forwarding. See also https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/41 Signed-off-by: Alex Richardson --- include/X11/Xtos.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/X11/Xtos.h b/include/X11/Xtos.h index 64b2da8..84910c0 100644 --- a/include/X11/Xtos.h +++ b/include/X11/Xtos.h @@ -53,7 +53,11 @@ SOFTWARE. #include -#if defined (_LP64) || \ +#if defined(__SIZEOF_LONG__) +# if __SIZEOF_LONG__ == 8 +# define LONG64 +# endif +# elif defined (_LP64) || \ defined(__alpha) || defined(__alpha__) || \ defined(__ia64__) || defined(ia64) || \ defined(__sparc64__) || \ -- cgit v1.2.1