shithub: freetype+ttf2subf

Download patch

ref: ac4cd9516e233849d2e519a63e4fad9ec8067709
parent: 2e82c93b9de79f1ba3c9d56797db780ba8527a17
author: David Turner <[email protected]>
date: Fri Dec 1 19:35:11 EST 2000

changes to allow compilation under Unix and Cygwin

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,10 @@
 
 	* CHANGES: added a summary of changes between 2.0.1 and 2.0
 
+	* builds/unix/ftconfig.in, builds/cygwin/ftconfig.in: changes
+	to allow compilation under Unix with the Unix-specific config
+	files..
+
 2000-12-01  Werner Lemberg  <[email protected]>
 
 	* INSTALL: Revised.
--- a/builds/cygwin/devel/freetype/config/ftoption.h
+++ b/builds/cygwin/devel/freetype/config/ftoption.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef FTOPTION_H
-#define FTOPTION_H
+#ifndef __FTOPTION_H__
+#define __FTOPTION_H__
 
 
 #ifdef __cplusplus
@@ -394,7 +394,7 @@
 #endif
 
 
-#endif /* FTOPTION_H */
+#endif /* __FTOPTION_H__ */
 
 
 /* END */
--- a/builds/cygwin/ftconfig.in
+++ b/builds/cygwin/ftconfig.in
@@ -34,17 +34,20 @@
   /*************************************************************************/
 
 
-#ifndef FTCONFIG_H
-#define FTCONFIG_H
+#ifndef __FTCONFIG_H__
+#define __FTCONFIG_H__
 
+#ifndef    FT_BUILD_H
+#  define  FT_BUILD_H  <freetype/config/ftbuild.h>
+#endif
 
+
   /* Include the header file containing all developer build options */
-#include <freetype/config/ftoption.h>
+#include FT_BUILD_H
+#include FT_CONFIG_OPTIONS_H
 
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
+FT_BEGIN_HEADER
 
 
   /*************************************************************************/
@@ -145,64 +148,64 @@
 
 #ifdef FT_MAKE_OPTION_SINGLE_OBJECT
 
-#define LOCAL_DEF   static
-#define LOCAL_FUNC  static
+#define FT_LOCAL      static
+#define FT_LOCAL_DEF  static
 
 #else
 
 #ifdef __cplusplus
-#define LOCAL_DEF   extern "C"
-#define LOCAL_FUNC  extern "C"
+#define FT_LOCAL      extern "C"
+#define FT_LOCAL_DEF  extern "C"
 #else
-#define LOCAL_DEF   extern
-#define LOCAL_FUNC  extern
+#define FT_LOCAL      extern
+#define FT_LOCAL_DEF  extern
 #endif
 
 #endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
 
 
-#ifndef BASE_DEF
+#ifndef FT_BASE
 
 #ifdef __cplusplus
-#define BASE_DEF( x )  extern "C"  x
+#define FT_BASE( x )  extern "C"  x
 #else
-#define BASE_DEF( x )  extern  x
+#define FT_BASE( x )  extern  x
 #endif
 
-#endif /* !BASE_DEF */
+#endif /* !FT_BASE */
 
 
-#ifndef BASE_FUNC
+#ifndef FT_BASE_DEF
 
 #ifdef __cplusplus
-#define BASE_FUNC( x )  extern "C"  x
+#define FT_BASE_DEF( x )  extern "C"  x
 #else
-#define BASE_FUNC( x )  extern  x
+#define FT_BASE_DEF( x )  extern  x
 #endif
 
-#endif /* !BASE_FUNC */
+#endif /* !FT_BASE_DEF */
 
 
-#ifndef FT_EXPORT_DEF
+#ifndef FT_EXPORT
 
 #ifdef __cplusplus
-#define FT_EXPORT_DEF( x )  extern "C"  x
+#define FT_EXPORT( x )  extern "C"  x
 #else
-#define FT_EXPORT_DEF( x )  extern  x
+#define FT_EXPORT( x )  extern  x
 #endif
 
-#endif /* !FT_EXPORT_DEF */
+#endif /* !FT_EXPORT */
 
 
-#ifndef FT_EXPORT_FUNC
+#ifndef FT_EXPORT_DEF
 
 #ifdef __cplusplus
-#define FT_EXPORT_FUNC( x )  extern "C"  x
+#define FT_EXPORT_DEF( x )  extern "C"  x
 #else
-#define FT_EXPORT_FUNC( x )  extern  x
+#define FT_EXPORT_DEF( x )  extern  x
 #endif
 
-#endif /* !FT_EXPORT_FUNC */
+#endif /* !FT_EXPORT_DEF */
 
 
 #ifndef FT_EXPORT_VAR
@@ -215,6 +218,10 @@
 
 #endif /* !FT_EXPORT_VAR */
 
+  /* The following macros are needed to compile the library with a   */
+  /* C++ compiler.  Note that we do this for convenience -- please   */
+  /* don't ask for more C++ features.                                */
+  /*                                                                 */
 
   /* This is special.  Within C++, you must specify `extern "C"' for */
   /* functions which are used via function pointers, and you also    */
@@ -222,27 +229,33 @@
   /* assure C linkage -- it's not possible to have (local) anonymous */
   /* functions which are accessed by (global) function pointers.     */
   /*                                                                 */
+  /*                                                                 */
+  /* FT_CALLBACK_DEF is used to _define_ a callback function.        */
+  /*                                                                 */
+  /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
+  /* contains pointers to callback functions.                        */
+  /*                                                                 */
+  /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */
+  /* that contains pointers to callback functions.                   */
+  /*                                                                 */
 #ifdef __cplusplus
 
-#define LOCAL_FUNC_X  extern "C"
+#define FT_CALLBACK_DEF             extern "C"
+#define FT_CALLBACK_TABLE           extern "C"
+#define FT_CALLBACK_TABLE_DEF       extern "C"
 
-#define FT_CPLUSPLUS( x )  extern "C"  x
-
 #else
 
-#define LOCAL_FUNC_X  static
+#define FT_CALLBACK_DEF             static
+#define FT_CALLBACK_TABLE           extern
+#define FT_CALLBACK_TABLE_DEF
 
-#define FT_CPLUSPLUS( x )  x
-
 #endif /* __cplusplus */
 
 
-#ifdef __cplusplus
-  }
-#endif
+FT_END_HEADER
 
-
-#endif /* FTCONFIG_H */
+#endif /* __FTCONFIG_H__ */
 
 
 /* END */
--- a/builds/unix/devel/freetype/config/ftoption.h
+++ b/builds/unix/devel/freetype/config/ftoption.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef FTOPTION_H
-#define FTOPTION_H
+#ifndef __FTOPTION_H__
+#define __FTOPTION_H__
 
 
 #ifdef __cplusplus
@@ -394,7 +394,7 @@
 #endif
 
 
-#endif /* FTOPTION_H */
+#endif /* __FTOPTION_H__ */
 
 
 /* END */
--- a/builds/unix/ftconfig.in
+++ b/builds/unix/ftconfig.in
@@ -34,17 +34,20 @@
   /*************************************************************************/
 
 
-#ifndef FTCONFIG_H
-#define FTCONFIG_H
+#ifndef __FTCONFIG_H__
+#define __FTCONFIG_H__
 
+#ifndef    FT_BUILD_H
+#  define  FT_BUILD_H  <freetype/config/ftbuild.h>
+#endif
 
+
   /* Include the header file containing all developer build options */
-#include <freetype/config/ftoption.h>
+#include FT_BUILD_H
+#include FT_CONFIG_OPTIONS_H
 
 
-#ifdef __cplusplus
-  extern "C" {
-#endif
+FT_BEGIN_HEADER
 
 
   /*************************************************************************/
@@ -250,12 +253,9 @@
 #endif /* __cplusplus */
 
 
-#ifdef __cplusplus
-  }
-#endif
+FT_END_HEADER
 
-
-#endif /* FTCONFIG_H */
+#endif /* __FTCONFIG_H__ */
 
 
 /* END */
--- a/builds/win32/devel/freetype/config/ftoption.h
+++ b/builds/win32/devel/freetype/config/ftoption.h
@@ -16,8 +16,8 @@
 /***************************************************************************/
 
 
-#ifndef FTOPTION_H
-#define FTOPTION_H
+#ifndef __FTOPTION_H__
+#define __FTOPTION_H__
 
 
 #ifdef __cplusplus
@@ -359,7 +359,7 @@
   /*                                                                       */
   /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
   /*                                                                       */
-#define T1_MAX_CHARSTRINGS_OPERANDS  64
+#define T1_MAX_CHARSTRINGS_OPERANDS  256
 
 
   /*************************************************************************/
@@ -394,7 +394,7 @@
 #endif
 
 
-#endif /* FTOPTION_H */
+#endif /* __FTOPTION_H__ */
 
 
 /* END */
--- a/include/freetype/config/ftbuild.h
+++ b/include/freetype/config/ftbuild.h
@@ -163,9 +163,17 @@
   /* don't add spaces around arguments to FT_CONFIG_FILE! */
 
   /* configuration files */
-#define FT_CONFIG_CONFIG_H     FT_CONFIG_FILE(ftconfig.h)
-#define FT_CONFIG_OPTIONS_H    FT_CONFIG_FILE(ftoption.h)
-#define FT_CONFIG_MODULES_H    FT_CONFIG_FILE(ftmodule.h)
+#ifndef   FT_CONFIG_CONFIG_H
+#  define FT_CONFIG_CONFIG_H     FT_CONFIG_FILE(ftconfig.h)
+#endif
+
+#ifndef   FT_CONFIG_OPTIONS_H
+#  define FT_CONFIG_OPTIONS_H    FT_CONFIG_FILE(ftoption.h)
+#endif
+
+#ifndef   FT_CONFIG_MODULES_H
+#  define FT_CONFIG_MODULES_H    FT_CONFIG_FILE(ftmodule.h)
+#endif
 
   /* public headers */
 #define FT_ERRORS_H            FT_PUBLIC_FILE(fterrors.h)