diff --git a/src/Makefile.am b/src/Makefile.am index 9f9c9dd53..2081396ae 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,6 +18,7 @@ LDADDS = @STRIP_BEGIN@ \ noinst_LTLIBRARIES = libpango-ot.la libpango_ot_la_SOURCES = \ + fterrcompat.h \ ftxopen.c \ ftxopen.h \ ftxopenf.h \ diff --git a/src/fterrcompat.h b/src/fterrcompat.h new file mode 100644 index 000000000..70b45e226 --- /dev/null +++ b/src/fterrcompat.h @@ -0,0 +1,16 @@ + +#ifndef FTERRCOMPAT_H +#define FTERRCOMPAT_H + +#include + +#ifdef HAVE_FREETYPE_2_0_3 +#include +#else +#define TT_Err_Ok FT_Err_Ok +#define TT_Err_Invalid_Argument FT_Err_Invalid_Argument +#define TT_Err_Invalid_Face_Handle FT_Err_Invalid_Face_Handle +#define TT_Err_Table_Missing FT_Err_Table_Missing +#endif + +#endif diff --git a/src/ftxgdef.c b/src/ftxgdef.c index ee177e853..54b1dd016 100644 --- a/src/ftxgdef.c +++ b/src/ftxgdef.c @@ -19,9 +19,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/src/ftxgpos.c b/src/ftxgpos.c index 07d73d9f4..7515b53bf 100644 --- a/src/ftxgpos.c +++ b/src/ftxgpos.c @@ -27,9 +27,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/src/ftxgsub.c b/src/ftxgsub.c index 43adb2ce6..b1f516cd4 100644 --- a/src/ftxgsub.c +++ b/src/ftxgsub.c @@ -27,9 +27,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/src/ftxopen.c b/src/ftxopen.c index 07a502907..7815aba82 100644 --- a/src/ftxopen.c +++ b/src/ftxopen.c @@ -17,9 +17,10 @@ #include #include -#include #include +#include "fterrcompat.h" + #include "ftxopen.h" #include "ftxopenf.h" diff --git a/src/pango-ot-info.c b/src/pango-ot-info.c index b426e32e9..5a657c457 100644 --- a/src/pango-ot-info.c +++ b/src/pango-ot-info.c @@ -20,7 +20,7 @@ */ #include "pango-ot-private.h" -#include +#include "fterrcompat.h" #include #include