fix vector drawing issue.
[xy_vsfilter.git] / src / zlib / zconf.h
blob4e25dfe6ec6fa2d25fc832578b1e850e953c178a
1 /* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995-2005 Jean-loup Gailly.
3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */
6 /* @(#) $Id: zconf.h 147 2004-01-04 23:55:18Z gabest $ */
8 #ifndef ZCONF_H
9 #define ZCONF_H
13 * If you *really* need a unique prefix for all types and library functions,
14 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
16 #ifdef Z_PREFIX
17 # define deflateInit_ z_deflateInit_
18 # define deflate z_deflate
19 # define deflateEnd z_deflateEnd
20 # define inflateInit_ z_inflateInit_
21 # define inflate z_inflate
22 # define inflateEnd z_inflateEnd
23 # define deflateInit2_ z_deflateInit2_
24 # define deflateSetDictionary z_deflateSetDictionary
25 # define deflateCopy z_deflateCopy
26 # define deflateReset z_deflateReset
27 # define deflateParams z_deflateParams
28 # define deflateBound z_deflateBound
29 # define deflatePrime z_deflatePrime
30 # define inflateInit2_ z_inflateInit2_
31 # define inflateSetDictionary z_inflateSetDictionary
32 # define inflateSync z_inflateSync
33 # define inflateSyncPoint z_inflateSyncPoint
34 # define inflateCopy z_inflateCopy
35 # define inflateReset z_inflateReset
36 # define inflateBack z_inflateBack
37 # define inflateBackEnd z_inflateBackEnd
38 # define compress z_compress
39 # define compress2 z_compress2
40 # define compressBound z_compressBound
41 # define uncompress z_uncompress
42 # define adler32 z_adler32
43 # define crc32 z_crc32
44 # define get_crc_table z_get_crc_table
45 # define zError z_zError
47 # define alloc_func z_alloc_func
48 # define free_func z_free_func
49 # define in_func z_in_func
50 # define out_func z_out_func
51 # define Byte z_Byte
52 # define uInt z_uInt
53 # define uLong z_uLong
54 # define Bytef z_Bytef
55 # define charf z_charf
56 # define intf z_intf
57 # define uIntf z_uIntf
58 # define uLongf z_uLongf
59 # define voidpf z_voidpf
60 # define voidp z_voidp
61 #endif
63 #if defined(__MSDOS__) && !defined(MSDOS)
64 # define MSDOS
65 #endif
66 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
67 # define OS2
68 #endif
69 #if defined(_WINDOWS) && !defined(WINDOWS)
70 # define WINDOWS
71 #endif
72 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
73 # ifndef WIN32
74 # define WIN32
75 # endif
76 #endif
77 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
78 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
79 # ifndef SYS16BIT
80 # define SYS16BIT
81 # endif
82 # endif
83 #endif
86 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
87 * than 64k bytes at a time (needed on systems with 16-bit int).
89 #ifdef SYS16BIT
90 # define MAXSEG_64K
91 #endif
92 #ifdef MSDOS
93 # define UNALIGNED_OK
94 #endif
96 #ifdef __STDC_VERSION__
97 # ifndef STDC
98 # define STDC
99 # endif
100 # if __STDC_VERSION__ >= 199901L
101 # ifndef STDC99
102 # define STDC99
103 # endif
104 # endif
105 #endif
106 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
107 # define STDC
108 #endif
109 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
110 # define STDC
111 #endif
112 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
113 # define STDC
114 #endif
115 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
116 # define STDC
117 #endif
119 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
120 # define STDC
121 #endif
123 #ifndef STDC
124 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
125 # define const /* note: need a more gentle solution here */
126 # endif
127 #endif
129 /* Some Mac compilers merge all .h files incorrectly: */
130 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
131 # define NO_DUMMY_DECL
132 #endif
134 /* Maximum value for memLevel in deflateInit2 */
135 #ifndef MAX_MEM_LEVEL
136 # ifdef MAXSEG_64K
137 # define MAX_MEM_LEVEL 8
138 # else
139 # define MAX_MEM_LEVEL 9
140 # endif
141 #endif
143 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
144 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
145 * created by gzip. (Files created by minigzip can still be extracted by
146 * gzip.)
148 #ifndef MAX_WBITS
149 # define MAX_WBITS 15 /* 32K LZ77 window */
150 #endif
152 /* The memory requirements for deflate are (in bytes):
153 (1 << (windowBits+2)) + (1 << (memLevel+9))
154 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
155 plus a few kilobytes for small objects. For example, if you want to reduce
156 the default memory requirements from 256K to 128K, compile with
157 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
158 Of course this will generally degrade compression (there's no free lunch).
160 The memory requirements for inflate are (in bytes) 1 << windowBits
161 that is, 32K for windowBits=15 (default value) plus a few kilobytes
162 for small objects.
165 /* Type declarations */
167 #ifndef OF /* function prototypes */
168 # ifdef STDC
169 # define OF(args) args
170 # else
171 # define OF(args) ()
172 # endif
173 #endif
175 /* The following definitions for FAR are needed only for MSDOS mixed
176 * model programming (small or medium model with some far allocations).
177 * This was tested only with MSC; for other MSDOS compilers you may have
178 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
179 * just define FAR to be empty.
181 #ifdef SYS16BIT
182 # if defined(M_I86SM) || defined(M_I86MM)
183 /* MSC small or medium model */
184 # define SMALL_MEDIUM
185 # ifdef _MSC_VER
186 # define FAR _far
187 # else
188 # define FAR far
189 # endif
190 # endif
191 # if (defined(__SMALL__) || defined(__MEDIUM__))
192 /* Turbo C small or medium model */
193 # define SMALL_MEDIUM
194 # ifdef __BORLANDC__
195 # define FAR _far
196 # else
197 # define FAR far
198 # endif
199 # endif
200 #endif
202 #if defined(WINDOWS) || defined(WIN32)
203 /* If building or using zlib as a DLL, define ZLIB_DLL.
204 * This is not mandatory, but it offers a little performance increase.
206 # ifdef ZLIB_DLL
207 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
208 # ifdef ZLIB_INTERNAL
209 # define ZEXTERN extern __declspec(dllexport)
210 # else
211 # define ZEXTERN extern __declspec(dllimport)
212 # endif
213 # endif
214 # endif /* ZLIB_DLL */
215 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
216 * define ZLIB_WINAPI.
217 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
219 # ifdef ZLIB_WINAPI
220 # ifdef FAR
221 # undef FAR
222 # endif
223 # include <windows.h>
224 /* No need for _export, use ZLIB.DEF instead. */
225 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
226 # define ZEXPORT WINAPI
227 # ifdef WIN32
228 # define ZEXPORTVA WINAPIV
229 # else
230 # define ZEXPORTVA FAR CDECL
231 # endif
232 # endif
233 #endif
235 #if defined (__BEOS__)
236 # ifdef ZLIB_DLL
237 # ifdef ZLIB_INTERNAL
238 # define ZEXPORT __declspec(dllexport)
239 # define ZEXPORTVA __declspec(dllexport)
240 # else
241 # define ZEXPORT __declspec(dllimport)
242 # define ZEXPORTVA __declspec(dllimport)
243 # endif
244 # endif
245 #endif
247 #ifndef ZEXTERN
248 # define ZEXTERN extern
249 #endif
250 #ifndef ZEXPORT
251 # define ZEXPORT
252 #endif
253 #ifndef ZEXPORTVA
254 # define ZEXPORTVA
255 #endif
257 #ifndef FAR
258 # define FAR
259 #endif
261 #if !defined(__MACTYPES__)
262 typedef unsigned char Byte; /* 8 bits */
263 #endif
264 typedef unsigned int uInt; /* 16 bits or more */
265 typedef unsigned long uLong; /* 32 bits or more */
267 #ifdef SMALL_MEDIUM
268 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
269 # define Bytef Byte FAR
270 #else
271 typedef Byte FAR Bytef;
272 #endif
273 typedef char FAR charf;
274 typedef int FAR intf;
275 typedef uInt FAR uIntf;
276 typedef uLong FAR uLongf;
278 #ifdef STDC
279 typedef void const *voidpc;
280 typedef void FAR *voidpf;
281 typedef void *voidp;
282 #else
283 typedef Byte const *voidpc;
284 typedef Byte FAR *voidpf;
285 typedef Byte *voidp;
286 #endif
288 #if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
289 # include <sys/types.h> /* for off_t */
290 # include <unistd.h> /* for SEEK_* and off_t */
291 # ifdef VMS
292 # include <unixio.h> /* for off_t */
293 # endif
294 # define z_off_t off_t
295 #endif
296 #ifndef SEEK_SET
297 # define SEEK_SET 0 /* Seek from beginning of file. */
298 # define SEEK_CUR 1 /* Seek from current position. */
299 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
300 #endif
301 #ifndef z_off_t
302 # define z_off_t long
303 #endif
305 #if defined(__OS400__)
306 # define NO_vsnprintf
307 #endif
309 #if defined(__MVS__)
310 # define NO_vsnprintf
311 # ifdef FAR
312 # undef FAR
313 # endif
314 #endif
316 /* MVS linker does not support external names larger than 8 bytes */
317 #if defined(__MVS__)
318 # pragma map(deflateInit_,"DEIN")
319 # pragma map(deflateInit2_,"DEIN2")
320 # pragma map(deflateEnd,"DEEND")
321 # pragma map(deflateBound,"DEBND")
322 # pragma map(inflateInit_,"ININ")
323 # pragma map(inflateInit2_,"ININ2")
324 # pragma map(inflateEnd,"INEND")
325 # pragma map(inflateSync,"INSY")
326 # pragma map(inflateSetDictionary,"INSEDI")
327 # pragma map(compressBound,"CMBND")
328 # pragma map(inflate_table,"INTABL")
329 # pragma map(inflate_fast,"INFA")
330 # pragma map(inflate_copyright,"INCOPY")
331 #endif
333 #endif /* ZCONF_H */