fix for libXrender and new renderproto

Eric Anholt eric at
Wed Sep 5 08:27:09 PDT 2007

On Tue, 2007-09-04 at 19:39 -0700, Paul Bender wrote:
> Julien Cristau wrote:
> > On Tue, Sep  4, 2007 at 18:52:16 -0700, Paul Bender wrote:
> > 
> >> In the latest renderproto tarball (0.9.3), the included render.h header 
> >> file switched to using the XID defined type. XID is defined in X.h and 
> >> Xlib.h.
>     ^^^^^^
>     Xdefs.h
> >> This causes a problem software that uses libXrender, because of the oder of 
> >> included header files in Xrender.h. Xrender.h includes render.h before 
> >> Xlib.h. As result, XID is not defined in time. The attached patch for 
> >> libXrender fixes the problem by reordering the includes.
> >>
> > Maybe <X11/extensions/render.h> should #include <X11/X.h> itself, if it
> > needs the XID typedef?
> I thought about that. It would appear to make the most sense. However, 
> there does not appear to be a consistent choice. In some cases, the 
> files included by *proto include the header files from xproto that 
> typedef things such as XID and CARD32. In some cases, they do not. As a 
> result, I could not figure out the convention.
> If the convention is to include the appropriate xproto header files in 
> header files included by other *proto header files, then X11/X.h should 
> be included in render.h.

In the absence of a clear existing convention, I went ahead and just
pushed your original patch.  Thanks!

Eric Anholt                             anholt at
eric at                         eric.anholt at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the xorg mailing list