]>
git.saurik.com Git - wxWidgets.git/blob - src/zlib/zconf.h
1 /* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995-1998 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)
64 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
65 * than 64k bytes at a time (needed on systems with 16-bit int).
67 #if defined(MSDOS) && !defined(__32BIT__)
74 #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
77 #if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
84 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
89 /* Some Mac compilers merge all .h files incorrectly: */
90 #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
91 # define NO_DUMMY_DECL
94 /* Borland C incorrectly complains about missing returns: */
95 #if defined(__BORLANDC__)
96 # define NEED_DUMMY_RETURN
100 /* Maximum value for memLevel in deflateInit2 */
101 #ifndef MAX_MEM_LEVEL
103 # define MAX_MEM_LEVEL 8
105 # define MAX_MEM_LEVEL 9
109 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
110 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
111 * created by gzip. (Files created by minigzip can still be extracted by
115 # define MAX_WBITS 15 /* 32K LZ77 window */
118 /* The memory requirements for deflate are (in bytes):
119 (1 << (windowBits+2)) + (1 << (memLevel+9))
120 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
121 plus a few kilobytes for small objects. For example, if you want to reduce
122 the default memory requirements from 256K to 128K, compile with
123 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
124 Of course this will generally degrade compression (there's no free lunch).
126 The memory requirements for inflate are (in bytes) 1 << windowBits
127 that is, 32K for windowBits=15 (default value) plus a few kilobytes
131 /* Type declarations */
133 #ifndef OF /* function prototypes */
135 # define OF(args) args
141 /* The following definitions for FAR are needed only for MSDOS mixed
142 * model programming (small or medium model with some far allocations).
143 * This was tested only with MSC; for other MSDOS compilers you may have
144 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
145 * just define FAR to be empty.
147 #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
148 /* MSC small or medium model */
149 # define SMALL_MEDIUM
156 #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
158 # define SMALL_MEDIUM
163 /* Compile with -DZLIB_DLL for Windows DLL support */
164 #if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL)
168 # include <windows.h>
169 # define ZEXPORT WINAPI
171 # define ZEXPORTVA WINAPIV
173 # define ZEXPORTVA FAR _cdecl _export
176 # if defined (__BORLANDC__) && defined (_Windows) && defined (__DLL__)
177 # define ZEXPORT _export
178 # define ZEXPORTVA _export
189 typedef unsigned char Byte
; /* 8 bits */
190 typedef unsigned int uInt
; /* 16 bits or more */
191 typedef unsigned long uLong
; /* 32 bits or more */
193 #if defined(__BORLANDC__) && defined(SMALL_MEDIUM)
194 /* Borland C/C++ ignores FAR inside typedef */
195 # define Bytef Byte FAR
197 typedef Byte FAR Bytef
;
199 typedef char FAR charf
;
200 typedef int FAR intf
;
201 typedef uInt FAR uIntf
;
202 typedef uLong FAR uLongf
;
205 typedef void FAR
*voidpf
;
208 typedef Byte FAR
*voidpf
;
213 # include <sys/types.h> /* for off_t */
214 # include <unistd.h> /* for SEEK_* and off_t */
215 # define z_off_t off_t
218 # define SEEK_SET 0 /* Seek from beginning of file. */
219 # define SEEK_CUR 1 /* Seek from current position. */
222 # define z_off_t long
225 /* MVS linker does not support external names larger than 8 bytes */
227 # pragma map(deflateInit_,"DEIN")
228 # pragma map(deflateInit2_,"DEIN2")
229 # pragma map(deflateEnd,"DEEND")
230 # pragma map(inflateInit_,"ININ")
231 # pragma map(inflateInit2_,"ININ2")
232 # pragma map(inflateEnd,"INEND")
233 # pragma map(inflateSync,"INSY")
234 # pragma map(inflateSetDictionary,"INSEDI")
235 # pragma map(inflate_blocks,"INBL")
236 # pragma map(inflate_blocks_new,"INBLNE")
237 # pragma map(inflate_blocks_free,"INBLFR")
238 # pragma map(inflate_blocks_reset,"INBLRE")
239 # pragma map(inflate_codes_free,"INCOFR")
240 # pragma map(inflate_codes,"INCO")
241 # pragma map(inflate_fast,"INFA")
242 # pragma map(inflate_flush,"INFLU")
243 # pragma map(inflate_mask,"INMA")
244 # pragma map(inflate_set_dictionary,"INSEDI2")
245 # pragma map(inflate_copyright,"INCOPY")
246 # pragma map(inflate_trees_bits,"INTRBI")
247 # pragma map(inflate_trees_dynamic,"INTRDY")
248 # pragma map(inflate_trees_fixed,"INTRFI")
249 # pragma map(inflate_trees_free,"INTRFR")
252 #endif /* _ZCONF_H */