fix for libXrender and new renderproto

Paul Bender pebender at san.rr.com
Tue Sep 4 19:39:56 PDT 2007


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.



More information about the xorg mailing list