Prevent -Wundef warnings in cairo-ft.h

Submitted by Adrian Johnson on Nov. 11, 2017, 8:58 a.m.

Details

Message ID 04d3270f-86dd-c0c8-dd8f-32cf0e5ac53c@redneon.com
State New
Series "Prevent -Wundef warnings in cairo-ft.h"
Headers show

Commit Message

Adrian Johnson Nov. 11, 2017, 8:58 a.m.
When cross compiling poppler with mingw I am getting warnings that
CAIRO_HAS_FC_FONT is not defined because cairo on mingw does not use
fontconfig. I'm not sure if it is worth fixing all cases in the public
headers where this may occur. This is just the one causing me problems.

Patch hide | download patch | download mbox

From 6dbdc3f2cafe2d4f99cf1e42ead532cd61d57123 Mon Sep 17 00:00:00 2001
From: Adrian Johnson <ajohnson@redneon.com>
Date: Sat, 11 Nov 2017 16:59:47 +1030
Subject: [PATCH] Prevent -Wundef warnings in when cairo-ft.h is used without
 fontconfig

---
 src/cairo-ft.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cairo-ft.h b/src/cairo-ft.h
index 29c43c965..3f775a88f 100644
--- a/src/cairo-ft.h
+++ b/src/cairo-ft.h
@@ -46,7 +46,7 @@ 
 #include <ft2build.h>
 #include FT_FREETYPE_H
 
-#if CAIRO_HAS_FC_FONT
+#ifdef CAIRO_HAS_FC_FONT
 #include <fontconfig/fontconfig.h>
 #endif
 
@@ -98,7 +98,7 @@  cairo_ft_scaled_font_lock_face (cairo_scaled_font_t *scaled_font);
 cairo_public void
 cairo_ft_scaled_font_unlock_face (cairo_scaled_font_t *scaled_font);
 
-#if CAIRO_HAS_FC_FONT
+#ifdef CAIRO_HAS_FC_FONT
 
 cairo_public cairo_font_face_t *
 cairo_ft_font_face_create_for_pattern (FcPattern *pattern);
-- 
2.11.0