[autofit] Fix `make multi'. * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF): New macros. * src/autofit/afglobal.c (af_writing_system_classes, af_script_classes): Use FT_LOCAL_ARRAY_DEF. * src/autofit/afglobal.h: Declare `af_writing_system_classes' and `af_script_classes'. * src/autofit/afloader.c: Include `afpic.h'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
diff --git a/ChangeLog b/ChangeLog
index f07d658..4029fb2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix `make multi'.
+
+ * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY,
+ FT_LOCAL_ARRAY_DEF): New macros.
+
+ * src/autofit/afglobal.c (af_writing_system_classes,
+ af_script_classes): Use FT_LOCAL_ARRAY_DEF.
+ * src/autofit/afglobal.h: Declare `af_writing_system_classes' and
+ `af_script_classes'.
+ * src/autofit/afloader.c: Include `afpic.h'.
+
2013-08-01 Werner Lemberg <wl@gnu.org>
Another round of cppcheck nitpicks.
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h
index ab1e7a5..9c32256 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -555,6 +555,9 @@ FT_BEGIN_HEADER
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+#define FT_LOCAL_ARRAY( x ) extern const x
+#define FT_LOCAL_ARRAY_DEF( x ) const x
+
#ifndef FT_BASE
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index f5d7bb4..4e9138a 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -35,7 +35,8 @@
/* AF_WRITING_SYSTEM_CLASSES_COUNT and autofit_module_class_pic_init */
/* populate this list when you add new writing systems */
- static AF_WritingSystemClass const af_writing_system_classes[] =
+ FT_LOCAL_ARRAY_DEF( AF_WritingSystemClass )
+ af_writing_system_classes[] =
{
&af_dummy_writing_system_class,
&af_latin_writing_system_class,
@@ -52,7 +53,8 @@
/* AF_SCRIPT_CLASSES_COUNT and autofit_module_class_pic_init */
/* populate this list when you add new scripts */
- static AF_ScriptClass const af_script_classes[] =
+ FT_LOCAL_ARRAY_DEF( AF_ScriptClass )
+ af_script_classes[] =
{
&af_dflt_script_class, /* XXX */
&af_latn_script_class,
diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h
index 8034536..8077afd 100644
--- a/src/autofit/afglobal.h
+++ b/src/autofit/afglobal.h
@@ -28,6 +28,13 @@
FT_BEGIN_HEADER
+ FT_LOCAL_ARRAY( AF_WritingSystemClass )
+ af_writing_system_classes[];
+
+ FT_LOCAL_ARRAY( AF_ScriptClass )
+ af_script_classes[];
+
+
/*
* Default values and flags for both autofitter globals (found in
* AF_ModuleRec) and face globals (in AF_FaceGlobalsRec).
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index fa5a4c4..b49f8c0 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -21,6 +21,7 @@
#include "afhints.h"
#include "aferrors.h"
#include "afmodule.h"
+#include "afpic.h"
/* Initialize glyph loader. */