diff options
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/include/freetype/config/ftconfig.h')
-rw-r--r-- | Build/source/libs/freetype2/freetype-src/include/freetype/config/ftconfig.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftconfig.h b/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftconfig.h index f539e9a17a7..eedebf4082e 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftconfig.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftconfig.h @@ -422,9 +422,9 @@ FT_BEGIN_HEADER #endif /* !FT_BASE_DEF */ - /* When compiling FreeType as a DLL, some systems/compilers need a */ - /* special attribute in front OR after the return type of function */ - /* declarations. */ + /* When compiling FreeType as a DLL or DSO with hidden visibility */ + /* some systems/compilers need a special attribute in front OR after */ + /* the return type of function declarations. */ /* */ /* Two macros are used within the FreeType source code to define */ /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ @@ -455,19 +455,28 @@ FT_BEGIN_HEADER /* */ #ifndef FT_EXPORT -#ifdef __cplusplus +#ifdef FT2_BUILD_LIBRARY + +#if defined( _WIN32 ) && ( defined( _DLL ) || defined( DLL_EXPORT ) ) +#define FT_EXPORT( x ) __declspec( dllexport ) x +#elif defined( __GNUC__ ) && __GNUC__ >= 4 +#define FT_EXPORT( x ) __attribute__(( visibility( "default" ) )) x +#elif defined( __cplusplus ) #define FT_EXPORT( x ) extern "C" x #else #define FT_EXPORT( x ) extern x #endif -#ifdef _MSC_VER -#undef FT_EXPORT -#ifdef _DLL -#define FT_EXPORT( x ) __declspec( dllexport ) x #else + +#if defined( FT2_DLLIMPORT ) #define FT_EXPORT( x ) __declspec( dllimport ) x +#elif defined( __cplusplus ) +#define FT_EXPORT( x ) extern "C" x +#else +#define FT_EXPORT( x ) extern x #endif + #endif #endif /* !FT_EXPORT */ |