Why is sizeof(XID)==8 on AMD64?

Clemens Eisserer linuxhippy at gmail.com
Mon Mar 28 07:11:35 PDT 2011


Hi,

I just ran in a couple of bugs because my code assumes sizeof(XID)==4
on all platforms which doesn't seem to hold on AMD64.
Whats the reason for XID to be 8bytes (unsigned long) on AMD64, I
thought an x-id (in protocol sence) is defined as 4 bytes anyway?

Will Xlib/xcb ever return values which don't fit in 4 bytes? If so, I
guess I have to change a lot of java-code which assumes this -
otherwise I would only need to adapt the Java<-->Xlib interface a bit.

Thank you in advance, Clemens



More information about the xorg mailing list