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
6 /* @(#) $Id: zconf.h,v 1.1 2007/06/07 17:54:37 jules_rms Exp $ */
11 // *** Just a few hacks here to make it compile nicely with Juce..
16 #pragma warning (disable : 4131 4127 4244 4267)
21 * If you *really* need a unique prefix for all types and library functions,
22 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
25 # define deflateInit_ z_deflateInit_
26 # define deflate z_deflate
27 # define deflateEnd z_deflateEnd
28 # define inflateInit_ z_inflateInit_
29 # define inflate z_inflate
30 # define inflateEnd z_inflateEnd
31 # define inflatePrime z_inflatePrime
32 # define inflateGetHeader z_inflateGetHeader
33 # define adler32_combine z_adler32_combine
34 # define crc32_combine z_crc32_combine
35 # define deflateInit2_ z_deflateInit2_
36 # define deflateSetDictionary z_deflateSetDictionary
37 # define deflateCopy z_deflateCopy
38 # define deflateReset z_deflateReset
39 # define deflateParams z_deflateParams
40 # define deflateBound z_deflateBound
41 # define deflatePrime z_deflatePrime
42 # define inflateInit2_ z_inflateInit2_
43 # define inflateSetDictionary z_inflateSetDictionary
44 # define inflateSync z_inflateSync
45 # define inflateSyncPoint z_inflateSyncPoint
46 # define inflateCopy z_inflateCopy
47 # define inflateReset z_inflateReset
48 # define inflateBack z_inflateBack
49 # define inflateBackEnd z_inflateBackEnd
50 # define compress z_compress
51 # define compress2 z_compress2
52 # define compressBound z_compressBound
53 # define uncompress z_uncompress
54 # define adler32 z_adler32
55 # define crc32 z_crc32
56 # define get_crc_table z_get_crc_table
57 # define zError z_zError
59 # define alloc_func z_alloc_func
60 # define free_func z_free_func
61 # define in_func z_in_func
62 # define out_func z_out_func
65 # define uLong z_uLong
66 # define Bytef z_Bytef
67 # define charf z_charf
69 # define uIntf z_uIntf
70 # define uLongf z_uLongf
71 # define voidpf z_voidpf
72 # define voidp z_voidp
75 #if defined(__MSDOS__) && !defined(MSDOS)
78 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
81 #if defined(_WINDOWS) && !defined(WINDOWS)
84 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
89 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
90 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
98 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
99 * than 64k bytes at a time (needed on systems with 16-bit int).
105 # define UNALIGNED_OK
108 #ifdef __STDC_VERSION__
112 # if __STDC_VERSION__ >= 199901L
118 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
121 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
124 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
127 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
131 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
136 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
137 # define const /* note: need a more gentle solution here */
141 /* Some Mac compilers merge all .h files incorrectly: */
142 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
143 # define NO_DUMMY_DECL
146 /* Maximum value for memLevel in deflateInit2 */
147 #ifndef MAX_MEM_LEVEL
149 # define MAX_MEM_LEVEL 8
151 # define MAX_MEM_LEVEL 9
155 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
156 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
157 * created by gzip. (Files created by minigzip can still be extracted by
161 # define MAX_WBITS 15 /* 32K LZ77 window */
164 /* The memory requirements for deflate are (in bytes):
165 (1 << (windowBits+2)) + (1 << (memLevel+9))
166 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
167 plus a few kilobytes for small objects. For example, if you want to reduce
168 the default memory requirements from 256K to 128K, compile with
169 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
170 Of course this will generally degrade compression (there's no free lunch).
172 The memory requirements for inflate are (in bytes) 1 << windowBits
173 that is, 32K for windowBits=15 (default value) plus a few kilobytes
177 /* Type declarations */
179 #ifndef OF /* function prototypes */
181 # define OF(args) args
187 /* The following definitions for FAR are needed only for MSDOS mixed
188 * model programming (small or medium model with some far allocations).
189 * This was tested only with MSC; for other MSDOS compilers you may have
190 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
191 * just define FAR to be empty.
194 # if defined(M_I86SM) || defined(M_I86MM)
195 /* MSC small or medium model */
196 # define SMALL_MEDIUM
203 # if (defined(__SMALL__) || defined(__MEDIUM__))
204 /* Turbo C small or medium model */
205 # define SMALL_MEDIUM
214 #if defined(WINDOWS) || defined(WIN32)
215 /* If building or using zlib as a DLL, define ZLIB_DLL.
216 * This is not mandatory, but it offers a little performance increase.
219 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
220 # ifdef ZLIB_INTERNAL
221 # define ZEXTERN extern __declspec(dllexport)
223 # define ZEXTERN extern __declspec(dllimport)
226 # endif /* ZLIB_DLL */
227 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
228 * define ZLIB_WINAPI.
229 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
235 # include <windows.h>
236 /* No need for _export, use ZLIB.DEF instead. */
237 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
238 # define ZEXPORT WINAPI
240 # define ZEXPORTVA WINAPIV
242 # define ZEXPORTVA FAR CDECL
247 #if defined (__BEOS__)
249 # ifdef ZLIB_INTERNAL
250 # define ZEXPORT __declspec(dllexport)
251 # define ZEXPORTVA __declspec(dllexport)
253 # define ZEXPORT __declspec(dllimport)
254 # define ZEXPORTVA __declspec(dllimport)
260 # define ZEXTERN extern
273 #if !defined(__MACTYPES__)
274 typedef unsigned char Byte
; /* 8 bits */
276 typedef unsigned int uInt
; /* 16 bits or more */
277 typedef unsigned long uLong
; /* 32 bits or more */
280 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
281 # define Bytef Byte FAR
283 typedef Byte FAR Bytef
;
285 typedef char FAR charf
;
286 typedef int FAR intf
;
287 typedef uInt FAR uIntf
;
288 typedef uLong FAR uLongf
;
291 typedef void const *voidpc
;
292 typedef void FAR
*voidpf
;
295 typedef Byte
const *voidpc
;
296 typedef Byte FAR
*voidpf
;
300 #if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
301 # include <sys/types.h> /* for off_t */
302 # include <unistd.h> /* for SEEK_* and off_t */
304 # include <unixio.h> /* for off_t */
306 # define z_off_t off_t
309 # define SEEK_SET 0 /* Seek from beginning of file. */
310 # define SEEK_CUR 1 /* Seek from current position. */
311 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
314 # define z_off_t long
317 #if defined(__OS400__)
318 # define NO_vsnprintf
322 # define NO_vsnprintf
328 /* MVS linker does not support external names larger than 8 bytes */
330 # pragma map(deflateInit_,"DEIN")
331 # pragma map(deflateInit2_,"DEIN2")
332 # pragma map(deflateEnd,"DEEND")
333 # pragma map(deflateBound,"DEBND")
334 # pragma map(inflateInit_,"ININ")
335 # pragma map(inflateInit2_,"ININ2")
336 # pragma map(inflateEnd,"INEND")
337 # pragma map(inflateSync,"INSY")
338 # pragma map(inflateSetDictionary,"INSEDI")
339 # pragma map(compressBound,"CMBND")
340 # pragma map(inflate_table,"INTABL")
341 # pragma map(inflate_fast,"INFA")
342 # pragma map(inflate_copyright,"INCOPY")