summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2017-03-18 07:06:49 +0100
committerWerner Lemberg <wl@gnu.org>2017-03-18 07:06:49 +0100
commit9931175dcc57313be60d3633f7597ec4db446a35 (patch)
tree998187908fa4534fd72429c81e5190094d43c424
parentd5bfa053f5854cc42966634e1b26a8024b7a51d4 (diff)
downloadfreetype2-9931175dcc57313be60d3633f7597ec4db446a35.tar.gz
Improve `make multi'.
* src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2. * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH. * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM. * src/sfnt/pngshim.c: Guard file with TT_CONFIG_OPTION_EMBEDDED_BITMAPS also. * src/sfnt/ttbdf.c: Avoid empty source file. * src/sfnt/ttpost.c: Guard file with TT_CONFIG_OPTION_POSTSCRIPT_NAMES. * src/sfnt/ttsbit.c: Guard file with TT_CONFIG_OPTION_EMBEDDED_BITMAPS. * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty source file. * src/truetype/ttsubpix.c: Guard file with TT_USE_BYTECODE_INTERPRETER also. * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM. * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c, src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c, src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c, src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c, src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c, src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort entries.
-rw-r--r--ChangeLog35
-rw-r--r--src/autofit/aflatin2.c10
-rw-r--r--src/autofit/autofit.c23
-rw-r--r--src/base/ftbase.c7
-rw-r--r--src/base/ftmac.c12
-rw-r--r--src/bdf/bdf.c3
-rw-r--r--src/cache/ftcache.c9
-rw-r--r--src/cff/cff.c8
-rw-r--r--src/cid/type1cid.c6
-rw-r--r--src/gxvalid/gxvalid.c14
-rw-r--r--src/otvalid/otvalid.c3
-rw-r--r--src/pcf/pcf.c8
-rw-r--r--src/pfr/pfr.c9
-rw-r--r--src/psaux/afmparse.c9
-rw-r--r--src/psaux/psaux.c12
-rw-r--r--src/pshinter/pshinter.c8
-rw-r--r--src/psnames/psnames.c4
-rw-r--r--src/raster/raster.c4
-rw-r--r--src/sfnt/pngshim.c10
-rw-r--r--src/sfnt/sfnt.c24
-rw-r--r--src/sfnt/ttbdf.c7
-rw-r--r--src/sfnt/ttpost.c11
-rw-r--r--src/sfnt/ttsbit.c13
-rw-r--r--src/smooth/smooth.c4
-rw-r--r--src/truetype/truetype.c16
-rw-r--r--src/truetype/ttgxvar.c7
-rw-r--r--src/truetype/ttinterp.c6
-rw-r--r--src/truetype/ttsubpix.c9
-rw-r--r--src/type1/t1afm.c9
-rw-r--r--src/type1/type1.c13
-rw-r--r--src/type42/type42.c6
31 files changed, 204 insertions, 115 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f0163b7c..44c8d6342 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,40 @@
2017-03-17 Werner Lemberg <wl@gnu.org>
+ Improve `make multi'.
+
+ * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2.
+
+ * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH.
+
+ * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
+
+ * src/sfnt/pngshim.c: Guard file with
+ TT_CONFIG_OPTION_EMBEDDED_BITMAPS also.
+
+ * src/sfnt/ttbdf.c: Avoid empty source file.
+ * src/sfnt/ttpost.c: Guard file with
+ TT_CONFIG_OPTION_POSTSCRIPT_NAMES.
+ * src/sfnt/ttsbit.c: Guard file with
+ TT_CONFIG_OPTION_EMBEDDED_BITMAPS.
+
+ * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty
+ source file.
+
+ * src/truetype/ttsubpix.c: Guard file with
+ TT_USE_BYTECODE_INTERPRETER also.
+
+ * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
+
+ * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c,
+ src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c,
+ src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c,
+ src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c,
+ src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c,
+ src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort
+ entries.
+
+2017-03-17 Werner Lemberg <wl@gnu.org>
+
Fixes for conditional compilation.
* src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h'
diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c
index 70487569e..cc2312648 100644
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -23,6 +23,9 @@
#include FT_ADVANCES_H
+
+#ifdef FT_OPTION_AUTOFIT2
+
#include "afglobal.h"
#include "aflatin.h"
#include "aflatin2.h"
@@ -2419,5 +2422,12 @@
(AF_WritingSystem_ApplyHintsFunc) af_latin2_hints_apply /* style_hints_apply */
)
+#else /* !FT_OPTION_AUTOFIT2 */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _af_latin2_dummy;
+
+#endif /* !FT_OPTION_AUTOFIT2 */
+
/* END */
diff --git a/src/autofit/autofit.c b/src/autofit/autofit.c
index 60060c9c7..bbedad7b5 100644
--- a/src/autofit/autofit.c
+++ b/src/autofit/autofit.c
@@ -18,29 +18,22 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
-#include "afpic.c"
+
#include "afangles.c"
#include "afblue.c"
+#include "afcjk.c"
+#include "afdummy.c"
#include "afglobal.c"
#include "afhints.c"
-
-#include "afranges.c"
-
-#include "afdummy.c"
+#include "afindic.c"
#include "aflatin.c"
-#ifdef FT_OPTION_AUTOFIT2
#include "aflatin2.c"
-#endif
-#include "afcjk.c"
-#include "afindic.c"
-
-#include "afshaper.c"
-
#include "afloader.c"
#include "afmodule.c"
-
-#ifdef AF_CONFIG_OPTION_USE_WARPER
+#include "afpic.c"
+#include "afranges.c"
+#include "afshaper.c"
#include "afwarp.c"
-#endif
+
/* END */
diff --git a/src/base/ftbase.c b/src/base/ftbase.c
index 993ac7228..55f735994 100644
--- a/src/base/ftbase.c
+++ b/src/base/ftbase.c
@@ -17,26 +17,23 @@
#include <ft2build.h>
-
#define FT_MAKE_OPTION_SINGLE_OBJECT
-#include "ftpic.c"
#include "basepic.c"
#include "ftadvanc.c"
#include "ftcalc.c"
#include "ftdbgmem.c"
#include "ftgloadr.c"
#include "fthash.c"
+#include "ftmac.c"
#include "ftobjs.c"
#include "ftoutln.c"
+#include "ftpic.c"
#include "ftrfork.c"
#include "ftsnames.c"
#include "ftstream.c"
#include "fttrigon.c"
#include "ftutil.c"
-#ifdef FT_MACINTOSH
-#include "ftmac.c"
-#endif
/* END */
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index fb70606b7..4b92066da 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -71,6 +71,9 @@
#include FT_INTERNAL_STREAM_H
#include "ftbase.h"
+
+#ifdef FT_MACINTOSH
+
/* This is for Mac OS X. Without redefinition, OS_INLINE */
/* expands to `static inline' which doesn't survive the */
/* -ansi compilation flag of GCC. */
@@ -118,8 +121,6 @@
#endif
-#ifdef FT_MACINTOSH
-
/* This function is deprecated because FSSpec is deprecated in Mac OS X */
FT_EXPORT_DEF( FT_Error )
FT_GetFile_From_Mac_Name( const char* fontName,
@@ -1076,7 +1077,12 @@
#endif
}
-#endif /* FT_MACINTOSH */
+#else /* !FT_MACINTOSH */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _ft_mac_dummy;
+
+#endif /* !FT_MACINTOSH */
/* END */
diff --git a/src/bdf/bdf.c b/src/bdf/bdf.c
index f95fb7622..e54df6649 100644
--- a/src/bdf/bdf.c
+++ b/src/bdf/bdf.c
@@ -24,9 +24,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-#define FT_MAKE_OPTION_SINGLE_OBJECT
+#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
+
#include "bdflib.c"
#include "bdfdrivr.c"
diff --git a/src/cache/ftcache.c b/src/cache/ftcache.c
index 052ff2547..822618831 100644
--- a/src/cache/ftcache.c
+++ b/src/cache/ftcache.c
@@ -17,15 +17,16 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "ftcmru.c"
-#include "ftcmanag.c"
+
+#include "ftcbasic.c"
#include "ftccache.c"
#include "ftccmap.c"
#include "ftcglyph.c"
#include "ftcimage.c"
+#include "ftcmanag.c"
+#include "ftcmru.c"
#include "ftcsbits.c"
-#include "ftcbasic.c"
+
/* END */
diff --git a/src/cff/cff.c b/src/cff/cff.c
index 545fb202c..397f6dfaf 100644
--- a/src/cff/cff.c
+++ b/src/cff/cff.c
@@ -17,16 +17,15 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "cffpic.c"
+#include "cffcmap.c"
#include "cffdrivr.c"
+#include "cffgload.c"
#include "cffparse.c"
+#include "cffpic.c"
#include "cffload.c"
#include "cffobjs.c"
-#include "cffgload.c"
-#include "cffcmap.c"
#include "cf2arrst.c"
#include "cf2blues.c"
@@ -38,4 +37,5 @@
#include "cf2read.c"
#include "cf2stack.c"
+
/* END */
diff --git a/src/cid/type1cid.c b/src/cid/type1cid.c
index aeb9c3eab..93e6f810d 100644
--- a/src/cid/type1cid.c
+++ b/src/cid/type1cid.c
@@ -17,13 +17,13 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "cidparse.c"
+
+#include "cidgload.c"
#include "cidload.c"
#include "cidobjs.c"
+#include "cidparse.c"
#include "cidriver.c"
-#include "cidgload.c"
/* END */
diff --git a/src/gxvalid/gxvalid.c b/src/gxvalid/gxvalid.c
index f0648ea39..da485141d 100644
--- a/src/gxvalid/gxvalid.c
+++ b/src/gxvalid/gxvalid.c
@@ -16,15 +16,17 @@
/* */
/***************************************************************************/
-#define FT_MAKE_OPTION_SINGLE_OBJECT
+#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
-#include "gxvfeat.c"
-#include "gxvcommn.c"
#include "gxvbsln.c"
-#include "gxvtrak.c"
+#include "gxvcommn.c"
+#include "gxvfeat.c"
#include "gxvjust.c"
+#include "gxvkern.c"
+#include "gxvlcar.c"
+#include "gxvmod.c"
#include "gxvmort.c"
#include "gxvmort0.c"
#include "gxvmort1.c"
@@ -37,11 +39,9 @@
#include "gxvmorx2.c"
#include "gxvmorx4.c"
#include "gxvmorx5.c"
-#include "gxvkern.c"
#include "gxvopbd.c"
#include "gxvprop.c"
-#include "gxvlcar.c"
-#include "gxvmod.c"
+#include "gxvtrak.c"
/* END */
diff --git a/src/otvalid/otvalid.c b/src/otvalid/otvalid.c
index 3901c54c4..312751a1f 100644
--- a/src/otvalid/otvalid.c
+++ b/src/otvalid/otvalid.c
@@ -15,8 +15,8 @@
/* */
/***************************************************************************/
-#define FT_MAKE_OPTION_SINGLE_OBJECT
+#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
#include "otvbase.c"
@@ -28,4 +28,5 @@
#include "otvmath.c"
#include "otvmod.c"
+
/* END */
diff --git a/src/pcf/pcf.c b/src/pcf/pcf.c
index 11d5b7b2a..8ffd6e280 100644
--- a/src/pcf/pcf.c
+++ b/src/pcf/pcf.c
@@ -26,11 +26,11 @@ THE SOFTWARE.
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
-
#include <ft2build.h>
-#include "pcfutil.c"
-#include "pcfread.c"
+
#include "pcfdrivr.c"
+#include "pcfread.c"
+#include "pcfutil.c"
+
/* END */
diff --git a/src/pfr/pfr.c b/src/pfr/pfr.c
index 2d0e72ce5..4f31f5d9b 100644
--- a/src/pfr/pfr.c
+++ b/src/pfr/pfr.c
@@ -15,15 +15,16 @@
/* */
/***************************************************************************/
-#define FT_MAKE_OPTION_SINGLE_OBJECT
+#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
-#include "pfrload.c"
-#include "pfrgload.c"
#include "pfrcmap.c"
-#include "pfrobjs.c"
#include "pfrdrivr.c"
+#include "pfrgload.c"
+#include "pfrload.c"
+#include "pfrobjs.c"
#include "pfrsbit.c"
+
/* END */
diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c
index dbe7ddd70..ff2cc8cf0 100644
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -20,6 +20,8 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#ifndef T1_CONFIG_OPTION_NO_AFM
+
#include "afmparse.h"
#include "psconv.h"
@@ -973,5 +975,12 @@
return error;
}
+#else /* T1_CONFIG_OPTION_NO_AFM */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _afm_parse_dummy;
+
+#endif /* T1_CONFIG_OPTION_NO_AFM */
+
/* END */
diff --git a/src/psaux/psaux.c b/src/psaux/psaux.c
index f8f19d0f3..c373aa7d5 100644
--- a/src/psaux/psaux.c
+++ b/src/psaux/psaux.c
@@ -17,18 +17,14 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "psobjs.c"
-#include "psauxmod.c"
-#include "t1decode.c"
-#include "t1cmap.c"
-#ifndef T1_CONFIG_OPTION_NO_AFM
#include "afmparse.c"
-#endif
-
+#include "psauxmod.c"
#include "psconv.c"
+#include "psobjs.c"
+#include "t1cmap.c"
+#include "t1decode.c"
/* END */
diff --git a/src/pshinter/pshinter.c b/src/pshinter/pshinter.c
index e6727aea1..13e07e148 100644
--- a/src/pshinter/pshinter.c
+++ b/src/pshinter/pshinter.c
@@ -17,13 +17,13 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "pshpic.c"
-#include "pshrec.c"
-#include "pshglob.c"
+
#include "pshalgo.c"
+#include "pshglob.c"
#include "pshmod.c"
+#include "pshpic.c"
+#include "pshrec.c"
/* END */
diff --git a/src/psnames/psnames.c b/src/psnames/psnames.c
index 5b7bc8b68..22466d623 100644
--- a/src/psnames/psnames.c
+++ b/src/psnames/psnames.c
@@ -17,10 +17,10 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "pspic.c"
+
#include "psmodule.c"
+#include "pspic.c"
/* END */
diff --git a/src/raster/raster.c b/src/raster/raster.c
index ee54ae19f..46a6690b1 100644
--- a/src/raster/raster.c
+++ b/src/raster/raster.c
@@ -17,11 +17,11 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "rastpic.c"
+
#include "ftraster.c"
#include "ftrend1.c"
+#include "rastpic.c"
/* END */
diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c
index 96fc08e3b..b9b296ea5 100644
--- a/src/sfnt/pngshim.c
+++ b/src/sfnt/pngshim.c
@@ -24,7 +24,8 @@
#include FT_CONFIG_STANDARD_LIBRARY_H
-#ifdef FT_CONFIG_OPTION_USE_PNG
+#if defined( TT_CONFIG_OPTION_EMBEDDED_BITMAPS ) && \
+ defined( FT_CONFIG_OPTION_USE_PNG )
/* We always include <setjmp.h>, so make libpng shut up! */
#define PNG_SKIP_SETJMP_CHECK 1
@@ -377,7 +378,12 @@
return error;
}
-#endif /* FT_CONFIG_OPTION_USE_PNG */
+#else /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _pngshim_dummy;
+
+#endif /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */
/* END */
diff --git a/src/sfnt/sfnt.c b/src/sfnt/sfnt.c
index cffda6e6d..6cf8c9ef3 100644
--- a/src/sfnt/sfnt.c
+++ b/src/sfnt/sfnt.c
@@ -17,27 +17,19 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
+
+#include "pngshim.c"
+#include "sfdriver.c"
#include "sfntpic.c"
-#include "ttload.c"
-#include "ttmtx.c"
+#include "sfobjs.c"
+#include "ttbdf.c"
#include "ttcmap.c"
#include "ttkern.c"
-#include "sfobjs.c"
-#include "sfdriver.c"
-
-#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-#include "pngshim.c"
-#include "ttsbit.c"
-#endif
-
-#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+#include "ttload.c"
+#include "ttmtx.c"
#include "ttpost.c"
-#endif
+#include "ttsbit.c"
-#ifdef TT_CONFIG_OPTION_BDF
-#include "ttbdf.c"
-#endif
/* END */
diff --git a/src/sfnt/ttbdf.c b/src/sfnt/ttbdf.c
index e7e72209d..2196e3791 100644
--- a/src/sfnt/ttbdf.c
+++ b/src/sfnt/ttbdf.c
@@ -246,7 +246,12 @@
return error;
}
-#endif /* TT_CONFIG_OPTION_BDF */
+#else /* !TT_CONFIG_OPTION_BDF */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_bdf_dummy;
+
+#endif /* !TT_CONFIG_OPTION_BDF */
/* END */
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index 6548e8513..540d5f254 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -29,6 +29,10 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
+
+
+#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
#include "ttpost.h"
#include "sferrors.h"
@@ -561,5 +565,12 @@
return FT_Err_Ok;
}
+#else /* !TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_post_dummy;
+
+#endif /* !TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
/* END */
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index 5a0215d01..0c76a5577 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -24,6 +24,10 @@
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
#include FT_BITMAP_H
+
+
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
#include "ttsbit.h"
#include "sferrors.h"
@@ -1650,5 +1654,12 @@
return error;
}
+#else /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_sbit_dummy;
+
+#endif /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
-/* EOF */
+/* END */
diff --git a/src/smooth/smooth.c b/src/smooth/smooth.c
index 200f5dcb9..e0460d9d4 100644
--- a/src/smooth/smooth.c
+++ b/src/smooth/smooth.c
@@ -17,11 +17,11 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "ftspic.c"
+
#include "ftgrays.c"
#include "ftsmooth.c"
+#include "ftspic.c"
/* END */
diff --git a/src/truetype/truetype.c b/src/truetype/truetype.c
index 4866103a7..301b82ad1 100644
--- a/src/truetype/truetype.c
+++ b/src/truetype/truetype.c
@@ -17,22 +17,16 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "ttpic.c"
+
#include "ttdriver.c" /* driver interface */
-#include "ttpload.c" /* tables loader */
#include "ttgload.c" /* glyph loader */
-#include "ttobjs.c" /* object manager */
-
-#ifdef TT_USE_BYTECODE_INTERPRETER
+#include "ttgxvar.c" /* gx distortable font */
#include "ttinterp.c"
+#include "ttobjs.c" /* object manager */
+#include "ttpic.c"
+#include "ttpload.c" /* tables loader */
#include "ttsubpix.c"
-#endif
-
-#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include "ttgxvar.c" /* gx distortable font */
-#endif
/* END */
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 59615e22e..55b7b0d5b 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -3721,7 +3721,12 @@
}
}
-#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+#else /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_gxvar_dummy;
+
+#endif /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */
/* END */
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 7179ffd77..44df298d5 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -8415,8 +8415,12 @@
return exc->error;
}
+#else /* !TT_USE_BYTECODE_INTERPRETER */
-#endif /* TT_USE_BYTECODE_INTERPRETER */
+ /* ANSI C doesn't like empty source files */
+ typedef int _tt_interp_dummy;
+
+#endif /* !TT_USE_BYTECODE_INTERPRETER */
/* END */
diff --git a/src/truetype/ttsubpix.c b/src/truetype/ttsubpix.c
index 5d803cde1..f8502d2f7 100644
--- a/src/truetype/ttsubpix.c
+++ b/src/truetype/ttsubpix.c
@@ -27,7 +27,8 @@
#include "ttsubpix.h"
-#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
+#if defined( TT_USE_BYTECODE_INTERPRETER ) && \
+ defined( TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY )
/*************************************************************************/
/* */
@@ -1000,12 +1001,14 @@
}
}
-#else /* !TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
+#else /* !(TT_USE_BYTECODE_INTERPRETER && */
+ /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY) */
/* ANSI C doesn't like empty source files */
typedef int _tt_subpix_dummy;
-#endif /* !TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
+#endif /* !(TT_USE_BYTECODE_INTERPRETER && */
+ /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY) */
/* END */
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 792ea2ff9..11a2646fc 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -24,6 +24,8 @@
#include "t1errors.h"
+#ifndef T1_CONFIG_OPTION_NO_AFM
+
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
@@ -402,5 +404,12 @@
return FT_Err_Ok;
}
+#else /* T1_CONFIG_OPTION_NO_AFM */
+
+ /* ANSI C doesn't like empty source files */
+ typedef int _t1_afm_dummy;
+
+#endif /* T1_CONFIG_OPTION_NO_AFM */
+
/* END */
diff --git a/src/type1/type1.c b/src/type1/type1.c
index bfe0e439f..81795376e 100644
--- a/src/type1/type1.c
+++ b/src/type1/type1.c
@@ -17,17 +17,14 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-
#include <ft2build.h>
-#include "t1parse.c"
-#include "t1load.c"
-#include "t1objs.c"
-#include "t1driver.c"
-#include "t1gload.c"
-#ifndef T1_CONFIG_OPTION_NO_AFM
#include "t1afm.c"
-#endif
+#include "t1driver.c"
+#include "t1gload.c"
+#include "t1load.c"
+#include "t1objs.c"
+#include "t1parse.c"
/* END */
diff --git a/src/type42/type42.c b/src/type42/type42.c
index 4e7c9d1a4..ae8ac2678 100644
--- a/src/type42/type42.c
+++ b/src/type42/type42.c
@@ -15,11 +15,13 @@
/* */
/***************************************************************************/
-#define FT_MAKE_OPTION_SINGLE_OBJECT
+#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
+
+#include "t42drivr.c"
#include "t42objs.c"
#include "t42parse.c"
-#include "t42drivr.c"
+
/* END */