Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3918 | Serge | 1 | /***************************************************************************/ |
2 | /* */ |
||
3 | /* ftconfig.h */ |
||
4 | /* */ |
||
5 | /* VMS-specific configuration file (specification only). */ |
||
6 | /* */ |
||
7 | /* Copyright 1996-2004, 2006-2008, 2011 by */ |
||
8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
||
9 | /* */ |
||
10 | /* This file is part of the FreeType project, and may only be used, */ |
||
11 | /* modified, and distributed under the terms of the FreeType project */ |
||
12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
||
13 | /* this file you indicate that you have read the license and */ |
||
14 | /* understand and accept it fully. */ |
||
15 | /* */ |
||
16 | /***************************************************************************/ |
||
17 | |||
18 | |||
19 | /*************************************************************************/ |
||
20 | /* */ |
||
21 | /* This header file contains a number of macro definitions that are used */ |
||
22 | /* by the rest of the engine. Most of the macros here are automatically */ |
||
23 | /* determined at compile time, and you should not need to change it to */ |
||
24 | /* port FreeType, except to compile the library with a non-ANSI */ |
||
25 | /* compiler. */ |
||
26 | /* */ |
||
27 | /* Note however that if some specific modifications are needed, we */ |
||
28 | /* advise you to place a modified copy in your build directory. */ |
||
29 | /* */ |
||
30 | /* The build directory is usually `freetype/builds/ |
||
31 | /* contains system-specific files that are always included first when */ |
||
32 | /* building the library. */ |
||
33 | /* */ |
||
34 | /*************************************************************************/ |
||
35 | |||
36 | |||
37 | #ifndef __FTCONFIG_H__ |
||
38 | #define __FTCONFIG_H__ |
||
39 | |||
40 | |||
41 | /* Include the header file containing all developer build options */ |
||
42 | #include |
||
43 | #include FT_CONFIG_OPTIONS_H |
||
44 | #include FT_CONFIG_STANDARD_LIBRARY_H |
||
45 | |||
46 | |||
47 | FT_BEGIN_HEADER |
||
48 | |||
49 | /*************************************************************************/ |
||
50 | /* */ |
||
51 | /* PLATFORM-SPECIFIC CONFIGURATION MACROS */ |
||
52 | /* */ |
||
53 | /* These macros can be toggled to suit a specific system. The current */ |
||
54 | /* ones are defaults used to compile FreeType in an ANSI C environment */ |
||
55 | /* (16bit compilers are also supported). Copy this file to your own */ |
||
56 | /* `freetype/builds/ |
||
57 | /* */ |
||
58 | /*************************************************************************/ |
||
59 | |||
60 | |||
61 | #define HAVE_UNISTD_H 1 |
||
62 | #define HAVE_FCNTL_H 1 |
||
63 | |||
64 | #define SIZEOF_INT 4 |
||
65 | #define SIZEOF_LONG 4 |
||
66 | |||
67 | #define FT_SIZEOF_INT 4 |
||
68 | #define FT_SIZEOF_LONG 4 |
||
69 | |||
70 | #define FT_CHAR_BIT 8 |
||
71 | |||
72 | |||
73 | /* FT_UNUSED is a macro used to indicate that a given parameter is not */ |
||
74 | /* used -- this is only used to get rid of unpleasant compiler warnings */ |
||
75 | #ifndef FT_UNUSED |
||
76 | #define FT_UNUSED( arg ) ( (arg) = (arg) ) |
||
77 | #endif |
||
78 | |||
79 | |||
80 | /*************************************************************************/ |
||
81 | /* */ |
||
82 | /* AUTOMATIC CONFIGURATION MACROS */ |
||
83 | /* */ |
||
84 | /* These macros are computed from the ones defined above. Don't touch */ |
||
85 | /* their definition, unless you know precisely what you are doing. No */ |
||
86 | /* porter should need to mess with them. */ |
||
87 | /* */ |
||
88 | /*************************************************************************/ |
||
89 | |||
90 | |||
91 | /*************************************************************************/ |
||
92 | /* */ |
||
93 | /* Mac support */ |
||
94 | /* */ |
||
95 | /* This is the only necessary change, so it is defined here instead */ |
||
96 | /* providing a new configuration file. */ |
||
97 | /* */ |
||
98 | #if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) |
||
99 | /* no Carbon frameworks for 64bit 10.4.x */ |
||
100 | /* AvailabilityMacros.h is available since Mac OS X 10.2, */ |
||
101 | /* so guess the system version by maximum errno before inclusion */ |
||
102 | #include |
||
103 | #ifdef ECANCELED /* defined since 10.2 */ |
||
104 | #include "AvailabilityMacros.h" |
||
105 | #endif |
||
106 | #if defined( __LP64__ ) && \ |
||
107 | ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) |
||
108 | #undef FT_MACINTOSH |
||
109 | #endif |
||
110 | |||
111 | #elif defined( __SC__ ) || defined( __MRC__ ) |
||
112 | /* Classic MacOS compilers */ |
||
113 | #include "ConditionalMacros.h" |
||
114 | #if TARGET_OS_MAC |
||
115 | #define FT_MACINTOSH 1 |
||
116 | #endif |
||
117 | |||
118 | #endif |
||
119 | |||
120 | |||
121 | /*************************************************************************/ |
||
122 | /* */ |
||
123 | /* IntN types */ |
||
124 | /* */ |
||
125 | /* Used to guarantee the size of some specific integers. */ |
||
126 | /* */ |
||
127 | typedef signed short FT_Int16; |
||
128 | typedef unsigned short FT_UInt16; |
||
129 | |||
130 | #if FT_SIZEOF_INT == 4 |
||
131 | |||
132 | typedef signed int FT_Int32; |
||
133 | typedef unsigned int FT_UInt32; |
||
134 | |||
135 | #elif FT_SIZEOF_LONG == 4 |
||
136 | |||
137 | typedef signed long FT_Int32; |
||
138 | typedef unsigned long FT_UInt32; |
||
139 | |||
140 | #else |
||
141 | #error "no 32bit type found -- please check your configuration files" |
||
142 | #endif |
||
143 | |||
144 | /* look up an integer type that is at least 32 bits */ |
||
145 | #if FT_SIZEOF_INT >= 4 |
||
146 | |||
147 | typedef int FT_Fast; |
||
148 | typedef unsigned int FT_UFast; |
||
149 | |||
150 | #elif FT_SIZEOF_LONG >= 4 |
||
151 | |||
152 | typedef long FT_Fast; |
||
153 | typedef unsigned long FT_UFast; |
||
154 | |||
155 | #endif |
||
156 | |||
157 | |||
158 | /* determine whether we have a 64-bit int type for platforms without */ |
||
159 | /* Autoconf */ |
||
160 | #if FT_SIZEOF_LONG == 8 |
||
161 | |||
162 | /* FT_LONG64 must be defined if a 64-bit type is available */ |
||
163 | #define FT_LONG64 |
||
164 | #define FT_INT64 long |
||
165 | |||
166 | #elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ |
||
167 | |||
168 | /* this compiler provides the __int64 type */ |
||
169 | #define FT_LONG64 |
||
170 | #define FT_INT64 __int64 |
||
171 | |||
172 | #elif defined( __BORLANDC__ ) /* Borland C++ */ |
||
173 | |||
174 | /* XXXX: We should probably check the value of __BORLANDC__ in order */ |
||
175 | /* to test the compiler version. */ |
||
176 | |||
177 | /* this compiler provides the __int64 type */ |
||
178 | #define FT_LONG64 |
||
179 | #define FT_INT64 __int64 |
||
180 | |||
181 | #elif defined( __WATCOMC__ ) /* Watcom C++ */ |
||
182 | |||
183 | /* Watcom doesn't provide 64-bit data types */ |
||
184 | |||
185 | #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ |
||
186 | |||
187 | #define FT_LONG64 |
||
188 | #define FT_INT64 long long int |
||
189 | |||
190 | #elif defined( __GNUC__ ) |
||
191 | |||
192 | /* GCC provides the `long long' type */ |
||
193 | #define FT_LONG64 |
||
194 | #define FT_INT64 long long int |
||
195 | |||
196 | #endif /* FT_SIZEOF_LONG == 8 */ |
||
197 | |||
198 | |||
199 | #define FT_BEGIN_STMNT do { |
||
200 | #define FT_END_STMNT } while ( 0 ) |
||
201 | #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT |
||
202 | |||
203 | |||
204 | /*************************************************************************/ |
||
205 | /* */ |
||
206 | /* A 64-bit data type will create compilation problems if you compile */ |
||
207 | /* in strict ANSI mode. To avoid them, we disable their use if */ |
||
208 | /* __STDC__ is defined. You can however ignore this rule by */ |
||
209 | /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ |
||
210 | /* */ |
||
211 | #if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) |
||
212 | |||
213 | #ifdef __STDC__ |
||
214 | |||
215 | /* undefine the 64-bit macros in strict ANSI compilation mode */ |
||
216 | #undef FT_LONG64 |
||
217 | #undef FT_INT64 |
||
218 | |||
219 | #endif /* __STDC__ */ |
||
220 | |||
221 | #endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ |
||
222 | |||
223 | |||
224 | #ifdef FT_MAKE_OPTION_SINGLE_OBJECT |
||
225 | |||
226 | #define FT_LOCAL( x ) static x |
||
227 | #define FT_LOCAL_DEF( x ) static x |
||
228 | |||
229 | #else |
||
230 | |||
231 | #ifdef __cplusplus |
||
232 | #define FT_LOCAL( x ) extern "C" x |
||
233 | #define FT_LOCAL_DEF( x ) extern "C" x |
||
234 | #else |
||
235 | #define FT_LOCAL( x ) extern x |
||
236 | #define FT_LOCAL_DEF( x ) x |
||
237 | #endif |
||
238 | |||
239 | #endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ |
||
240 | |||
241 | |||
242 | #ifndef FT_BASE |
||
243 | |||
244 | #ifdef __cplusplus |
||
245 | #define FT_BASE( x ) extern "C" x |
||
246 | #else |
||
247 | #define FT_BASE( x ) extern x |
||
248 | #endif |
||
249 | |||
250 | #endif /* !FT_BASE */ |
||
251 | |||
252 | |||
253 | #ifndef FT_BASE_DEF |
||
254 | |||
255 | #ifdef __cplusplus |
||
256 | #define FT_BASE_DEF( x ) extern "C" x |
||
257 | #else |
||
258 | #define FT_BASE_DEF( x ) extern x |
||
259 | #endif |
||
260 | |||
261 | #endif /* !FT_BASE_DEF */ |
||
262 | |||
263 | |||
264 | #ifndef FT_EXPORT |
||
265 | |||
266 | #ifdef __cplusplus |
||
267 | #define FT_EXPORT( x ) extern "C" x |
||
268 | #else |
||
269 | #define FT_EXPORT( x ) extern x |
||
270 | #endif |
||
271 | |||
272 | #endif /* !FT_EXPORT */ |
||
273 | |||
274 | |||
275 | #ifndef FT_EXPORT_DEF |
||
276 | |||
277 | #ifdef __cplusplus |
||
278 | #define FT_EXPORT_DEF( x ) extern "C" x |
||
279 | #else |
||
280 | #define FT_EXPORT_DEF( x ) extern x |
||
281 | #endif |
||
282 | |||
283 | #endif /* !FT_EXPORT_DEF */ |
||
284 | |||
285 | |||
286 | #ifndef FT_EXPORT_VAR |
||
287 | |||
288 | #ifdef __cplusplus |
||
289 | #define FT_EXPORT_VAR( x ) extern "C" x |
||
290 | #else |
||
291 | #define FT_EXPORT_VAR( x ) extern x |
||
292 | #endif |
||
293 | |||
294 | #endif /* !FT_EXPORT_VAR */ |
||
295 | |||
296 | /* The following macros are needed to compile the library with a */ |
||
297 | /* C++ compiler and with 16bit compilers. */ |
||
298 | /* */ |
||
299 | |||
300 | /* This is special. Within C++, you must specify `extern "C"' for */ |
||
301 | /* functions which are used via function pointers, and you also */ |
||
302 | /* must do that for structures which contain function pointers to */ |
||
303 | /* assure C linkage -- it's not possible to have (local) anonymous */ |
||
304 | /* functions which are accessed by (global) function pointers. */ |
||
305 | /* */ |
||
306 | /* */ |
||
307 | /* FT_CALLBACK_DEF is used to _define_ a callback function. */ |
||
308 | /* */ |
||
309 | /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ |
||
310 | /* contains pointers to callback functions. */ |
||
311 | /* */ |
||
312 | /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */ |
||
313 | /* that contains pointers to callback functions. */ |
||
314 | /* */ |
||
315 | /* */ |
||
316 | /* Some 16bit compilers have to redefine these macros to insert */ |
||
317 | /* the infamous `_cdecl' or `__fastcall' declarations. */ |
||
318 | /* */ |
||
319 | #ifndef FT_CALLBACK_DEF |
||
320 | #ifdef __cplusplus |
||
321 | #define FT_CALLBACK_DEF( x ) extern "C" x |
||
322 | #else |
||
323 | #define FT_CALLBACK_DEF( x ) static x |
||
324 | #endif |
||
325 | #endif /* FT_CALLBACK_DEF */ |
||
326 | |||
327 | #ifndef FT_CALLBACK_TABLE |
||
328 | #ifdef __cplusplus |
||
329 | #define FT_CALLBACK_TABLE extern "C" |
||
330 | #define FT_CALLBACK_TABLE_DEF extern "C" |
||
331 | #else |
||
332 | #define FT_CALLBACK_TABLE extern |
||
333 | #define FT_CALLBACK_TABLE_DEF /* nothing */ |
||
334 | #endif |
||
335 | #endif /* FT_CALLBACK_TABLE */ |
||
336 | |||
337 | |||
338 | FT_END_HEADER |
||
339 | |||
340 | |||
341 | #endif /* __FTCONFIG_H__ */ |
||
342 | |||
343 | |||
344 | /* END */=> |