38 #ifndef __FTCONFIG_H__
39 #define __FTCONFIG_H__
42 #include FT_CONFIG_OPTIONS_H
43 #include FT_CONFIG_STANDARD_LIBRARY_H
70 #define FT_CHAR_BIT CHAR_BIT
75 #if FT_UINT_MAX == 0xFFFFUL
76 #define FT_SIZEOF_INT (16 / FT_CHAR_BIT)
77 #elif FT_UINT_MAX == 0xFFFFFFFFUL
78 #define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
79 #elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
80 #define FT_SIZEOF_INT (64 / FT_CHAR_BIT)
82 #error "Unsupported size of `int' type!"
87 #if FT_ULONG_MAX == 0xFFFFFFFFUL
88 #define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
89 #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
90 #define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
91 #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
92 #define FT_SIZEOF_LONG (64 / FT_CHAR_BIT)
94 #error "Unsupported size of `long' type!"
101 #define FT_UNUSED( arg ) ( (arg) = (arg) )
123 #if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
124 ( defined( __MWERKS__ ) && defined( macintosh ) )
130 #include "AvailabilityMacros.h"
132 #if defined( __LP64__ ) && \
133 ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
134 #define DARWIN_NO_CARBON 1
136 #define FT_MACINTOSH 1
139 #elif defined( __SC__ ) || defined( __MRC__ )
141 #include "ConditionalMacros.h"
143 #define FT_MACINTOSH 1
193 typedef signed XXX FT_Int32;
204 typedef unsigned XXX FT_UInt32;
210 #if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)
212 typedef signed int FT_Int32;
213 typedef unsigned int FT_UInt32;
215 #elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)
217 typedef signed long FT_Int32;
218 typedef unsigned long FT_UInt32;
221 #error "no 32bit type found -- please check your configuration files"
226 #if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT)
229 typedef unsigned int FT_UFast;
231 #elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)
233 typedef long FT_Fast;
234 typedef unsigned long FT_UFast;
241 #if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT)
245 #define FT_INT64 long
247 #elif defined( _MSC_VER ) && _MSC_VER >= 900
251 #define FT_INT64 __int64
253 #elif defined( __BORLANDC__ )
260 #define FT_INT64 __int64
262 #elif defined( __WATCOMC__ )
266 #elif defined( __MWERKS__ )
269 #define FT_INT64 long long int
271 #elif defined( __GNUC__ )
275 #define FT_INT64 long long int
287 #if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
300 #define FT_BEGIN_STMNT do {
301 #define FT_END_STMNT } while ( 0 )
302 #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
305 #ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
309 #if defined( __CC_ARM ) || defined( __ARMCC__ )
310 #define FT_MULFIX_ASSEMBLER FT_MulFix_arm
314 static __inline FT_Int32
315 FT_MulFix_arm( FT_Int32
a,
318 register FT_Int32
t,
t2;
339 #if defined( __arm__ ) && !defined( __thumb__ ) && \
340 !( defined( __CC_ARM ) || defined( __ARMCC__ ) )
341 #define FT_MULFIX_ASSEMBLER FT_MulFix_arm
346 FT_MulFix_arm( FT_Int32
a,
349 register FT_Int32
t,
t2;
352 __asm__ __volatile__ (
353 "smull %1, %2, %4, %3\n\t"
354 "mov %0, %2, asr #31\n\t"
355 "add %0, %0, #0x8000\n\t"
356 "adds %1, %1, %0\n\t"
358 "mov %0, %1, lsr #16\n\t"
359 "orr %0, %0, %2, lsl #16\n\t"
360 :
"=r"(a),
"=&r"(t2),
"=&r"(t)
367 #if defined( __i386__ )
368 #define FT_MULFIX_ASSEMBLER FT_MulFix_i386
373 FT_MulFix_i386( FT_Int32 a,
379 __asm__ __volatile__ (
381 "movl %%edx, %%ecx\n"
383 "addl $0x8000, %%ecx\n"
384 "addl %%ecx, %%eax\n"
388 "addl %%edx, %%eax\n"
389 :
"=a"(result),
"=d"(b)
404 #define FT_MULFIX_ASSEMBLER FT_MulFix_i386
408 static __inline FT_Int32
409 FT_MulFix_i386( FT_Int32 a,
439 #ifdef FT_CONFIG_OPTION_INLINE_MULFIX
440 #ifdef FT_MULFIX_ASSEMBLER
441 #define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER
446 #ifdef BUILD_FREETYPE2_DLL
447 #define FT_EXPORT(x) extern __declspec(dllexport) x
448 #define FT_EXPORT_DEF(x) __declspec(dllexport) x
450 #define FT_EXPORT(x) extern "C" __declspec(dllimport) x
451 #define FT_EXPORT_DEF(x) extern "C" __declspec(dllimport) x
455 #ifdef FT_MAKE_OPTION_SINGLE_OBJECT
457 #define FT_LOCAL( x ) static x
458 #define FT_LOCAL_DEF( x ) static x
463 #define FT_LOCAL( x ) extern "C" x
464 #define FT_LOCAL_DEF( x ) extern "C" x
466 #define FT_LOCAL( x ) extern x
467 #define FT_LOCAL_DEF( x ) x
476 #define FT_BASE( x ) extern "C" x
478 #define FT_BASE( x ) extern x
487 #define FT_BASE_DEF( x ) x
489 #define FT_BASE_DEF( x ) x
498 #define FT_EXPORT( x ) extern "C" x
500 #define FT_EXPORT( x ) extern x
506 #ifndef FT_EXPORT_DEF
509 #define FT_EXPORT_DEF( x ) extern "C" x
511 #define FT_EXPORT_DEF( x ) extern x
517 #ifndef FT_EXPORT_VAR
520 #define FT_EXPORT_VAR( x ) extern "C" x
522 #define FT_EXPORT_VAR( x ) extern x
550 #ifndef FT_CALLBACK_DEF
552 #define FT_CALLBACK_DEF( x ) extern "C" x
554 #define FT_CALLBACK_DEF( x ) static x
558 #ifndef FT_CALLBACK_TABLE
560 #define FT_CALLBACK_TABLE extern "C"
561 #define FT_CALLBACK_TABLE_DEF extern "C"
563 #define FT_CALLBACK_TABLE extern
564 #define FT_CALLBACK_TABLE_DEF
GLfloat GLfloat GLfloat GLfloat h
GLboolean GLboolean GLboolean GLboolean a
GLdouble GLdouble GLdouble b