summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-src/builds/unix/ftconfig.in
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-05-04 03:48:43 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-05-04 03:48:43 +0000
commit90faf12dc7ac78559d3bb81953320d776a835e4b (patch)
tree63f5984f95b88d6b61bb33f35f15291027b5b2b0 /Build/source/libs/freetype2/freetype-src/builds/unix/ftconfig.in
parent0544c09782621c9e10d568d81d543db34e07af83 (diff)
freetype-2.9.1
git-svn-id: svn://tug.org/texlive/trunk@47607 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/builds/unix/ftconfig.in')
-rw-r--r--Build/source/libs/freetype2/freetype-src/builds/unix/ftconfig.in26
1 files changed, 22 insertions, 4 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/builds/unix/ftconfig.in b/Build/source/libs/freetype2/freetype-src/builds/unix/ftconfig.in
index 5159693e705..b9c21da2c28 100644
--- a/Build/source/libs/freetype2/freetype-src/builds/unix/ftconfig.in
+++ b/Build/source/libs/freetype2/freetype-src/builds/unix/ftconfig.in
@@ -454,9 +454,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. */
@@ -487,12 +487,30 @@ 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
+#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 */