From 0fcbb73fa3bb1e193ebe0ba8d3080359a86dae66 Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Tue, 12 Sep 2017 16:23:56 +0900 Subject: [PATCH] replace dummy code in PIC support, from typedef to unused global variable. Watcom C compiler does not recognize typedef-only code as something valid. --- src/autofit/afpic.c | 5 +++++ src/base/basepic.c | 6 ++++++ src/base/ftpic.c | 5 +++++ src/cff/cffpic.c | 5 +++++ src/pshinter/pshpic.c | 5 +++++ src/psnames/pspic.c | 5 +++++ src/raster/rastpic.c | 5 +++++ src/sfnt/pngshim.c | 2 +- src/sfnt/sfntpic.c | 5 +++++ src/smooth/ftspic.c | 5 +++++ src/truetype/ttgxvar.c | 2 +- src/truetype/ttpic.c | 5 +++++ 12 files changed, 53 insertions(+), 2 deletions(-) diff --git a/src/autofit/afpic.c b/src/autofit/afpic.c index 3125e03e2..50da752c9 100644 --- a/src/autofit/afpic.c +++ b/src/autofit/afpic.c @@ -146,6 +146,11 @@ return error; } +#else + + /* ANSI C doesn't like empty source files */ + int _autofit_afpic_dummy = 1; + #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/base/basepic.c b/src/base/basepic.c index 57fb8169a..c4475ead9 100644 --- a/src/base/basepic.c +++ b/src/base/basepic.c @@ -102,6 +102,12 @@ return error; } +#else + + /* ANSI C doesn't like empty source files */ + int _base_basepic_dummy = 1; + + #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/base/ftpic.c b/src/base/ftpic.c index 0f84fddc9..41112005e 100644 --- a/src/base/ftpic.c +++ b/src/base/ftpic.c @@ -49,6 +49,11 @@ ft_base_pic_free( library ); } +#else + + /* ANSI C doesn't like empty source files */ + int _base_ftpic_dummy = 1; + #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/cff/cffpic.c b/src/cff/cffpic.c index 4e9ba12b3..ea09db70c 100644 --- a/src/cff/cffpic.c +++ b/src/cff/cffpic.c @@ -132,6 +132,11 @@ return error; } +#else + + /* ANSI C doesn't like empty source files */ + int _cff_cffpic_dummy = 1; + #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/pshinter/pshpic.c b/src/pshinter/pshpic.c index c0d3a64f2..278f46424 100644 --- a/src/pshinter/pshpic.c +++ b/src/pshinter/pshpic.c @@ -70,6 +70,11 @@ return error; } +#else + + /* ANSI C doesn't like empty source files */ + int _pshinter_pshpic_dummy = 1; + #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/psnames/pspic.c b/src/psnames/pspic.c index 8b9003439..f261b3c65 100644 --- a/src/psnames/pspic.c +++ b/src/psnames/pspic.c @@ -91,6 +91,11 @@ } +#else + + /* ANSI C doesn't like empty source files */ + int _psnames_pspic_dummy = 1; + #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/raster/rastpic.c b/src/raster/rastpic.c index 7085339b7..235bc254c 100644 --- a/src/raster/rastpic.c +++ b/src/raster/rastpic.c @@ -83,6 +83,11 @@ return error; } +#else + + /* ANSI C doesn't like empty source files */ + int _rastter_rastpic_dummy = 1; + #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c index b05c6de06..89befe8b7 100644 --- a/src/sfnt/pngshim.c +++ b/src/sfnt/pngshim.c @@ -444,7 +444,7 @@ #else /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */ /* ANSI C doesn't like empty source files */ - typedef int _pngshim_dummy; + int _sfnt_pngshim_dummy = 1; #endif /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */ diff --git a/src/sfnt/sfntpic.c b/src/sfnt/sfntpic.c index 8eadd601f..0f4a6d4d0 100644 --- a/src/sfnt/sfntpic.c +++ b/src/sfnt/sfntpic.c @@ -137,6 +137,11 @@ return error; } +#else + + /* ANSI C doesn't like empty source files */ + int _sfnt_sfntpic_dummy = 1; + #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/smooth/ftspic.c b/src/smooth/ftspic.c index fb89be348..7a42aab50 100644 --- a/src/smooth/ftspic.c +++ b/src/smooth/ftspic.c @@ -112,6 +112,11 @@ ft_smooth_renderer_class_pic_free( library ); } +#else + + /* ANSI C doesn't like empty source files */ + int _smooth_ftspic_dummy = 1; + #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index ec733e6c1..005f7ee9a 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -3762,7 +3762,7 @@ #else /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */ /* ANSI C doesn't like empty source files */ - typedef int _tt_gxvar_dummy; + int _tt_gxvar_dummy = 1; #endif /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */ diff --git a/src/truetype/ttpic.c b/src/truetype/ttpic.c index 66bd7e193..3a06cae2c 100644 --- a/src/truetype/ttpic.c +++ b/src/truetype/ttpic.c @@ -95,6 +95,11 @@ return error; } +#else + + /* ANSI C doesn't like empty source files */ + int _truetype_ttpic_dummy = 1; + #endif /* FT_CONFIG_OPTION_PIC */