* include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) [_MSC_VER]: Limit Visual C++ attributes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
diff --git a/ChangeLog b/ChangeLog
index 7d6fce7..1a49bdd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
+ [_MSC_VER]: Limit Visual C++ attributes.
+
2018-01-03 Werner Lemberg <wl@gnu.org>
[truetype] Make blend/design coordinate round-tripping work.
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h
index 86dc445..f539e9a 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -455,22 +455,27 @@ FT_BEGIN_HEADER
/* */
#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