1 /* zconf.h -- configuration of the zlib compression library
\r
2 * Copyright (C) 1995-2003 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 deflatePrime z_deflatePrime
\r
27 # define deflateParams z_deflateParams
\r
28 # define deflateBound z_deflateBound
\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 compress z_compress
\r
36 # define compress2 z_compress2
\r
37 # define compressBound z_compressBound
\r
38 # define uncompress z_uncompress
\r
39 # define adler32 z_adler32
\r
40 # define crc32 z_crc32
\r
41 # define get_crc_table z_get_crc_table
\r
43 # define Byte z_Byte
\r
44 # define uInt z_uInt
\r
45 # define uLong z_uLong
\r
46 # define Bytef z_Bytef
\r
47 # define charf z_charf
\r
48 # define intf z_intf
\r
49 # define uIntf z_uIntf
\r
50 # define uLongf z_uLongf
\r
51 # define voidpf z_voidpf
\r
52 # define voidp z_voidp
\r
55 #if defined(__MSDOS__) && !defined(MSDOS)
\r
58 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
\r
61 #if defined(_WINDOWS) && !defined(WINDOWS)
\r
64 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
\r
67 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
\r
68 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
\r
76 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
\r
77 * than 64k bytes at a time (needed on systems with 16-bit int).
\r
83 # define UNALIGNED_OK
\r
86 #ifdef __STDC_VERSION__
\r
90 # if __STDC_VERSION__ >= 199901L
\r
96 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
\r
99 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
\r
102 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
\r
105 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
\r
109 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
\r
114 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
\r
115 # define const /* note: need a more gentle solution here */
\r
119 /* Some Mac compilers merge all .h files incorrectly: */
\r
120 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
\r
121 # define NO_DUMMY_DECL
\r
124 /* Maximum value for memLevel in deflateInit2 */
\r
125 #ifndef MAX_MEM_LEVEL
\r
127 # define MAX_MEM_LEVEL 8
\r
129 # define MAX_MEM_LEVEL 9
\r
133 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
\r
134 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
\r
135 * created by gzip. (Files created by minigzip can still be extracted by
\r
139 # define MAX_WBITS 15 /* 32K LZ77 window */
\r
142 /* The memory requirements for deflate are (in bytes):
\r
143 (1 << (windowBits+2)) + (1 << (memLevel+9))
\r
144 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
\r
145 plus a few kilobytes for small objects. For example, if you want to reduce
\r
146 the default memory requirements from 256K to 128K, compile with
\r
147 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
\r
148 Of course this will generally degrade compression (there's no free lunch).
\r
150 The memory requirements for inflate are (in bytes) 1 << windowBits
\r
151 that is, 32K for windowBits=15 (default value) plus a few kilobytes
\r
155 /* Type declarations */
\r
157 #ifndef OF /* function prototypes */
\r
159 # define OF(args) args
\r
161 # define OF(args) ()
\r
165 /* The following definitions for FAR are needed only for MSDOS mixed
\r
166 * model programming (small or medium model with some far allocations).
\r
167 * This was tried only with MSC; for other MSDOS compilers you may have
\r
168 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
\r
169 * just define FAR to be empty.
\r
172 # if defined(M_I86SM) || defined(M_I86MM)
\r
173 /* MSC small or medium model */
\r
174 # define SMALL_MEDIUM
\r
181 # if (defined(__SMALL__) || defined(__MEDIUM__))
\r
182 /* Turbo C small or medium model */
\r
183 # define SMALL_MEDIUM
\r
184 # ifdef __BORLANDC__
\r
192 #if defined(WINDOWS) || defined(WIN32)
\r
193 /* If building or using zlib as a DLL, define ZLIB_DLL.
\r
194 * This is not mandatory, but it offers a little performance increase.
\r
197 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
\r
198 # ifdef ZLIB_INTERNAL
\r
199 # define ZEXTERN extern __declspec(dllexport)
\r
201 # define ZEXTERN extern __declspec(dllimport)
\r
204 # endif /* ZLIB_DLL */
\r
205 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
\r
206 * define ZLIB_WINAPI.
\r
207 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
\r
209 # ifdef ZLIB_WINAPI
\r
213 # include <windows.h>
\r
214 /* No need for _export, use ZLIB.DEF instead. */
\r
215 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
\r
216 # define ZEXPORT WINAPI
\r
218 # define ZEXPORTVA WINAPIV
\r
220 # define ZEXPORTVA FAR CDECL
\r
225 #if defined (__BEOS__)
\r
227 # ifdef ZLIB_INTERNAL
\r
228 # define ZEXPORT __declspec(dllexport)
\r
229 # define ZEXPORTVA __declspec(dllexport)
\r
231 # define ZEXPORT __declspec(dllimport)
\r
232 # define ZEXPORTVA __declspec(dllimport)
\r
238 # define ZEXTERN extern
\r
251 #if !defined(__MACTYPES__)
\r
252 typedef unsigned char Byte; /* 8 bits */
\r
254 typedef unsigned int uInt; /* 16 bits or more */
\r
255 typedef unsigned long uLong; /* 32 bits or more */
\r
257 #ifdef SMALL_MEDIUM
\r
258 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
\r
259 # define Bytef Byte FAR
\r
261 typedef Byte FAR Bytef;
\r
263 typedef char FAR charf;
\r
264 typedef int FAR intf;
\r
265 typedef uInt FAR uIntf;
\r
266 typedef uLong FAR uLongf;
\r
269 typedef void const *voidpc;
\r
270 typedef void FAR *voidpf;
\r
271 typedef void *voidp;
\r
273 typedef Byte const *voidpc;
\r
274 typedef Byte FAR *voidpf;
\r
275 typedef Byte *voidp;
\r
278 #if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
\r
279 # include <sys/types.h> /* for off_t */
\r
280 # include <unistd.h> /* for SEEK_* and off_t */
\r
282 # include <unixio.h> /* for off_t */
\r
284 # define z_off_t off_t
\r
287 # define SEEK_SET 0 /* Seek from beginning of file. */
\r
288 # define SEEK_CUR 1 /* Seek from current position. */
\r
289 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
\r
292 # define z_off_t long
\r
295 #if defined(__OS400__)
\r
296 #define NO_vsnprintf
\r
299 #if defined(__MVS__)
\r
300 # define NO_vsnprintf
\r
306 /* MVS linker does not support external names larger than 8 bytes */
\r
307 #if defined(__MVS__)
\r
308 # pragma map(deflateInit_,"DEIN")
\r
309 # pragma map(deflateInit2_,"DEIN2")
\r
310 # pragma map(deflateEnd,"DEEND")
\r
311 # pragma map(deflateBound,"DEBND")
\r
312 # pragma map(inflateInit_,"ININ")
\r
313 # pragma map(inflateInit2_,"ININ2")
\r
314 # pragma map(inflateEnd,"INEND")
\r
315 # pragma map(inflateSync,"INSY")
\r
316 # pragma map(inflateSetDictionary,"INSEDI")
\r
317 # pragma map(compressBound,"CMBND")
\r
318 # pragma map(inflate_table,"INTABL")
\r
319 # pragma map(inflate_fast,"INFA")
\r
320 # pragma map(inflate_copyright,"INCOPY")
\r
323 #endif /* ZCONF_H */
\r