ref: cb4a943bc4d24d48eeb5d1515c5acd880c4a82ab
parent: 2eb8f8862669f50bf11693fb5c4f729a0ddf847f
author: David Turner <[email protected]>
date: Mon Jul 6 06:56:36 EDT 2020
[build] Fix multi and C++ builds. The following builds were failing due to previous changes: make multi make multi CC="c++" * include/freetype/config/ftconfig.h: Remove `FT_END_HEADER'. * include/freetype/config/ftheader.h (FT_BEGIN_HEADER, FT_END_HEADER): Protect against redefinition. * src/cache/ftccache.h, src/cache/ftcmru.h, src/pcf/pcfutil.h, src/psaux/pserror.h, src/psaux/psft.h, src/psaux/psstack.h, src/sfnt/woff2tags.h: Include `compiler-macros.h'. * src/sfnt/woff2tags.c: Include `woff2tags.h'.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2020-07-06 David Turner <[email protected]>
+
+ [build] Fix multi and C++ builds.
+
+ The following builds were failing due to previous changes:
+
+ make multi
+ make multi CC="c++"
+
+ * include/freetype/config/ftconfig.h: Remove `FT_END_HEADER'.
+
+ * include/freetype/config/ftheader.h (FT_BEGIN_HEADER,
+ FT_END_HEADER): Protect against redefinition.
+
+ * src/cache/ftccache.h, src/cache/ftcmru.h, src/pcf/pcfutil.h,
+ src/psaux/pserror.h, src/psaux/psft.h, src/psaux/psstack.h,
+ src/sfnt/woff2tags.h: Include `compiler-macros.h'.
+
+ * src/sfnt/woff2tags.c: Include `woff2tags.h'.
+
2020-07-06 Werner Lemberg <[email protected]>
[psaux] Improve `t1_decoder_parse_metrics' (#58646).
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -45,9 +45,6 @@
#include <freetype/config/public-macros.h>
#include <freetype/config/mac-support.h>
-FT_END_HEADER
-
-
#endif /* FTCONFIG_H_ */
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -30,10 +30,12 @@
/* encapsulated in an `extern "C" { .. }` block when included from a */
/* C++ compiler. */
/* */
-#ifdef __cplusplus
-#define FT_BEGIN_HEADER extern "C" {
-#else
-#define FT_BEGIN_HEADER /* nothing */
+#ifndef FT_BEGIN_HEADER
+# ifdef __cplusplus
+# define FT_BEGIN_HEADER extern "C" {
+# else
+# define FT_BEGIN_HEADER /* nothing */
+# endif
#endif
@@ -48,10 +50,12 @@
/* encapsulated in an `extern "C" { .. }` block when included from a */
/* C++ compiler. */
/* */
-#ifdef __cplusplus
-#define FT_END_HEADER }
-#else
-#define FT_END_HEADER /* nothing */
+#ifndef FT_END_HEADER
+# ifdef __cplusplus
+# define FT_END_HEADER }
+# else
+# define FT_END_HEADER /* nothing */
+# endif
#endif
--- a/src/cache/ftccache.h
+++ b/src/cache/ftccache.h
@@ -19,7 +19,7 @@
#ifndef FTCCACHE_H_
#define FTCCACHE_H_
-
+#include <freetype/internal/compiler-macros.h>
#include "ftcmru.h"
FT_BEGIN_HEADER
--- a/src/cache/ftcmru.h
+++ b/src/cache/ftcmru.h
@@ -45,6 +45,7 @@
#include <freetype/freetype.h>
+#include <freetype/internal/compiler-macros.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
--- a/src/pcf/pcfutil.h
+++ b/src/pcf/pcfutil.h
@@ -31,7 +31,7 @@
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
-
+#include <freetype/internal/compiler-macros.h>
FT_BEGIN_HEADER
--- a/src/psaux/pserror.h
+++ b/src/psaux/pserror.h
@@ -50,6 +50,7 @@
#include <freetype/fterrors.h>
+#include <freetype/internal/compiler-macros.h>
#include "psft.h"
--- a/src/psaux/psft.h
+++ b/src/psaux/psft.h
@@ -40,8 +40,8 @@
#define PSFT_H_
+#include <freetype/internal/compiler-macros.h>
#include "pstypes.h"
-
/* TODO: disable asserts for now */
#define CF2_NDEBUG
--- a/src/psaux/psstack.h
+++ b/src/psaux/psstack.h
@@ -39,6 +39,7 @@
#ifndef PSSTACK_H_
#define PSSTACK_H_
+#include <freetype/internal/compiler-macros.h>
FT_BEGIN_HEADER
--- a/src/sfnt/woff2tags.c
+++ b/src/sfnt/woff2tags.c
@@ -17,7 +17,7 @@
#include <freetype/tttags.h>
-
+#include "woff2tags.h"
/*
* Return tag from index in the order given in WOFF2 specification.
--- a/src/sfnt/woff2tags.h
+++ b/src/sfnt/woff2tags.h
@@ -21,6 +21,7 @@
#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/compiler-macros.h>
FT_BEGIN_HEADER