From fee72c26afff2120315ebbab32708520307e7a5e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 20 Sep 2008 17:20:36 -0400 Subject: Make sure feature macros are checked using #if, not #ifdef; add a test for it This is more robust to cases where people want to assign 0 to those variables. (win32/alternate build systems, etc) --- src/cairo-quartz-private.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/cairo-quartz-private.h') diff --git a/src/cairo-quartz-private.h b/src/cairo-quartz-private.h index f321c5b68..8ba896874 100644 --- a/src/cairo-quartz-private.h +++ b/src/cairo-quartz-private.h @@ -40,7 +40,7 @@ #include "cairoint.h" -#ifdef CAIRO_HAS_QUARTZ_SURFACE +#if CAIRO_HAS_QUARTZ_SURFACE #include "cairo-quartz.h" typedef struct cairo_quartz_surface { @@ -95,11 +95,10 @@ _cairo_quartz_create_cgimage (cairo_format_t format, CGFontRef _cairo_quartz_scaled_font_get_cg_font_ref (cairo_scaled_font_t *sfont); -#endif /* CAIRO_HAS_QUARTZ_SURFACE */ +#else -#if CAIRO_HAS_CGFONT_FONT -CGFontRef -_cairo_cgfont_scaled_font_get_cg_font_ref (cairo_scaled_font_t *sfont); -#endif /* CAIRO_HAS_CGFONT_FONT */ +# error Cairo was not compiled with support for the quartz backend + +#endif /* CAIRO_HAS_QUARTZ_SURFACE */ #endif /* CAIRO_QUARTZ_PRIVATE_H */ -- cgit v1.2.3