]>
git.saurik.com Git - wxWidgets.git/blob - src/zlib/zconf.h
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
11 * If you *really* need a unique prefix for all types and library functions,
12 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
15 # define deflateInit_ z_deflateInit_
16 # define deflate z_deflate
17 # define deflateEnd z_deflateEnd
18 # define inflateInit_ z_inflateInit_
19 # define inflate z_inflate
20 # define inflateEnd z_inflateEnd
21 # define deflateInit2_ z_deflateInit2_
22 # define deflateSetDictionary z_deflateSetDictionary
23 # define deflateCopy z_deflateCopy
24 # define deflateReset z_deflateReset
25 # define deflateParams z_deflateParams
26 # define deflateBound z_deflateBound
27 # define deflatePrime z_deflatePrime
28 # define inflateInit2_ z_inflateInit2_
29 # define inflateSetDictionary z_inflateSetDictionary
30 # define inflateSync z_inflateSync
31 # define inflateSyncPoint z_inflateSyncPoint
32 # define inflateCopy z_inflateCopy
33 # define inflateReset z_inflateReset
34 # define inflateBack z_inflateBack
35 # define inflateBackEnd z_inflateBackEnd
36 # define compress z_compress
37 # define compress2 z_compress2
38 # define compressBound z_compressBound
39 # define uncompress z_uncompress
40 # define adler32 z_adler32
41 # define crc32 z_crc32
42 # define get_crc_table z_get_crc_table
43 # define zError z_zError
45 # define alloc_func z_alloc_func
46 # define free_func z_free_func
47 # define in_func z_in_func
48 # define out_func z_out_func
51 # define uLong z_uLong
52 # define Bytef z_Bytef
53 # define charf z_charf
55 # define uIntf z_uIntf
56 # define uLongf z_uLongf
57 # define voidpf z_voidpf
58 # define voidp z_voidp
61 #if defined(__MSDOS__) && !defined(MSDOS)
64 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
67 #if defined(_WINDOWS) && !defined(WINDOWS)
70 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
75 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
76 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
84 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
85 * than 64k bytes at a time (needed on systems with 16-bit int).
94 #ifdef __STDC_VERSION__
98 # if __STDC_VERSION__ >= 199901L
104 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
107 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
110 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
113 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
117 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
122 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
123 # define const /* note: need a more gentle solution here */
127 /* Some Mac compilers merge all .h files incorrectly: */
128 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
129 # define NO_DUMMY_DECL
132 /* Maximum value for memLevel in deflateInit2 */
133 #ifndef MAX_MEM_LEVEL
135 # define MAX_MEM_LEVEL 8
137 # define MAX_MEM_LEVEL 9
141 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
142 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
143 * created by gzip. (Files created by minigzip can still be extracted by
147 # define MAX_WBITS 15 /* 32K LZ77 window */
150 /* The memory requirements for deflate are (in bytes):
151 (1 << (windowBits+2)) + (1 << (memLevel+9))
152 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
153 plus a few kilobytes for small objects. For example, if you want to reduce
154 the default memory requirements from 256K to 128K, compile with
155 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
156 Of course this will generally degrade compression (there's no free lunch).
158 The memory requirements for inflate are (in bytes) 1 << windowBits
159 that is, 32K for windowBits=15 (default value) plus a few kilobytes
163 /* Type declarations */
165 #ifndef OF /* function prototypes */
167 # define OF(args) args
173 /* The following definitions for FAR are needed only for MSDOS mixed
174 * model programming (small or medium model with some far allocations).
175 * This was tested only with MSC; for other MSDOS compilers you may have
176 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
177 * just define FAR to be empty.
180 # if defined(M_I86SM) || defined(M_I86MM)
181 /* MSC small or medium model */
182 # define SMALL_MEDIUM
189 # if (defined(__SMALL__) || defined(__MEDIUM__))
190 /* Turbo C small or medium model */
191 # define SMALL_MEDIUM
200 #if defined(WINDOWS) || defined(WIN32)
201 /* If building or using zlib as a DLL, define ZLIB_DLL.
202 * This is not mandatory, but it offers a little performance increase.
205 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
206 # ifdef ZLIB_INTERNAL
207 # define ZEXTERN extern __declspec(dllexport)
209 # define ZEXTERN extern __declspec(dllimport)
212 # endif /* ZLIB_DLL */
213 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
214 * define ZLIB_WINAPI.
215 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
221 # include <windows.h>
222 /* No need for _export, use ZLIB.DEF instead. */
223 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
224 # define ZEXPORT WINAPI
226 # define ZEXPORTVA WINAPIV
228 # define ZEXPORTVA FAR CDECL
233 #if defined (__BEOS__)
235 # ifdef ZLIB_INTERNAL
236 # define ZEXPORT __declspec(dllexport)
237 # define ZEXPORTVA __declspec(dllexport)
239 # define ZEXPORT __declspec(dllimport)
240 # define ZEXPORTVA __declspec(dllimport)
246 # define ZEXTERN extern
259 #if !defined(__MACTYPES__)
260 typedef unsigned char Byte
; /* 8 bits */
262 typedef unsigned int uInt
; /* 16 bits or more */
263 typedef unsigned long uLong
; /* 32 bits or more */
266 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
267 # define Bytef Byte FAR
269 typedef Byte FAR Bytef
;
271 typedef char FAR charf
;
272 typedef int FAR intf
;
273 typedef uInt FAR uIntf
;
274 typedef uLong FAR uLongf
;
277 typedef void const *voidpc
;
278 typedef void FAR
*voidpf
;
281 typedef Byte
const *voidpc
;
282 typedef Byte FAR
*voidpf
;
286 #if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
287 # include <sys/types.h> /* for off_t */
288 # include <unistd.h> /* for SEEK_* and off_t */
290 # include <unixio.h> /* for off_t */
292 # define z_off_t off_t
295 # define SEEK_SET 0 /* Seek from beginning of file. */
296 # define SEEK_CUR 1 /* Seek from current position. */
297 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
300 # define z_off_t long
303 #if defined(__OS400__)
304 # define NO_vsnprintf
308 # define NO_vsnprintf
314 /* MVS linker does not support external names larger than 8 bytes */
316 # pragma map(deflateInit_,"DEIN")
317 # pragma map(deflateInit2_,"DEIN2")
318 # pragma map(deflateEnd,"DEEND")
319 # pragma map(deflateBound,"DEBND")
320 # pragma map(inflateInit_,"ININ")
321 # pragma map(inflateInit2_,"ININ2")
322 # pragma map(inflateEnd,"INEND")
323 # pragma map(inflateSync,"INSY")
324 # pragma map(inflateSetDictionary,"INSEDI")
325 # pragma map(compressBound,"CMBND")
326 # pragma map(inflate_table,"INTABL")
327 # pragma map(inflate_fast,"INFA")
328 # pragma map(inflate_copyright,"INCOPY")