C99 types patch

Keith Packard keithp at keithp.com
Thu Oct 22 00:06:34 PDT 2009


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.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091022/a2ac9042/attachment.pgp 


More information about the xorg-devel mailing list