Commit 7f7bf6f0f0b707f84594a424d5e15fda8275887b

Alexei Podtelezhnikov 2022-01-14T20:33:28

* include/freetype/internal/compiler-macros.h [FT_COMPARE_DEF]: Tighten. This works around Watcom C library using __watcall.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/include/freetype/internal/compiler-macros.h b/include/freetype/internal/compiler-macros.h
index 88c0bf0..84c3203 100644
--- a/include/freetype/internal/compiler-macros.h
+++ b/include/freetype/internal/compiler-macros.h
@@ -299,9 +299,9 @@ FT_BEGIN_HEADER
 #define FT_CALLBACK_DEF( x )  static  x
 #endif
 
-#if defined( __i386__ )
+#if defined( __GNUC__ ) && defined( __i386__ )
 #define FT_COMPARE_DEF( x )  FT_CALLBACK_DEF( x ) __attribute__(( cdecl ))
-#elif defined( _M_IX86 )
+#elif defined( _MSC_VER ) && defined( _M_IX86 )
 #define FT_COMPARE_DEF( x )  FT_CALLBACK_DEF( x ) __cdecl
 #else
 #define FT_COMPARE_DEF( x )  FT_CALLBACK_DEF( x )