xorgproto: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 15 16:12:35 UTC 2021


 include/X11/Xmd.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a0ed054ee2c334941dfe9eaa7bcfdbbe6907e1b5
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date:   Tue Jun 15 14:25:01 2021 +0100

    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 allows me to successfully run a simple X11 window on a
    64-bit FreeBSD RISC-V QEMU VM via SSH forwarding. Without this change
    I get an error that DISPLAY cannot be opened.
    
    Signed-off-by: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>

diff --git a/include/X11/Xmd.h b/include/X11/Xmd.h
index 492465e..68c45db 100644
--- a/include/X11/Xmd.h
+++ b/include/X11/Xmd.h
@@ -57,7 +57,11 @@ SOFTWARE.
 #  include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
 # endif
 
-# if defined (_LP64) || defined(__LP64__) || \
+#if defined(__SIZEOF_LONG__)
+# if __SIZEOF_LONG__ == 8
+#  define LONG64				/* 32/64-bit architecture */
+# endif
+# elif defined (_LP64) || defined(__LP64__) || \
      defined(__alpha) || defined(__alpha__) || \
      defined(__ia64__) || defined(ia64) || \
      defined(__sparc64__) || \


More information about the xorg-commit mailing list