Add Watcom C/C++ support.

* include/freetype/config/integer-types.h: Make sure `long long` is
used then available.
* include/freetype/internal/ftcalc.h (FT_MSB): Add Watcom C/C++ pragma.
This commit is contained in:
Ozkan Sezer 2022-01-14 22:07:44 -05:00 committed by Alexei Podtelezhnikov
parent ba5d661f34
commit 11ea89b51c
2 changed files with 16 additions and 2 deletions

View File

@ -221,9 +221,10 @@
#define FT_INT64 __int64
#define FT_UINT64 unsigned __int64
#elif defined( __WATCOMC__ ) /* Watcom C++ */
#elif defined( __WATCOMC__ ) && __WATCOMC__ >= 1100 /* Watcom C++ */
/* Watcom doesn't provide 64-bit data types */
#define FT_INT64 long long int
#define FT_UINT64 unsigned long long int
#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */

View File

@ -408,6 +408,19 @@ FT_BEGIN_HEADER
#endif
#elif defined( __WATCOMC__ ) && defined( __386__ )
extern __inline FT_Int32
FT_MSB_i386( FT_UInt32 x );
#pragma aux FT_MSB_i386 = \
"bsr eax, eax" \
parm [eax] nomemory \
value [eax] \
modify exact [eax] nomemory;
#define FT_MSB( x ) FT_MSB_i386( x )
#elif defined( __DECC ) || defined( __DECCXX )
#include <builtins.h>