ref: c94d042be61ce3a1cdcf281c473e674a76b117ba
parent: ecfdfd4498d6c1313b3faaa9d7cf1917e4be98c5
author: Alexei Podtelezhnikov <[email protected]>
date: Tue Jan 2 16:38:35 EST 2018
* include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) [_MSC_VER]: Limit Visual C++ attributes.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-03 Alexei Podtelezhnikov <[email protected]>
+
+ * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
+ [_MSC_VER]: Limit Visual C++ attributes.
+
2018-01-03 Werner Lemberg <[email protected]>
[truetype] Make blend/design coordinate round-tripping work.
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -455,22 +455,27 @@
/* */
#ifndef FT_EXPORT
-#if defined( _DLL )
-#define FT_EXPORT( x ) __declspec( dllexport ) x
-#elif defined( __cplusplus )
+#ifdef __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
+#define FT_EXPORT( x ) __declspec( dllimport ) x
+#endif
+#endif
+
#endif /* !FT_EXPORT */
#ifndef FT_EXPORT_DEF
-#if defined( _DLL )
-#define FT_EXPORT_DEF( x ) __declspec( dllexport ) x
-#elif defined( __cplusplus )
+#ifdef __cplusplus
#define FT_EXPORT_DEF( x ) extern "C" x
#else
#define FT_EXPORT_DEF( x ) extern x