OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* ftconfig.h */ | 3 /* ftconfig.h */ |
4 /* */ | 4 /* */ |
5 /* ANSI-specific configuration file (specification only). */ | 5 /* ANSI-specific configuration file (specification only). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 1996-2004, 2006-2008, 2010-2011 by */ | 7 /* Copyright 1996-2004, 2006-2008, 2010-2011 by */ |
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
9 /* */ | 9 /* */ |
10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 #define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) | 88 #define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) |
89 #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL | 89 #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL |
90 #define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) | 90 #define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) |
91 #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL | 91 #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL |
92 #define FT_SIZEOF_LONG (64 / FT_CHAR_BIT) | 92 #define FT_SIZEOF_LONG (64 / FT_CHAR_BIT) |
93 #else | 93 #else |
94 #error "Unsupported size of `long' type!" | 94 #error "Unsupported size of `long' type!" |
95 #endif | 95 #endif |
96 | 96 |
97 | 97 |
98 /* Preferred alignment of data */ | |
99 #define FT_ALIGNMENT 8 | |
100 | |
101 | |
102 /* FT_UNUSED is a macro used to indicate that a given parameter is not */ | 98 /* FT_UNUSED is a macro used to indicate that a given parameter is not */ |
103 /* used -- this is only used to get rid of unpleasant compiler warnings */ | 99 /* used -- this is only used to get rid of unpleasant compiler warnings */ |
104 #ifndef FT_UNUSED | 100 #ifndef FT_UNUSED |
105 #define FT_UNUSED( arg ) ( (arg) = (arg) ) | 101 #define FT_UNUSED( arg ) ( (arg) = (arg) ) |
106 #endif | 102 #endif |
107 | 103 |
108 | 104 |
109 /*************************************************************************/ | 105 /*************************************************************************/ |
110 /* */ | 106 /* */ |
111 /* AUTOMATIC CONFIGURATION MACROS */ | 107 /* AUTOMATIC CONFIGURATION MACROS */ |
112 /* */ | 108 /* */ |
113 /* These macros are computed from the ones defined above. Don't touch */ | 109 /* These macros are computed from the ones defined above. Don't touch */ |
114 /* their definition, unless you know precisely what you are doing. No */ | 110 /* their definition, unless you know precisely what you are doing. No */ |
115 /* porter should need to mess with them. */ | 111 /* porter should need to mess with them. */ |
116 /* */ | 112 /* */ |
117 /*************************************************************************/ | 113 /*************************************************************************/ |
118 | 114 |
119 | 115 |
120 /*************************************************************************/ | 116 /*************************************************************************/ |
121 /* */ | 117 /* */ |
122 /* Mac support */ | 118 /* Mac support */ |
123 /* */ | 119 /* */ |
124 /* This is the only necessary change, so it is defined here instead */ | 120 /* This is the only necessary change, so it is defined here instead */ |
125 /* providing a new configuration file. */ | 121 /* providing a new configuration file. */ |
126 /* */ | 122 /* */ |
127 #if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \ | 123 #if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) |
128 ( defined( __MWERKS__ ) && defined( macintosh ) ) | |
129 /* no Carbon frameworks for 64bit 10.4.x */ | 124 /* no Carbon frameworks for 64bit 10.4.x */ |
130 /* AvailabilityMacros.h is available since Mac OS X 10.2, */ | 125 /* AvailabilityMacros.h is available since Mac OS X 10.2, */ |
131 /* so guess the system version by maximum errno before inclusion */ | 126 /* so guess the system version by maximum errno before inclusion */ |
132 #include <errno.h> | 127 #include <errno.h> |
133 #ifdef ECANCELED /* defined since 10.2 */ | 128 #ifdef ECANCELED /* defined since 10.2 */ |
134 #include "AvailabilityMacros.h" | 129 #include "AvailabilityMacros.h" |
135 #endif | 130 #endif |
136 #if defined( __LP64__ ) && \ | 131 #if defined( __LP64__ ) && \ |
137 ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) | 132 ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) |
138 #define DARWIN_NO_CARBON 1 | 133 #undef FT_MACINTOSH |
139 #else | |
140 #define FT_MACINTOSH 1 | |
141 #endif | 134 #endif |
142 | 135 |
143 #elif defined( __SC__ ) || defined( __MRC__ ) | 136 #elif defined( __SC__ ) || defined( __MRC__ ) |
144 /* Classic MacOS compilers */ | 137 /* Classic MacOS compilers */ |
145 #include "ConditionalMacros.h" | 138 #include "ConditionalMacros.h" |
146 #if TARGET_OS_MAC | 139 #if TARGET_OS_MAC |
147 #define FT_MACINTOSH 1 | 140 #define FT_MACINTOSH 1 |
148 #endif | 141 #endif |
149 | 142 |
150 #endif | 143 #endif |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 /* documentation is in freetype.h */ | 340 /* documentation is in freetype.h */ |
348 | 341 |
349 static __inline__ FT_Int32 | 342 static __inline__ FT_Int32 |
350 FT_MulFix_arm( FT_Int32 a, | 343 FT_MulFix_arm( FT_Int32 a, |
351 FT_Int32 b ) | 344 FT_Int32 b ) |
352 { | 345 { |
353 register FT_Int32 t, t2; | 346 register FT_Int32 t, t2; |
354 | 347 |
355 | 348 |
356 __asm__ __volatile__ ( | 349 __asm__ __volatile__ ( |
357 "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ | 350 "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ |
358 "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ | 351 "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ |
359 "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ | 352 "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ |
360 "adds %1, %1, %0\n\t" /* %1 += %0 */ | 353 "adds %1, %1, %0\n\t" /* %1 += %0 */ |
361 "adc %2, %2, #0\n\t" /* %2 += carry */ | 354 "adc %2, %2, #0\n\t" /* %2 += carry */ |
362 "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ | 355 "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ |
363 "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ | 356 "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ |
364 : "=r"(a), "=&r"(t2), "=&r"(t) | 357 : "=r"(a), "=&r"(t2), "=&r"(t) |
365 : "r"(a), "r"(b) ); | 358 : "r"(a), "r"(b) ); |
366 return a; | 359 return a; |
367 } | 360 } |
368 | 361 |
369 #endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */ | 362 #endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */ |
370 | 363 |
371 #if defined( __i386__ ) | 364 #if defined( __i386__ ) |
372 #define FT_MULFIX_ASSEMBLER FT_MulFix_i386 | 365 #define FT_MULFIX_ASSEMBLER FT_MulFix_i386 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 #endif /* FT_CALLBACK_TABLE */ | 554 #endif /* FT_CALLBACK_TABLE */ |
562 | 555 |
563 | 556 |
564 FT_END_HEADER | 557 FT_END_HEADER |
565 | 558 |
566 | 559 |
567 #endif /* __FTCONFIG_H__ */ | 560 #endif /* __FTCONFIG_H__ */ |
568 | 561 |
569 | 562 |
570 /* END */ | 563 /* END */ |
OLD | NEW |