diff options
author | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2021-06-16 11:03:25 +0100 |
---|---|---|
committer | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2021-06-16 14:05:14 +0100 |
commit | 4a1cacfb1a21b2583809451089d115fc8a23133e (patch) | |
tree | e1e800c4b61302cff2519f64c90d61dbb22e2fe7 /include | |
parent | edd70bdfbbd16247e3d9564ca51d864f82626eb7 (diff) |
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 <Alexander.Richardson@cl.cam.ac.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/X11/Xtos.h | 6 |
1 files changed, 5 insertions, 1 deletions
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 <X11/Xalloca.h> -#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__) || \ |