ref: 3273521f408938e0088258bda62d280d6e5967eb
parent: fffc303a7f397d08eee719eca351bdb55b3a1e83
author: Anuj Verma <[email protected]>
date: Tue Jul 28 14:34:37 EDT 2020
Fix static compilation with Visual C. * include/freetype/internal/compiler-macros.h (FT_INTERNAL_FUNCTION_ATTRIBUTE) <_WIN32>: Define as empty.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-07-28 Anuj Verma <[email protected]>
+
+ Fix static compilation with Visual C.
+
+ * include/freetype/internal/compiler-macros.h
+ (FT_INTERNAL_FUNCTION_ATTRIBUTE) <_WIN32>: Define as empty.
+
2020-07-28 Priyesh Kumar <[email protected]>
Fix `-Wformat' compiler warnings.
--- a/include/freetype/internal/compiler-macros.h
+++ b/include/freetype/internal/compiler-macros.h
@@ -105,9 +105,16 @@
* generate smaller and faster code on ELF-based platforms. Place this
* before a function declaration.
*/
-#if ( defined( __GNUC__ ) && __GNUC__ >= 4 ) || defined( __clang__ )
+
+ /* Visual C, mingw */
+#if defined( _WIN32 )
+#define FT_INTERNAL_FUNCTION_ATTRIBUTE /* empty */
+
+ /* gcc, clang */
+#elif ( defined( __GNUC__ ) && __GNUC__ >= 4 ) || defined( __clang__ )
#define FT_INTERNAL_FUNCTION_ATTRIBUTE \
__attribute__(( visibility( "hidden" ) ))
+
#else
#define FT_INTERNAL_FUNCTION_ATTRIBUTE /* empty */
#endif