[cairo] Cleaning up cairo-features.h

Jason Dorje Short jdorje at users.sf.net
Sat May 7 13:14:19 PDT 2005


Owen Taylor wrote:
> On Fri, 2005-05-06 at 23:48 -0400, Carl Worth wrote:

>>I think that the macros would be much more readable if used as:
>>
>>	#if CAIRO_HAS_XLIB_SURFACE
>>
>>which consequently means they should be defined unconditionally, but
>>to either a 1 or a 0 to indicate presence or absence.
> 
> 
> Is there really a benefit from deviating from the standard 
> of:
> 
>  #define CAIRO_HAS_XLIB_SURFACE 1
> 
> vs.
> 
>  /* Nothing */

Using #ifdef instead of #if is the way all autoconf checks are done.  I
think it's good for cairo definitions to be consistent.

The #define CAIRO_HAS_NO_XLIB_SURFACE is kindof redundant, but that's
probably okay.  You can just use #ifndef CAIRO_HAS_XLIB_SURFACE instead
of checking it.

-jason



More information about the cairo mailing list