1 /* zconf.h -- configuration of the zlib compression library
\r
2 * Copyright (C) 1995-2005 Jean-loup Gailly.
\r
3 * For conditions of distribution and use, see copyright notice in zlib.h
\r
12 * If you *really* need a unique prefix for all types and library functions,
\r
13 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
\r
16 # define deflateInit_ z_deflateInit_
\r
17 # define deflate z_deflate
\r
18 # define deflateEnd z_deflateEnd
\r
19 # define inflateInit_ z_inflateInit_
\r
20 # define inflate z_inflate
\r
21 # define inflateEnd z_inflateEnd
\r
22 # define deflateInit2_ z_deflateInit2_
\r
23 # define deflateSetDictionary z_deflateSetDictionary
\r
24 # define deflateCopy z_deflateCopy
\r
25 # define deflateReset z_deflateReset
\r
26 # define deflateParams z_deflateParams
\r
27 # define deflateBound z_deflateBound
\r
28 # define deflatePrime z_deflatePrime
\r
29 # define inflateInit2_ z_inflateInit2_
\r
30 # define inflateSetDictionary z_inflateSetDictionary
\r
31 # define inflateSync z_inflateSync
\r
32 # define inflateSyncPoint z_inflateSyncPoint
\r
33 # define inflateCopy z_inflateCopy
\r
34 # define inflateReset z_inflateReset
\r
35 # define inflateBack z_inflateBack
\r
36 # define inflateBackEnd z_inflateBackEnd
\r
37 # define compress z_compress
\r
38 # define compress2 z_compress2
\r
39 # define compressBound z_compressBound
\r
40 # define uncompress z_uncompress
\r
41 # define adler32 z_adler32
\r
42 # define crc32 z_crc32
\r
43 # define get_crc_table z_get_crc_table
\r
44 # define zError z_zError
\r
46 # define alloc_func z_alloc_func
\r
47 # define free_func z_free_func
\r
48 # define in_func z_in_func
\r
49 # define out_func z_out_func
\r
50 # define Byte z_Byte
\r
51 # define uInt z_uInt
\r
52 # define uLong z_uLong
\r
53 # define Bytef z_Bytef
\r
54 # define charf z_charf
\r
55 # define intf z_intf
\r
56 # define uIntf z_uIntf
\r
57 # define uLongf z_uLongf
\r
58 # define voidpf z_voidpf
\r
59 # define voidp z_voidp
\r
62 #if defined(__MSDOS__) && !defined(MSDOS)
\r
65 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
\r
68 #if defined(_WINDOWS) && !defined(WINDOWS)
\r
71 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
\r
76 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
\r
77 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
\r
85 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
\r
86 * than 64k bytes at a time (needed on systems with 16-bit int).
\r
92 # define UNALIGNED_OK
\r
95 #ifdef __STDC_VERSION__
\r
99 # if __STDC_VERSION__ >= 199901L
\r
105 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
\r
108 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
\r
111 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
\r
114 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
\r
118 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
\r
123 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
\r
124 # define const /* note: need a more gentle solution here */
\r
128 /* Some Mac compilers merge all .h files incorrectly: */
\r
129 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
\r
130 # define NO_DUMMY_DECL
\r
133 /* Maximum value for memLevel in deflateInit2 */
\r
134 #ifndef MAX_MEM_LEVEL
\r
136 # define MAX_MEM_LEVEL 8
\r
138 # define MAX_MEM_LEVEL 9
\r
142 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
\r
143 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
\r
144 * created by gzip. (Files created by minigzip can still be extracted by
\r
148 # define MAX_WBITS 15 /* 32K LZ77 window */
\r
151 /* The memory requirements for deflate are (in bytes):
\r
152 (1 << (windowBits+2)) + (1 << (memLevel+9))
\r
153 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
\r
154 plus a few kilobytes for small objects. For example, if you want to reduce
\r
155 the default memory requirements from 256K to 128K, compile with
\r
156 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
\r
157 Of course this will generally degrade compression (there's no free lunch).
\r
159 The memory requirements for inflate are (in bytes) 1 << windowBits
\r
160 that is, 32K for windowBits=15 (default value) plus a few kilobytes
\r
164 /* Type declarations */
\r
166 #ifndef OF /* function prototypes */
\r
168 # define OF(args) args
\r
170 # define OF(args) ()
\r
174 /* The following definitions for FAR are needed only for MSDOS mixed
\r
175 * model programming (small or medium model with some far allocations).
\r
176 * This was tested only with MSC; for other MSDOS compilers you may have
\r
177 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
\r
178 * just define FAR to be empty.
\r
181 # if defined(M_I86SM) || defined(M_I86MM)
\r
182 /* MSC small or medium model */
\r
183 # define SMALL_MEDIUM
\r
190 # if (defined(__SMALL__) || defined(__MEDIUM__))
\r
191 /* Turbo C small or medium model */
\r
192 # define SMALL_MEDIUM
\r
193 # ifdef __BORLANDC__
\r
201 #if defined(WINDOWS) || defined(WIN32)
\r
202 /* If building or using zlib as a DLL, define ZLIB_DLL.
\r
203 * This is not mandatory, but it offers a little performance increase.
\r
206 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
\r
207 # ifdef ZLIB_INTERNAL
\r
208 # define ZEXTERN extern __declspec(dllexport)
\r
210 # define ZEXTERN extern __declspec(dllimport)
\r
213 # endif /* ZLIB_DLL */
\r
214 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
\r
215 * define ZLIB_WINAPI.
\r
216 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
\r
218 # ifdef ZLIB_WINAPI
\r
222 # include <windows.h>
\r
223 /* No need for _export, use ZLIB.DEF instead. */
\r
224 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
\r
225 # define ZEXPORT WINAPI
\r
227 # define ZEXPORTVA WINAPIV
\r
229 # define ZEXPORTVA FAR CDECL
\r
234 #if defined (__BEOS__)
\r
236 # ifdef ZLIB_INTERNAL
\r
237 # define ZEXPORT __declspec(dllexport)
\r
238 # define ZEXPORTVA __declspec(dllexport)
\r
240 # define ZEXPORT __declspec(dllimport)
\r
241 # define ZEXPORTVA __declspec(dllimport)
\r
247 # define ZEXTERN extern
\r
260 #if !defined(__MACTYPES__)
\r
261 typedef unsigned char Byte; /* 8 bits */
\r
263 typedef unsigned int uInt; /* 16 bits or more */
\r
264 typedef unsigned long uLong; /* 32 bits or more */
\r
266 #ifdef SMALL_MEDIUM
\r
267 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
\r
268 # define Bytef Byte FAR
\r
270 typedef Byte FAR Bytef;
\r
272 typedef char FAR charf;
\r
273 typedef int FAR intf;
\r
274 typedef uInt FAR uIntf;
\r
275 typedef uLong FAR uLongf;
\r
278 typedef void const *voidpc;
\r
279 typedef void FAR *voidpf;
\r
280 typedef void *voidp;
\r
282 typedef Byte const *voidpc;
\r
283 typedef Byte FAR *voidpf;
\r
284 typedef Byte *voidp;
\r
287 #if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
\r
288 # include <sys/types.h> /* for off_t */
\r
289 # include <unistd.h> /* for SEEK_* and off_t */
\r
291 # include <unixio.h> /* for off_t */
\r
293 # define z_off_t off_t
\r
296 # define SEEK_SET 0 /* Seek from beginning of file. */
\r
297 # define SEEK_CUR 1 /* Seek from current position. */
\r
298 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
\r
301 # define z_off_t long
\r
304 #if defined(__OS400__)
\r
305 # define NO_vsnprintf
\r
308 #if defined(__MVS__)
\r
309 # define NO_vsnprintf
\r
315 /* MVS linker does not support external names larger than 8 bytes */
\r
316 #if defined(__MVS__)
\r
317 # pragma map(deflateInit_,"DEIN")
\r
318 # pragma map(deflateInit2_,"DEIN2")
\r
319 # pragma map(deflateEnd,"DEEND")
\r
320 # pragma map(deflateBound,"DEBND")
\r
321 # pragma map(inflateInit_,"ININ")
\r
322 # pragma map(inflateInit2_,"ININ2")
\r
323 # pragma map(inflateEnd,"INEND")
\r
324 # pragma map(inflateSync,"INSY")
\r
325 # pragma map(inflateSetDictionary,"INSEDI")
\r
326 # pragma map(compressBound,"CMBND")
\r
327 # pragma map(inflate_table,"INTABL")
\r
328 # pragma map(inflate_fast,"INFA")
\r
329 # pragma map(inflate_copyright,"INCOPY")
\r
332 #endif /* ZCONF_H */
\r