update for HEAD-2003050101
[reactos.git] / lib / freetype / builds / unix / ftconfig.in
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ftconfig.in                                                            */
4 /*                                                                         */
5 /*    UNIX-specific configuration file (specification only).               */
6 /*                                                                         */
7 /*  Copyright 1996-2000, 2002 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 #include <ft2build.h>
41 #include FT_CONFIG_OPTIONS_H
42 #include FT_CONFIG_STANDARD_LIBRARY_H
43
44
45 FT_BEGIN_HEADER
46
47
48   /*************************************************************************/
49   /*                                                                       */
50   /*               PLATFORM-SPECIFIC CONFIGURATION MACROS                  */
51   /*                                                                       */
52   /* These macros can be toggled to suit a specific system.  The current   */
53   /* ones are defaults used to compile FreeType in an ANSI C environment   */
54   /* (16bit compilers are also supported).  Copy this file to your own     */
55   /* `freetype/builds/<system>' directory, and edit it to port the engine. */
56   /*                                                                       */
57   /*************************************************************************/
58
59
60 #define HAVE_UNISTD_H  0
61 #define HAVE_FCNTL_H   0
62
63 #define SIZEOF_INT   2
64 #define SIZEOF_LONG  2
65
66 #define FT_SIZEOF_INT   SIZEOF_INT
67 #define FT_SIZEOF_LONG  SIZEOF_LONG
68
69
70   /* Preferred alignment of data */
71 #define FT_ALIGNMENT  8
72
73
74   /* FT_UNUSED is a macro used to indicate that a given parameter is not  */
75   /* used -- this is only used to get rid of unpleasant compiler warnings */
76 #ifndef FT_UNUSED
77 #define FT_UNUSED( arg )  ( (arg) = (arg) )
78 #endif
79
80
81   /*************************************************************************/
82   /*                                                                       */
83   /*                     AUTOMATIC CONFIGURATION MACROS                    */
84   /*                                                                       */
85   /* These macros are computed from the ones defined above.  Don't touch   */
86   /* their definition, unless you know precisely what you are doing.  No   */
87   /* porter should need to mess with them.                                 */
88   /*                                                                       */
89   /*************************************************************************/
90
91
92   /*************************************************************************/
93   /*                                                                       */
94   /* IntN types                                                            */
95   /*                                                                       */
96   /*   Used to guarantee the size of some specific integers.               */
97   /*                                                                       */
98   typedef signed short    FT_Int16;
99   typedef unsigned short  FT_UInt16;
100
101 #if FT_SIZEOF_INT == 4
102
103   typedef signed int      FT_Int32;
104   typedef unsigned int    FT_UInt32;
105
106 #elif FT_SIZEOF_LONG == 4
107
108   typedef signed long     FT_Int32;
109   typedef unsigned long   FT_UInt32;
110
111 #else
112 #error "no 32bit type found -- please check your configuration files"
113 #endif
114
115 #if FT_SIZEOF_LONG == 8
116
117   /* FT_LONG64 must be defined if a 64-bit type is available */
118 #define FT_LONG64
119 #define FT_INT64   long
120
121 #else
122
123   /*************************************************************************/
124   /*                                                                       */
125   /* Many compilers provide the non-ANSI `long long' 64-bit type.  You can */
126   /* activate it by defining the FTCALC_USE_LONG_LONG macro in             */
127   /* `ftoption.h'.                                                         */
128   /*                                                                       */
129   /* Note that this will produce many -ansi warnings during library        */
130   /* compilation, and that in many cases,  the generated code will be      */
131   /* neither smaller nor faster!                                           */
132   /*                                                                       */
133 #ifdef FTCALC_USE_LONG_LONG
134
135 #define FT_LONG64
136 #define FT_INT64   long long
137
138 #endif /* FTCALC_USE_LONG_LONG */
139 #endif /* FT_SIZEOF_LONG == 8 */
140
141
142 #ifdef FT_MAKE_OPTION_SINGLE_OBJECT
143
144 #define FT_LOCAL( x )      static  x
145 #define FT_LOCAL_DEF( x )  static  x
146
147 #else
148
149 #ifdef __cplusplus
150 #define FT_LOCAL( x )      extern "C"  x
151 #define FT_LOCAL_DEF( x )  extern "C"  x
152 #else
153 #define FT_LOCAL( x )      extern  x
154 #define FT_LOCAL_DEF( x )  extern  x
155 #endif
156
157 #endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
158
159
160 #ifndef FT_BASE
161
162 #ifdef __cplusplus
163 #define FT_BASE( x )  extern "C"  x
164 #else
165 #define FT_BASE( x )  extern  x
166 #endif
167
168 #endif /* !FT_BASE */
169
170
171 #ifndef FT_BASE_DEF
172
173 #ifdef __cplusplus
174 #define FT_BASE_DEF( x )  extern "C"  x
175 #else
176 #define FT_BASE_DEF( x )  extern  x
177 #endif
178
179 #endif /* !FT_BASE_DEF */
180
181
182 #ifndef FT_EXPORT
183
184 #ifdef __cplusplus
185 #define FT_EXPORT( x )  extern "C"  x
186 #else
187 #define FT_EXPORT( x )  extern  x
188 #endif
189
190 #endif /* !FT_EXPORT */
191
192
193 #ifndef FT_EXPORT_DEF
194
195 #ifdef __cplusplus
196 #define FT_EXPORT_DEF( x )  extern "C"  x
197 #else
198 #define FT_EXPORT_DEF( x )  extern  x
199 #endif
200
201 #endif /* !FT_EXPORT_DEF */
202
203
204 #ifndef FT_EXPORT_VAR
205
206 #ifdef __cplusplus
207 #define FT_EXPORT_VAR( x )  extern "C"  x
208 #else
209 #define FT_EXPORT_VAR( x )  extern  x
210 #endif
211
212 #endif /* !FT_EXPORT_VAR */
213
214   /* The following macros are needed to compile the library with a   */
215   /* C++ compiler and with 16bit compilers.                          */
216   /*                                                                 */
217
218   /* This is special.  Within C++, you must specify `extern "C"' for */
219   /* functions which are used via function pointers, and you also    */
220   /* must do that for structures which contain function pointers to  */
221   /* assure C linkage -- it's not possible to have (local) anonymous */
222   /* functions which are accessed by (global) function pointers.     */
223   /*                                                                 */
224   /*                                                                 */
225   /* FT_CALLBACK_DEF is used to _define_ a callback function.        */
226   /*                                                                 */
227   /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
228   /* contains pointers to callback functions.                        */
229   /*                                                                 */
230   /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */
231   /* that contains pointers to callback functions.                   */
232   /*                                                                 */
233   /*                                                                 */
234   /* Some 16bit compilers have to redefine these macros to insert    */
235   /* the infamous `_cdecl' or `__fastcall' declarations.             */
236   /*                                                                 */
237 #ifndef FT_CALLBACK_DEF
238 #ifdef __cplusplus
239 #define FT_CALLBACK_DEF( x )  extern "C"  x
240 #else
241 #define FT_CALLBACK_DEF( x )  static  x
242 #endif
243 #endif /* FT_CALLBACK_DEF */
244
245 #ifndef FT_CALLBACK_TABLE
246 #ifdef __cplusplus
247 #define FT_CALLBACK_TABLE      extern "C"
248 #define FT_CALLBACK_TABLE_DEF  extern "C"
249 #else
250 #define FT_CALLBACK_TABLE      extern
251 #define FT_CALLBACK_TABLE_DEF  /* nothing */
252 #endif
253 #endif /* FT_CALLBACK_TABLE */
254
255
256 FT_END_HEADER
257
258 #endif /* __FTCONFIG_H__ */
259
260
261 /* END */