1 /* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995-2002 Jean-loup Gailly.
3 * For conditions of distribution and use, see copyright notice in zlib.h
12 * If you *really* need a unique prefix for all types and library functions,
13 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
16 # define deflateInit_ z_deflateInit_
17 # define deflate z_deflate
18 # define deflateEnd z_deflateEnd
19 # define inflateInit_ z_inflateInit_
20 # define inflate z_inflate
21 # define inflateEnd z_inflateEnd
22 # define deflateInit2_ z_deflateInit2_
23 # define deflateSetDictionary z_deflateSetDictionary
24 # define deflateCopy z_deflateCopy
25 # define deflateReset z_deflateReset
26 # define deflateParams z_deflateParams
27 # define inflateInit2_ z_inflateInit2_
28 # define inflateSetDictionary z_inflateSetDictionary
29 # define inflateSync z_inflateSync
30 # define inflateSyncPoint z_inflateSyncPoint
31 # define inflateReset z_inflateReset
32 # define compress z_compress
33 # define compress2 z_compress2
34 # define uncompress z_uncompress
35 # define adler32 z_adler32
36 # define crc32 z_crc32
37 # define get_crc_table z_get_crc_table
41 # define uLong z_uLong
42 # define Bytef z_Bytef
43 # define charf z_charf
45 # define uIntf z_uIntf
46 # define uLongf z_uLongf
47 # define voidpf z_voidpf
48 # define voidp z_voidp
51 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
54 #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
59 #if defined(__MSDOS__) && !defined(MSDOS)
63 /* WinCE doesn't have errno.h */
70 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
71 * than 64k bytes at a time (needed on systems with 16-bit int).
73 #if defined(MSDOS) && !defined(__32BIT__)
80 #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
83 #if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
90 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
95 /* Some Mac compilers merge all .h files incorrectly: */
96 #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
97 # define NO_DUMMY_DECL
100 /* Old Borland C and LCC incorrectly complains about missing returns: */
101 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
102 # define NEED_DUMMY_RETURN
106 # define NEED_DUMMY_RETURN
109 /* Maximum value for memLevel in deflateInit2 */
110 #ifndef MAX_MEM_LEVEL
112 # define MAX_MEM_LEVEL 8
114 # define MAX_MEM_LEVEL 9
118 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
119 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
120 * created by gzip. (Files created by minigzip can still be extracted by
124 # define MAX_WBITS 15 /* 32K LZ77 window */
127 /* The memory requirements for deflate are (in bytes):
128 (1 << (windowBits+2)) + (1 << (memLevel+9))
129 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
130 plus a few kilobytes for small objects. For example, if you want to reduce
131 the default memory requirements from 256K to 128K, compile with
132 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
133 Of course this will generally degrade compression (there's no free lunch).
135 The memory requirements for inflate are (in bytes) 1 << windowBits
136 that is, 32K for windowBits=15 (default value) plus a few kilobytes
140 /* Type declarations */
142 #ifndef OF /* function prototypes */
144 # define OF(args) args
150 /* The following definitions for FAR are needed only for MSDOS mixed
151 * model programming (small or medium model with some far allocations).
152 * This was tested only with MSC; for other MSDOS compilers you may have
153 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
154 * just define FAR to be empty.
156 #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
157 /* MSC small or medium model */
158 # define SMALL_MEDIUM
165 #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
167 # define SMALL_MEDIUM
172 /* Compile with -DZLIB_DLL for Windows DLL support */
173 #if defined(ZLIB_DLL)
174 # if defined(_WINDOWS) || defined(WINDOWS)
178 # include <windows.h>
179 # define ZEXPORT(x) x WINAPI
181 # define ZEXPORTVA(x) x WINAPIV
183 # define ZEXPORTVA(x) x FAR _cdecl _export
186 # if defined (__BORLANDC__)
187 # if (__BORLANDC__ >= 0x0500) && defined (WIN32)
188 # include <windows.h>
189 # define ZEXPORT(x) x __declspec(dllexport) WINAPI
190 # define ZEXPORTRVA(x) x __declspec(dllexport) WINAPIV
192 # if defined (_Windows) && defined (__DLL__)
193 # define ZEXPORT(x) x _export
194 # define ZEXPORTVA(x) x _export
202 # define ZEXPORT(x) static x
205 # define ZEXPORTVA(x) static x
208 # define ZEXTERN(x) static x
211 # define ZEXTERNDEF(x) static x
218 #if !defined(MACOS) && !defined(TARGET_OS_MAC)
219 typedef unsigned char Byte
; /* 8 bits */
221 typedef unsigned int uInt
; /* 16 bits or more */
222 typedef unsigned long uLong
; /* 32 bits or more */
225 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
226 # define Bytef Byte FAR
228 typedef Byte FAR Bytef
;
230 typedef char FAR charf
;
231 typedef int FAR intf
;
232 typedef uInt FAR uIntf
;
233 typedef uLong FAR uLongf
;
236 typedef void FAR
*voidpf
;
239 typedef Byte FAR
*voidpf
;
244 # include <sys/types.h> /* for off_t */
245 # include <unistd.h> /* for SEEK_* and off_t */
246 # define z_off_t off_t
249 # define SEEK_SET 0 /* Seek from beginning of file. */
250 # define SEEK_CUR 1 /* Seek from current position. */
251 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
254 # define z_off_t long
257 /* MVS linker does not support external names larger than 8 bytes */
259 # pragma map(deflateInit_,"DEIN")
260 # pragma map(deflateInit2_,"DEIN2")
261 # pragma map(deflateEnd,"DEEND")
262 # pragma map(inflateInit_,"ININ")
263 # pragma map(inflateInit2_,"ININ2")
264 # pragma map(inflateEnd,"INEND")
265 # pragma map(inflateSync,"INSY")
266 # pragma map(inflateSetDictionary,"INSEDI")
267 # pragma map(inflate_blocks,"INBL")
268 # pragma map(inflate_blocks_new,"INBLNE")
269 # pragma map(inflate_blocks_free,"INBLFR")
270 # pragma map(inflate_blocks_reset,"INBLRE")
271 # pragma map(inflate_codes_free,"INCOFR")
272 # pragma map(inflate_codes,"INCO")
273 # pragma map(inflate_fast,"INFA")
274 # pragma map(inflate_flush,"INFLU")
275 # pragma map(inflate_mask,"INMA")
276 # pragma map(inflate_set_dictionary,"INSEDI2")
277 # pragma map(inflate_copyright,"INCOPY")
278 # pragma map(inflate_trees_bits,"INTRBI")
279 # pragma map(inflate_trees_dynamic,"INTRDY")
280 # pragma map(inflate_trees_fixed,"INTRFI")
281 # pragma map(inflate_trees_free,"INTRFR")
284 #endif /* _ZCONF_H */