:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / subsys / win32k / freetype / include / freetype / config / ftconfig.h
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ftconfig.h                                                             */
4 /*                                                                         */
5 /*    ANSI-specific configuration file (specification only).               */
6 /*                                                                         */
7 /*  Copyright 1996-2000 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   /* This ANSI version should stay in `include/freetype/config'.           */
35   /*                                                                       */
36   /*************************************************************************/
37
38
39 #ifndef FTCONFIG_H
40 #define FTCONFIG_H
41
42
43   /* Include the header file containing all developer build options */
44 #include <freetype/config/ftoption.h>
45
46
47   /*************************************************************************/
48   /*                                                                       */
49   /*               PLATFORM-SPECIFIC CONFIGURATION MACROS                  */
50   /*                                                                       */
51   /* These macros can be toggled to suit a specific system.  The current   */
52   /* ones are defaults used to compile FreeType in an ANSI C environment   */
53   /* (16bit compilers are also supported).  Copy this file to your own     */
54   /* `freetype/builds/<system>' directory, and edit it to port the engine. */
55   /*                                                                       */
56   /*************************************************************************/
57
58
59   /* We use <limits.h> values to know the sizes of the types.  */
60 #include <limits.h>
61
62   /* The number of bytes in an `int' type.  */
63 #if   UINT_MAX == 0xFFFFFFFF
64 #define FT_SIZEOF_INT  4
65 #elif UINT_MAX == 0xFFFF
66 #define FT_SIZEOF_INT  2
67 #elif UINT_MAX > 0xFFFFFFFF && UINT_MAX == 0xFFFFFFFFFFFFFFFF
68 #define FT_SIZEOF_INT  8
69 #else
70 #error "Unsupported number of bytes in `int' type!"
71 #endif
72
73   /* The number of bytes in a `long' type.  */
74 #if   ULONG_MAX == 0xFFFFFFFF
75 #define FT_SIZEOF_LONG  4
76 #elif ULONG_MAX > 0xFFFFFFFF && ULONG_MAX == 0xFFFFFFFFFFFFFFFF
77 #define FT_SIZEOF_LONG  8
78 #else
79 #error "Unsupported number of bytes in `long' type!"
80 #endif
81
82
83   /* Preferred alignment of data */
84 #define FT_ALIGNMENT  8
85
86
87   /* UNUSED is a macro used to indicate that a given parameter is not used */
88   /* -- this is only used to get rid of unpleasant compiler warnings       */
89 #ifndef FT_UNUSED
90 #define FT_UNUSED( arg )  ( (arg) = (arg) )
91 #endif
92
93
94   /*************************************************************************/
95   /*                                                                       */
96   /*                     AUTOMATIC CONFIGURATION MACROS                    */
97   /*                                                                       */
98   /* These macros are computed from the ones defined above.  Don't touch   */
99   /* their definition, unless you know precisely what you are doing.  No   */
100   /* porter should need to mess with them.                                 */
101   /*                                                                       */
102   /*************************************************************************/
103
104
105   /*************************************************************************/
106   /*                                                                       */
107   /* IntN types                                                            */
108   /*                                                                       */
109   /*   Used to guarantee the size of some specific integers.               */
110   /*                                                                       */
111   typedef signed short    FT_Int16;
112   typedef unsigned short  FT_UInt16;
113
114 #if FT_SIZEOF_INT == 4
115
116   typedef signed int      FT_Int32;
117   typedef unsigned int    FT_UInt32;
118
119 #elif FT_SIZEOF_LONG == 4
120
121   typedef signed long     FT_Int32;
122   typedef unsigned long   FT_UInt32;
123
124 #else
125 #error "no 32bit type found -- please check your configuration files"
126 #endif
127
128 #if FT_SIZEOF_LONG == 8
129
130   /* FT_LONG64 must be defined if a 64-bit type is available */
131 #define FT_LONG64
132 #define FT_INT64   long
133
134 #else
135
136
137   /*************************************************************************/
138   /*                                                                       */
139   /* Many compilers provide the non-ANSI `long long' 64-bit type.  You can */
140   /* activate it by defining the FTCALC_USE_LONG_LONG macro in             */
141   /* `ftoption.h'.                                                         */
142   /*                                                                       */
143   /* Note that this will produce many -ansi warnings during library        */
144   /* compilation, and that in many cases,  the generated code will be      */
145   /* neither smaller nor faster!                                           */
146   /*                                                                       */
147 #ifdef FTCALC_USE_LONG_LONG
148
149 #define FT_LONG64
150 #define FT_INT64   long long
151
152 #endif /* FTCALC_USE_LONG_LONG */
153 #endif /* FT_SIZEOF_LONG == 8 */
154
155
156 #ifdef FT_MAKE_OPTION_SINGLE_OBJECT
157 #define  LOCAL_DEF   static
158 #define  LOCAL_FUNC  static
159 #else
160 #define  LOCAL_DEF   extern
161 #define  LOCAL_FUNC  /* nothing */
162 #endif
163
164 #ifdef FT_MAKE_OPTION_SINGLE_LIBRARY_OBJECT
165 #define  BASE_DEF( x )   static  x
166 #define  BASE_FUNC( x )  static  x
167 #else
168 #define  BASE_DEF( x )   extern  x
169 #define  BASE_FUNC( x )  extern  x
170 #endif
171
172 #ifndef  FT_EXPORT_DEF
173 #define  FT_EXPORT_DEF( x )   extern  x
174 #endif
175
176 #ifndef  FT_EXPORT_FUNC
177 #define  FT_EXPORT_FUNC( x )  extern  x
178 #endif
179
180 #ifndef  FT_EXPORT_VAR
181 #define  FT_EXPORT_VAR( x )   extern  x
182 #endif
183
184 #endif /* FTCONFIG_H */
185
186
187 /* END */