[build] Expand dllexport/dllimport to Cygwin/MinGW. * include/freetype/config/ftconfig.h: Respect DLL_EXPORT, s/_MSC_VER/_WIN32/. * builds/unix/ftconfig.in: Replicate here. * builds/vms/ftconfig.h: Replicate here.
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
diff --git a/ChangeLog b/ChangeLog
index ab6d421..6e1a0f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [build] Expand dllexport/dllimport to Cygwin/MinGW.
+
+ * include/freetype/config/ftconfig.h: Respect DLL_EXPORT,
+ s/_MSC_VER/_WIN32/.
+ * builds/unix/ftconfig.in: Replicate here.
+ * builds/vms/ftconfig.h: Replicate here.
+
+2018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
+
[build] Improve and document MSVC build.
* include/freetype/config/ftconfig.h: Guard dllexport/dllimport
diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in
index 5159693..ca90588 100644
--- a/builds/unix/ftconfig.in
+++ b/builds/unix/ftconfig.in
@@ -493,6 +493,17 @@ FT_BEGIN_HEADER
#define FT_EXPORT( x ) extern x
#endif
+#ifdef _WIN32
+#if defined( FT2_BUILD_LIBRARY ) && \
+ ( defined( _DLL ) || defined( DLL_EXPORT ) )
+#undef FT_EXPORT
+#define FT_EXPORT( x ) __declspec( dllexport ) x
+#elif defined( FT2_DLLIMPORT )
+#undef FT_EXPORT
+#define FT_EXPORT( x ) __declspec( dllimport ) x
+#endif
+#endif
+
#endif /* !FT_EXPORT */
diff --git a/builds/vms/ftconfig.h b/builds/vms/ftconfig.h
index fa4aa11..d87ea69 100644
--- a/builds/vms/ftconfig.h
+++ b/builds/vms/ftconfig.h
@@ -445,6 +445,17 @@ FT_BEGIN_HEADER
#define FT_EXPORT( x ) extern x
#endif
+#ifdef _WIN32
+#if defined( FT2_BUILD_LIBRARY ) && \
+ ( defined( _DLL ) || defined( DLL_EXPORT ) )
+#undef FT_EXPORT
+#define FT_EXPORT( x ) __declspec( dllexport ) x
+#elif defined( FT2_DLLIMPORT )
+#undef FT_EXPORT
+#define FT_EXPORT( x ) __declspec( dllimport ) x
+#endif
+#endif
+
#endif /* !FT_EXPORT */
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h
index 009c70f..8ff143e 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -461,8 +461,9 @@ FT_BEGIN_HEADER
#define FT_EXPORT( x ) extern x
#endif
-#ifdef _MSC_VER
-#if defined( FT2_BUILD_LIBRARY ) && defined( _DLL )
+#ifdef _WIN32
+#if defined( FT2_BUILD_LIBRARY ) && \
+ ( defined( _DLL ) || defined( DLL_EXPORT ) )
#undef FT_EXPORT
#define FT_EXPORT( x ) __declspec( dllexport ) x
#elif defined( FT2_DLLIMPORT )