changed the definition of FT_CALLBACK_DEF
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
diff --git a/ChangeLog b/ChangeLog
index 6c79678..59949c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2001-06-27 David Turner <david@freetype.org>
+ * builds/unix/ftconfig.in: changed the definition of the
+ FT_CALLBACK_DEF macro
+
* include/freetype/ftconfig.h, src/*/*.c: changed the definition and
uses of the FT_CALLBACK_DEF macro in order to support 16-bit compilers
diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in
index 02db171..52d5de7 100644
--- a/builds/unix/ftconfig.in
+++ b/builds/unix/ftconfig.in
@@ -231,19 +231,23 @@ FT_BEGIN_HEADER
/* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
/* that contains pointers to callback functions. */
/* */
-#ifdef __cplusplus
-
-#define FT_CALLBACK_DEF extern "C"
-#define FT_CALLBACK_TABLE extern "C"
-#define FT_CALLBACK_TABLE_DEF extern "C"
-
-#else
-
-#define FT_CALLBACK_DEF static
-#define FT_CALLBACK_TABLE extern
-#define FT_CALLBACK_TABLE_DEF /* nothing */
+#ifndef FT_CALLBACK_DEF
+# ifdef __cplusplus
+# define FT_CALLBACK_DEF(x) extern "C" x
+# else
+# define FT_CALLBACK_DEF(x) static x
+# endif
+#endif
-#endif /* __cplusplus */
+#ifndef FT_CALLBACK_TABLE
+# ifdef __cplusplus
+# define FT_CALLBACK_TABLE extern "C"
+# define FT_CALLBACK_TABLE_DEF extern "C"
+# else
+# define FT_CALLBACK_TABLE extern
+# define FT_CALLBACK_TABLE_DEF /* nothing */
+# endif
+#endif
FT_END_HEADER