Commit 89a529f3176fc68415cc5e3ab50f89629fb269cd

Werner Lemberg 2013-08-02T14:50:23

[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'.

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. */