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.2.1 2008/08/14 15:26:57 e0222316 Exp $ */
11 #if (defined(__TOOLS2__) || defined(__TOOLS__))
12 /** Defined as nothing for tools builds, as EXPORT_C keyword not supported on these platforms */
16 #include <e32def.h> /* Include for definition of IMPORT_C below */
17 /** This macro is used in function prototypes in zlib.h and libzcore.h. Use Symbian definition IMPORT_C instead of ZEXTERN */
18 #define ZEXTERN IMPORT_C
19 /** This macro is used for EZLIB component */
20 #define SYMBIAN_EZLIB_DEVICE
21 #endif /* __SYMBIAN32__ */
22 #endif /* __TOOLS2__ || __TOOLS__ */
26 * If you *really* need a unique prefix for all types and library functions,
27 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
30 # define deflateInit_ z_deflateInit_
31 # define deflate z_deflate
32 # define deflateEnd z_deflateEnd
33 # define inflateInit_ z_inflateInit_
34 # define inflate z_inflate
35 # define inflateEnd z_inflateEnd
36 # define deflateInit2_ z_deflateInit2_
37 # define deflateSetDictionary z_deflateSetDictionary
38 # define deflateCopy z_deflateCopy
39 # define deflateReset z_deflateReset
40 # define deflateParams z_deflateParams
41 # define deflateBound z_deflateBound
42 # define deflatePrime z_deflatePrime
43 # define inflateInit2_ z_inflateInit2_
44 # define inflateSetDictionary z_inflateSetDictionary
45 # define inflateSync z_inflateSync
46 # define inflateSyncPoint z_inflateSyncPoint
47 # define inflateCopy z_inflateCopy
48 # define inflateReset z_inflateReset
49 # define inflateBack z_inflateBack
50 # define inflateBackEnd z_inflateBackEnd
51 # define compress z_compress
52 # define compress2 z_compress2
53 # define compressBound z_compressBound
54 # define uncompress z_uncompress
55 # define adler32 z_adler32
56 # define crc32 z_crc32
57 # define get_crc_table z_get_crc_table
58 # define zError z_zError
60 # define alloc_func z_alloc_func
61 # define free_func z_free_func
62 # define in_func z_in_func
63 # define out_func z_out_func
66 # define uLong z_uLong
67 # define Bytef z_Bytef
68 # define charf z_charf
70 # define uIntf z_uIntf
71 # define uLongf z_uLongf
72 # define voidpf z_voidpf
73 # define voidp z_voidp
76 #if defined(__MSDOS__) && !defined(MSDOS)
79 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
82 #if defined(_WINDOWS) && !defined(WINDOWS)
85 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
90 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
91 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
99 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
100 * than 64k bytes at a time (needed on systems with 16-bit int).
106 # define UNALIGNED_OK
109 #ifdef __STDC_VERSION__
113 # if __STDC_VERSION__ >= 199901L
119 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
120 /** define STDC i.e. Standard C */
123 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
126 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
129 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
133 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
138 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
139 # define const /* note: need a more gentle solution here */
143 /* Some Mac compilers merge all .h files incorrectly: */
144 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
145 # define NO_DUMMY_DECL
148 #ifndef MAX_MEM_LEVEL
150 /** Maximum value for memLevel in deflateInit2 */
151 # define MAX_MEM_LEVEL 8
153 /** Maximum value for memLevel in deflateInit2 */
154 # define MAX_MEM_LEVEL 9
158 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
159 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
160 * created by gzip. (Files created by minigzip can still be extracted by
164 /** 32K LZ77 window */
165 # define MAX_WBITS 15
168 /* The memory requirements for deflate are (in bytes):
169 (1 << (windowBits+2)) + (1 << (memLevel+9))
170 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
171 plus a few kilobytes for small objects. For example, if you want to reduce
172 the default memory requirements from 256K to 128K, compile with
173 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
174 Of course this will generally degrade compression (there's no free lunch).
176 The memory requirements for inflate are (in bytes) 1 << windowBits
177 that is, 32K for windowBits=15 (default value) plus a few kilobytes
181 /* Type declarations */
183 #ifndef OF /* function prototypes */
187 @param args arguments ...
189 # define OF(args) args
191 /** Function prototypes */
196 /* The following definitions for FAR are needed only for MSDOS mixed
197 * model programming (small or medium model with some far allocations).
198 * This was tested only with MSC; for other MSDOS compilers you may have
199 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
200 * just define FAR to be empty.
203 # if defined(M_I86SM) || defined(M_I86MM)
204 /* MSC small or medium model */
205 # define SMALL_MEDIUM
212 # if (defined(__SMALL__) || defined(__MEDIUM__))
213 /* Turbo C small or medium model */
214 # define SMALL_MEDIUM
223 #if defined(WINDOWS) || defined(WIN32)
224 /* If building or using zlib as a DLL, define ZLIB_DLL.
225 * This is not mandatory, but it offers a little performance increase.
228 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
229 # ifdef ZLIB_INTERNAL
230 # define ZEXTERN extern __declspec(dllexport)
232 # define ZEXTERN extern __declspec(dllimport)
235 # endif /* ZLIB_DLL */
236 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
237 * define ZLIB_WINAPI.
238 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
244 # include <windows.h>
245 /* No need for _export, use ZLIB.DEF instead. */
246 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
247 # define ZEXPORT WINAPI
249 # define ZEXPORTVA WINAPIV
251 # define ZEXPORTVA FAR CDECL
256 #if defined (__BEOS__)
258 # ifdef ZLIB_INTERNAL
259 # define ZEXPORT __declspec(dllexport)
260 # define ZEXPORTVA __declspec(dllexport)
262 # define ZEXPORT __declspec(dllimport)
263 # define ZEXPORTVA __declspec(dllimport)
269 /** extern defined as ZEXTERN */
270 # define ZEXTERN extern
284 #if !defined(__MACTYPES__)
286 typedef unsigned char Byte;
288 /** 16 bits or more */
289 typedef unsigned int uInt;
290 /** 32 bits or more */
291 typedef unsigned long uLong;
294 /** Borland C/C++ and some old MSC versions ignore FAR inside typedef */
295 # define Bytef Byte FAR
297 /** Borland C/C++ and some old MSC versions ignore FAR inside typedef */
298 typedef Byte FAR Bytef;
300 /** char typedef to charf */
301 typedef char FAR charf;
302 /** int typedef to intf */
303 typedef int FAR intf;
304 /** uInt typedef to uIntf */
305 typedef uInt FAR uIntf;
306 /** uLong typedef to uLongf */
307 typedef uLong FAR uLongf;
310 /** typedef void const* to voidpc */
311 typedef void const *voidpc;
312 /** typedef void FAR* to voidpf */
313 typedef void FAR *voidpf;
314 /** typedef void* to voidp */
317 /** typedef Byte const* to voidpc */
318 typedef Byte const *voidpc;
319 /** typedef Byte FAR* to voidpf */
320 typedef Byte FAR *voidpf;
321 /** typedef Byte* to voidp */
325 #if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
326 # include <sys/types.h> /* for off_t */
327 # include <unistd.h> /* for SEEK_* and off_t */
329 # include <unixio.h> /* for off_t */
331 # define z_off_t off_t
334 /** Seek from beginning of file. */
336 /** Seek from current position. */
338 /** Set file pointer to EOF plus "offset" */
342 /** define z_off_t as long */
343 # define z_off_t long
346 #if defined(__OS400__)
347 # define NO_vsnprintf
351 # define NO_vsnprintf
357 /* MVS linker does not support external names larger than 8 bytes */
359 # pragma map(deflateInit_,"DEIN")
360 # pragma map(deflateInit2_,"DEIN2")
361 # pragma map(deflateEnd,"DEEND")
362 # pragma map(deflateBound,"DEBND")
363 # pragma map(inflateInit_,"ININ")
364 # pragma map(inflateInit2_,"ININ2")
365 # pragma map(inflateEnd,"INEND")
366 # pragma map(inflateSync,"INSY")
367 # pragma map(inflateSetDictionary,"INSEDI")
368 # pragma map(compressBound,"CMBND")
369 # pragma map(inflate_table,"INTABL")
370 # pragma map(inflate_fast,"INFA")
371 # pragma map(inflate_copyright,"INCOPY")
374 #endif /* _ZCONF_H */