[PATCH] Bring in Xdefs.h for the definition of XID

Bernardo Innocenti bernie at codewiz.org
Fri Nov 30 19:49:26 PST 2007


David Sharp wrote:
> fyi, I made a similar patch last month, which was rejected:
> 
> http://lists.freedesktop.org/archives/xorg/2007-October/028916.html

Thanks for pointing it out.  The rationale was:

> Considering how all the other include files behave, any source has to
> include X.h before including other X header files anyway. So the correct
> fix would be in mpx to include X.h before render.h

This argument seems flawed: because we have so many headers that neglect
to satisfy their own dependencies, then we force all applications to
guess the right inclusion order manually?

This can't be right, or X would be following a fancy convention of
its own, unlike any other sensible C project on earth :-)


> On Nov 30, 2007 11:13 AM, Bernardo Innocenti <bernie at codewiz.org> wrote:
>> ---
>>  render.h |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/render.h b/render.h
>> index 497af6d..4c69a5e 100644
>> --- a/render.h
>> +++ b/render.h
>> @@ -26,6 +26,8 @@
>>  #ifndef _RENDER_H_
>>  #define _RENDER_H_
>>
>> +#include <X11/Xdefs.h> /* For XID */
>> +
>>  typedef XID            Glyph;
>>  typedef XID            GlyphSet;
>>  typedef XID            Picture;

-- 
 \___/
 |___|   Bernardo Innocenti - http://www.codewiz.org/
  \___\  One Laptop Per Child - http://www.laptop.org/



More information about the xorg mailing list