C99 types patch

Soeren Sandmann sandmann at daimi.au.dk
Thu Oct 22 07:51:51 PDT 2009


Keith Packard <keithp at keithp.com> writes:

> Excerpts from Eamon Walsh's message of Thu Oct 22 12:56:46 +0900 2009:
> 
> > I have a patch sitting around that does this, guess I'll float it.
> 
> yeah, I can't quite see how we can take this as-is given the Xlib
> typedef horror show -- XID in Xlib is defined as unsigned long, and so
> the whole Xlib API is broken on 64-bit machines. We really do need
> separate Xlib and X server definitions for any XID-derived type (and
> probably some others as well).
> 
> Note that the protocol types are #define'd at the start of Xproto.h
> and #undef'd at the end so that clients can use Xproto.h with Window
> as CARD32 and still use Xlib with Window as unsigned long.
> 
> There are lots of possibilities here; none of them pretty, but I do
> suggest that the ugly hacks should land in Xlib and not in the shared
> protocol headers.

Note that pixman has included some variation of <stdint.h> in its
public header forever, so the types are already available throughout
the server.


Soren


More information about the xorg-devel mailing list