Fix static compilation with Visual C.

* include/freetype/internal/compiler-macros.h
(FT_INTERNAL_FUNCTION_ATTRIBUTE) <_WIN32>: Define as empty.
This commit is contained in:
Anuj Verma 2020-07-28 18:34:37 +02:00 committed by Werner Lemberg
parent fffc303a7f
commit 3273521f40
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2020-07-28 Anuj Verma <anujv@iitbhilai.ac.in>
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 <priyeshkkumar@gmail.com>
Fix `-Wformat' compiler warnings.

View File

@ -105,9 +105,16 @@ FT_BEGIN_HEADER
* 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