C99 types patch

Daniel Stone daniel at fooishbar.org
Thu Oct 22 02:23:42 PDT 2009

On Thu, Oct 22, 2009 at 04:06:34PM +0900, Keith Packard wrote:
> 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.

Right.  Why don't we just ditch CARD32 and move to the native inttypes.h
types everywhere but Xlib?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091022/edb28325/attachment-0001.pgp 

More information about the xorg-devel mailing list