Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / freetype2 / src / builds / vms / ftconfig.h
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/<system>', and        */
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 <ft2build.h>
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/<system>' directory, and edit it to port the engine. */
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( DARWIN_NO_CARBON ) ) || \
99     ( defined( __MWERKS__ ) && defined( macintosh )        )
100   /* no Carbon frameworks for 64bit 10.4.x */
101   /* AvailabilityMacros.h is available since Mac OS X 10.2,        */
102   /* so guess the system version by maximum errno before inclusion */
103 #include <errno.h>
104 #ifdef ECANCELED /* defined since 10.2 */
105 #include "AvailabilityMacros.h"
106 #endif
107 #if defined( __LP64__ ) && \
108     ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
109 #define DARWIN_NO_CARBON 1
110 #else
111 #define FT_MACINTOSH 1
112 #endif
113
114 #elif defined( __SC__ ) || defined( __MRC__ )
115   /* Classic MacOS compilers */
116 #include "ConditionalMacros.h"
117 #if TARGET_OS_MAC
118 #define FT_MACINTOSH 1
119 #endif
120
121 #endif
122
123
124   /*************************************************************************/
125   /*                                                                       */
126   /* IntN types                                                            */
127   /*                                                                       */
128   /*   Used to guarantee the size of some specific integers.               */
129   /*                                                                       */
130   typedef signed short    FT_Int16;
131   typedef unsigned short  FT_UInt16;
132
133 #if FT_SIZEOF_INT == 4
134
135   typedef signed int      FT_Int32;
136   typedef unsigned int    FT_UInt32;
137
138 #elif FT_SIZEOF_LONG == 4
139
140   typedef signed long     FT_Int32;
141   typedef unsigned long   FT_UInt32;
142
143 #else
144 #error "no 32bit type found -- please check your configuration files"
145 #endif
146
147   /* look up an integer type that is at least 32 bits */
148 #if FT_SIZEOF_INT >= 4
149
150   typedef int            FT_Fast;
151   typedef unsigned int   FT_UFast;
152
153 #elif FT_SIZEOF_LONG >= 4
154
155   typedef long           FT_Fast;
156   typedef unsigned long  FT_UFast;
157
158 #endif
159
160
161   /* determine whether we have a 64-bit int type for platforms without */
162   /* Autoconf                                                          */
163 #if FT_SIZEOF_LONG == 8
164
165   /* FT_LONG64 must be defined if a 64-bit type is available */
166 #define FT_LONG64
167 #define FT_INT64  long
168
169 #elif defined( _MSC_VER ) && _MSC_VER >= 900  /* Visual C++ (and Intel C++) */
170
171   /* this compiler provides the __int64 type */
172 #define FT_LONG64
173 #define FT_INT64  __int64
174
175 #elif defined( __BORLANDC__ )  /* Borland C++ */
176
177   /* XXXX: We should probably check the value of __BORLANDC__ in order */
178   /*       to test the compiler version.                               */
179
180   /* this compiler provides the __int64 type */
181 #define FT_LONG64
182 #define FT_INT64  __int64
183
184 #elif defined( __WATCOMC__ )   /* Watcom C++ */
185
186   /* Watcom doesn't provide 64-bit data types */
187
188 #elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */
189
190 #define FT_LONG64
191 #define FT_INT64  long long int
192
193 #elif defined( __GNUC__ )
194
195   /* GCC provides the `long long' type */
196 #define FT_LONG64
197 #define FT_INT64  long long int
198
199 #endif /* FT_SIZEOF_LONG == 8 */
200
201
202 #define FT_BEGIN_STMNT  do {
203 #define FT_END_STMNT    } while ( 0 )
204 #define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
205
206
207   /*************************************************************************/
208   /*                                                                       */
209   /* A 64-bit data type will create compilation problems if you compile    */
210   /* in strict ANSI mode.  To avoid them, we disable their use if          */
211   /* __STDC__ is defined.  You can however ignore this rule by             */
212   /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro.        */
213   /*                                                                       */
214 #if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
215
216 #ifdef __STDC__
217
218   /* undefine the 64-bit macros in strict ANSI compilation mode */
219 #undef FT_LONG64
220 #undef FT_INT64
221
222 #endif /* __STDC__ */
223
224 #endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
225
226
227 #ifdef FT_MAKE_OPTION_SINGLE_OBJECT
228
229 #define FT_LOCAL( x )      static  x
230 #define FT_LOCAL_DEF( x )  static  x
231
232 #else
233
234 #ifdef __cplusplus
235 #define FT_LOCAL( x )      extern "C"  x
236 #define FT_LOCAL_DEF( x )  extern "C"  x
237 #else
238 #define FT_LOCAL( x )      extern  x
239 #define FT_LOCAL_DEF( x )  x
240 #endif
241
242 #endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
243
244
245 #ifndef FT_BASE
246
247 #ifdef __cplusplus
248 #define FT_BASE( x )  extern "C"  x
249 #else
250 #define FT_BASE( x )  extern  x
251 #endif
252
253 #endif /* !FT_BASE */
254
255
256 #ifndef FT_BASE_DEF
257
258 #ifdef __cplusplus
259 #define FT_BASE_DEF( x )  extern "C"  x
260 #else
261 #define FT_BASE_DEF( x )  extern  x
262 #endif
263
264 #endif /* !FT_BASE_DEF */
265
266
267 #ifndef FT_EXPORT
268
269 #ifdef __cplusplus
270 #define FT_EXPORT( x )  extern "C"  x
271 #else
272 #define FT_EXPORT( x )  extern  x
273 #endif
274
275 #endif /* !FT_EXPORT */
276
277
278 #ifndef FT_EXPORT_DEF
279
280 #ifdef __cplusplus
281 #define FT_EXPORT_DEF( x )  extern "C"  x
282 #else
283 #define FT_EXPORT_DEF( x )  extern  x
284 #endif
285
286 #endif /* !FT_EXPORT_DEF */
287
288
289 #ifndef FT_EXPORT_VAR
290
291 #ifdef __cplusplus
292 #define FT_EXPORT_VAR( x )  extern "C"  x
293 #else
294 #define FT_EXPORT_VAR( x )  extern  x
295 #endif
296
297 #endif /* !FT_EXPORT_VAR */
298
299   /* The following macros are needed to compile the library with a   */
300   /* C++ compiler and with 16bit compilers.                          */
301   /*                                                                 */
302
303   /* This is special.  Within C++, you must specify `extern "C"' for */
304   /* functions which are used via function pointers, and you also    */
305   /* must do that for structures which contain function pointers to  */
306   /* assure C linkage -- it's not possible to have (local) anonymous */
307   /* functions which are accessed by (global) function pointers.     */
308   /*                                                                 */
309   /*                                                                 */
310   /* FT_CALLBACK_DEF is used to _define_ a callback function.        */
311   /*                                                                 */
312   /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
313   /* contains pointers to callback functions.                        */
314   /*                                                                 */
315   /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */
316   /* that contains pointers to callback functions.                   */
317   /*                                                                 */
318   /*                                                                 */
319   /* Some 16bit compilers have to redefine these macros to insert    */
320   /* the infamous `_cdecl' or `__fastcall' declarations.             */
321   /*                                                                 */
322 #ifndef FT_CALLBACK_DEF
323 #ifdef __cplusplus
324 #define FT_CALLBACK_DEF( x )  extern "C"  x
325 #else
326 #define FT_CALLBACK_DEF( x )  static  x
327 #endif
328 #endif /* FT_CALLBACK_DEF */
329
330 #ifndef FT_CALLBACK_TABLE
331 #ifdef __cplusplus
332 #define FT_CALLBACK_TABLE      extern "C"
333 #define FT_CALLBACK_TABLE_DEF  extern "C"
334 #else
335 #define FT_CALLBACK_TABLE      extern
336 #define FT_CALLBACK_TABLE_DEF  /* nothing */
337 #endif
338 #endif /* FT_CALLBACK_TABLE */
339
340
341 FT_END_HEADER
342
343
344 #endif /* __FTCONFIG_H__ */
345
346
347 /* END */