diff --git a/ChangeLog b/ChangeLog index 9a9db733d..937b2ec6f 100644 --- 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 * INSTALL: Revised. diff --git a/builds/cygwin/devel/freetype/config/ftoption.h b/builds/cygwin/devel/freetype/config/ftoption.h index 644c14322..bfc6ad7b2 100644 --- 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 */ diff --git a/builds/cygwin/ftconfig.in b/builds/cygwin/ftconfig.in index f73804a22..5071eefaa 100644 --- 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 +#endif /* Include the header file containing all developer build options */ -#include +#include FT_BUILD_H +#include FT_CONFIG_OPTIONS_H -#ifdef __cplusplus - extern "C" { -#endif +FT_BEGIN_HEADER /*************************************************************************/ @@ -145,42 +148,53 @@ #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 + +#ifdef __cplusplus +#define FT_EXPORT( x ) extern "C" x +#else +#define FT_EXPORT( x ) extern x +#endif + +#endif /* !FT_EXPORT */ #ifndef FT_EXPORT_DEF @@ -194,17 +208,6 @@ #endif /* !FT_EXPORT_DEF */ -#ifndef FT_EXPORT_FUNC - -#ifdef __cplusplus -#define FT_EXPORT_FUNC( x ) extern "C" x -#else -#define FT_EXPORT_FUNC( x ) extern x -#endif - -#endif /* !FT_EXPORT_FUNC */ - - #ifndef FT_EXPORT_VAR #ifdef __cplusplus @@ -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_CPLUSPLUS( x ) extern "C" x +#define FT_CALLBACK_DEF extern "C" +#define FT_CALLBACK_TABLE extern "C" +#define FT_CALLBACK_TABLE_DEF extern "C" #else -#define LOCAL_FUNC_X static - -#define FT_CPLUSPLUS( x ) x +#define FT_CALLBACK_DEF static +#define FT_CALLBACK_TABLE extern +#define FT_CALLBACK_TABLE_DEF #endif /* __cplusplus */ -#ifdef __cplusplus - } -#endif +FT_END_HEADER - -#endif /* FTCONFIG_H */ +#endif /* __FTCONFIG_H__ */ /* END */ diff --git a/builds/unix/devel/freetype/config/ftoption.h b/builds/unix/devel/freetype/config/ftoption.h index 644c14322..bfc6ad7b2 100644 --- 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 */ diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in index e5c508747..5071eefaa 100644 --- 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 +#endif /* Include the header file containing all developer build options */ -#include +#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 */ diff --git a/builds/win32/devel/freetype/config/ftoption.h b/builds/win32/devel/freetype/config/ftoption.h index 8a967aec9..bfc6ad7b2 100644 --- 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 */ diff --git a/include/freetype/config/ftbuild.h b/include/freetype/config/ftbuild.h index 9d501624f..50bfb6e04 100644 --- 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)