From afaad1b84708f2efa0198ac498c3bd4214d52954 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 18 Mar 2024 12:34:49 +0100 Subject: [PATCH] include: add comment on _XSERVER64 define Since the whole 32/64 bit issue is a bit complex, it's worth adding some comment on what the _XSERVER64 symbol really is needed for. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- include/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/meson.build b/include/meson.build index c0afc6ee2..eed46817e 100644 --- a/include/meson.build +++ b/include/meson.build @@ -44,6 +44,10 @@ else conf_data.set('X_BYTE_ORDER', 'X_BIG_ENDIAN') endif +# Defining _XSERVER64 on 64bit builds is VITAL, since otherwise Xlib headers +# would define lots X types (eg. Atom, XID, etc) as 64 bit, but inside the +# Xserver we really need them to be 32 bit (CARD32). When _SERVER64 is defined +# the xlib headers will typedef them exactly to CARD32. glx_align64 = [] if cc.sizeof('unsigned long') == 8 conf_data.set('_XSERVER64', '1')