[Android] strip memdump and ps_ext tools.
[chromium-blink-merge.git] / third_party / zlib / zconf.h
blob73662d804b10f52fe1d7b87ff7f5ac3ebfb50f84
1 /* zconf.h -- configuration of the zlib compression library
2 * Copyright (C) 1995-2010 Jean-loup Gailly.
3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */
6 /* @(#) $Id$ */
8 #ifndef ZCONF_H
9 #define ZCONF_H
11 /* This include does prefixing as below, but with an updated set of names */
12 #include "mozzconf.h"
15 * If you *really* need a unique prefix for all types and library functions,
16 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
17 * Even better than compiling with -DZ_PREFIX would be to use configure to set
18 * this permanently in zconf.h using "./configure --zprefix".
20 #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
22 /* all linked symbols */
23 # define _dist_code z__dist_code
24 # define _length_code z__length_code
25 # define _tr_align z__tr_align
26 # define _tr_flush_block z__tr_flush_block
27 # define _tr_init z__tr_init
28 # define _tr_stored_block z__tr_stored_block
29 # define _tr_tally z__tr_tally
30 # define adler32 z_adler32
31 # define adler32_combine z_adler32_combine
32 # define adler32_combine64 z_adler32_combine64
33 # define compress z_compress
34 # define compress2 z_compress2
35 # define compressBound z_compressBound
36 # define crc32 z_crc32
37 # define crc32_combine z_crc32_combine
38 # define crc32_combine64 z_crc32_combine64
39 # define deflate z_deflate
40 # define deflateBound z_deflateBound
41 # define deflateCopy z_deflateCopy
42 # define deflateEnd z_deflateEnd
43 # define deflateInit2_ z_deflateInit2_
44 # define deflateInit_ z_deflateInit_
45 # define deflateParams z_deflateParams
46 # define deflatePrime z_deflatePrime
47 # define deflateReset z_deflateReset
48 # define deflateSetDictionary z_deflateSetDictionary
49 # define deflateSetHeader z_deflateSetHeader
50 # define deflateTune z_deflateTune
51 # define deflate_copyright z_deflate_copyright
52 # define get_crc_table z_get_crc_table
53 # define gz_error z_gz_error
54 # define gz_intmax z_gz_intmax
55 # define gz_strwinerror z_gz_strwinerror
56 # define gzbuffer z_gzbuffer
57 # define gzclearerr z_gzclearerr
58 # define gzclose z_gzclose
59 # define gzclose_r z_gzclose_r
60 # define gzclose_w z_gzclose_w
61 # define gzdirect z_gzdirect
62 # define gzdopen z_gzdopen
63 # define gzeof z_gzeof
64 # define gzerror z_gzerror
65 # define gzflush z_gzflush
66 # define gzgetc z_gzgetc
67 # define gzgets z_gzgets
68 # define gzoffset z_gzoffset
69 # define gzoffset64 z_gzoffset64
70 # define gzopen z_gzopen
71 # define gzopen64 z_gzopen64
72 # define gzprintf z_gzprintf
73 # define gzputc z_gzputc
74 # define gzputs z_gzputs
75 # define gzread z_gzread
76 # define gzrewind z_gzrewind
77 # define gzseek z_gzseek
78 # define gzseek64 z_gzseek64
79 # define gzsetparams z_gzsetparams
80 # define gztell z_gztell
81 # define gztell64 z_gztell64
82 # define gzungetc z_gzungetc
83 # define gzwrite z_gzwrite
84 # define inflate z_inflate
85 # define inflateBack z_inflateBack
86 # define inflateBackEnd z_inflateBackEnd
87 # define inflateBackInit_ z_inflateBackInit_
88 # define inflateCopy z_inflateCopy
89 # define inflateEnd z_inflateEnd
90 # define inflateGetHeader z_inflateGetHeader
91 # define inflateInit2_ z_inflateInit2_
92 # define inflateInit_ z_inflateInit_
93 # define inflateMark z_inflateMark
94 # define inflatePrime z_inflatePrime
95 # define inflateReset z_inflateReset
96 # define inflateReset2 z_inflateReset2
97 # define inflateSetDictionary z_inflateSetDictionary
98 # define inflateSync z_inflateSync
99 # define inflateSyncPoint z_inflateSyncPoint
100 # define inflateUndermine z_inflateUndermine
101 # define inflate_copyright z_inflate_copyright
102 # define inflate_fast z_inflate_fast
103 # define inflate_table z_inflate_table
104 # define uncompress z_uncompress
105 # define zError z_zError
106 # define zcalloc z_zcalloc
107 # define zcfree z_zcfree
108 # define zlibCompileFlags z_zlibCompileFlags
109 # define zlibVersion z_zlibVersion
111 /* all zlib typedefs in zlib.h and zconf.h */
112 # define Byte z_Byte
113 # define Bytef z_Bytef
114 # define alloc_func z_alloc_func
115 # define charf z_charf
116 # define free_func z_free_func
117 # define gzFile z_gzFile
118 # define gz_header z_gz_header
119 # define gz_headerp z_gz_headerp
120 # define in_func z_in_func
121 # define intf z_intf
122 # define out_func z_out_func
123 # define uInt z_uInt
124 # define uIntf z_uIntf
125 # define uLong z_uLong
126 # define uLongf z_uLongf
127 # define voidp z_voidp
128 # define voidpc z_voidpc
129 # define voidpf z_voidpf
131 /* all zlib structs in zlib.h and zconf.h */
132 # define gz_header_s z_gz_header_s
133 # define internal_state z_internal_state
135 #endif
137 #if defined(__MSDOS__) && !defined(MSDOS)
138 # define MSDOS
139 #endif
140 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
141 # define OS2
142 #endif
143 #if defined(_WINDOWS) && !defined(WINDOWS)
144 # define WINDOWS
145 #endif
146 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
147 # ifndef WIN32
148 # define WIN32
149 # endif
150 #endif
151 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
152 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
153 # ifndef SYS16BIT
154 # define SYS16BIT
155 # endif
156 # endif
157 #endif
160 * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
161 * than 64k bytes at a time (needed on systems with 16-bit int).
163 #ifdef SYS16BIT
164 # define MAXSEG_64K
165 #endif
166 #ifdef MSDOS
167 # define UNALIGNED_OK
168 #endif
170 #ifdef __STDC_VERSION__
171 # ifndef STDC
172 # define STDC
173 # endif
174 # if __STDC_VERSION__ >= 199901L
175 # ifndef STDC99
176 # define STDC99
177 # endif
178 # endif
179 #endif
180 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
181 # define STDC
182 #endif
183 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
184 # define STDC
185 #endif
186 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
187 # define STDC
188 #endif
189 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
190 # define STDC
191 #endif
193 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
194 # define STDC
195 #endif
197 #ifndef STDC
198 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
199 # define const /* note: need a more gentle solution here */
200 # endif
201 #endif
203 /* Some Mac compilers merge all .h files incorrectly: */
204 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
205 # define NO_DUMMY_DECL
206 #endif
208 /* Maximum value for memLevel in deflateInit2 */
209 #ifndef MAX_MEM_LEVEL
210 # ifdef MAXSEG_64K
211 # define MAX_MEM_LEVEL 8
212 # else
213 # define MAX_MEM_LEVEL 9
214 # endif
215 #endif
217 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
218 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
219 * created by gzip. (Files created by minigzip can still be extracted by
220 * gzip.)
222 #ifndef MAX_WBITS
223 # define MAX_WBITS 15 /* 32K LZ77 window */
224 #endif
226 /* The memory requirements for deflate are (in bytes):
227 (1 << (windowBits+2)) + (1 << (memLevel+9))
228 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
229 plus a few kilobytes for small objects. For example, if you want to reduce
230 the default memory requirements from 256K to 128K, compile with
231 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
232 Of course this will generally degrade compression (there's no free lunch).
234 The memory requirements for inflate are (in bytes) 1 << windowBits
235 that is, 32K for windowBits=15 (default value) plus a few kilobytes
236 for small objects.
239 /* Type declarations */
241 #ifndef OF /* function prototypes */
242 # ifdef STDC
243 # define OF(args) args
244 # else
245 # define OF(args) ()
246 # endif
247 #endif
249 /* The following definitions for FAR are needed only for MSDOS mixed
250 * model programming (small or medium model with some far allocations).
251 * This was tested only with MSC; for other MSDOS compilers you may have
252 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
253 * just define FAR to be empty.
255 #ifdef SYS16BIT
256 # if defined(M_I86SM) || defined(M_I86MM)
257 /* MSC small or medium model */
258 # define SMALL_MEDIUM
259 # ifdef _MSC_VER
260 # define FAR _far
261 # else
262 # define FAR far
263 # endif
264 # endif
265 # if (defined(__SMALL__) || defined(__MEDIUM__))
266 /* Turbo C small or medium model */
267 # define SMALL_MEDIUM
268 # ifdef __BORLANDC__
269 # define FAR _far
270 # else
271 # define FAR far
272 # endif
273 # endif
274 #endif
276 #if defined(WINDOWS) || defined(WIN32)
277 /* If building or using zlib as a DLL, define ZLIB_DLL.
278 * This is not mandatory, but it offers a little performance increase.
280 # ifdef ZLIB_DLL
281 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
282 # ifdef ZLIB_INTERNAL
283 # define ZEXTERN extern __declspec(dllexport)
284 # else
285 # define ZEXTERN extern __declspec(dllimport)
286 # endif
287 # endif
288 # endif /* ZLIB_DLL */
289 /* If building or using zlib with the WINAPI/WINAPIV calling convention,
290 * define ZLIB_WINAPI.
291 * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
293 # ifdef ZLIB_WINAPI
294 # ifdef FAR
295 # undef FAR
296 # endif
297 # include <windows.h>
298 /* No need for _export, use ZLIB.DEF instead. */
299 /* For complete Windows compatibility, use WINAPI, not __stdcall. */
300 # define ZEXPORT WINAPI
301 # ifdef WIN32
302 # define ZEXPORTVA WINAPIV
303 # else
304 # define ZEXPORTVA FAR CDECL
305 # endif
306 # endif
307 #endif
309 #if defined (__BEOS__)
310 # ifdef ZLIB_DLL
311 # ifdef ZLIB_INTERNAL
312 # define ZEXPORT __declspec(dllexport)
313 # define ZEXPORTVA __declspec(dllexport)
314 # else
315 # define ZEXPORT __declspec(dllimport)
316 # define ZEXPORTVA __declspec(dllimport)
317 # endif
318 # endif
319 #endif
321 #ifndef ZEXTERN
322 # define ZEXTERN extern
323 #endif
324 #ifndef ZEXPORT
325 # define ZEXPORT
326 #endif
327 #ifndef ZEXPORTVA
328 # define ZEXPORTVA
329 #endif
331 #ifndef FAR
332 # define FAR
333 #endif
335 #if !defined(__MACTYPES__)
336 typedef unsigned char Byte; /* 8 bits */
337 #endif
338 typedef unsigned int uInt; /* 16 bits or more */
339 typedef unsigned long uLong; /* 32 bits or more */
341 #ifdef SMALL_MEDIUM
342 /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
343 # define Bytef Byte FAR
344 #else
345 typedef Byte FAR Bytef;
346 #endif
347 typedef char FAR charf;
348 typedef int FAR intf;
349 typedef uInt FAR uIntf;
350 typedef uLong FAR uLongf;
352 #ifdef STDC
353 typedef void const *voidpc;
354 typedef void FAR *voidpf;
355 typedef void *voidp;
356 #else
357 typedef Byte const *voidpc;
358 typedef Byte FAR *voidpf;
359 typedef Byte *voidp;
360 #endif
362 #if !defined(_WIN32)
363 # define Z_HAVE_UNISTD_H
364 #endif
366 #ifdef STDC
367 # include <sys/types.h> /* for off_t */
368 #endif
370 /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
371 * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
372 * though the former does not conform to the LFS document), but considering
373 * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
374 * equivalently requesting no 64-bit operations
376 #if -_LARGEFILE64_SOURCE - -1 == 1
377 # undef _LARGEFILE64_SOURCE
378 #endif
380 #if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
381 # include <unistd.h> /* for SEEK_* and off_t */
382 # ifdef VMS
383 # include <unixio.h> /* for off_t */
384 # endif
385 # ifndef z_off_t
386 # define z_off_t off_t
387 # endif
388 #endif
390 #ifndef SEEK_SET
391 # define SEEK_SET 0 /* Seek from beginning of file. */
392 # define SEEK_CUR 1 /* Seek from current position. */
393 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
394 #endif
396 #ifndef z_off_t
397 # define z_off_t long
398 #endif
400 #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
401 # define z_off64_t off64_t
402 #else
403 # define z_off64_t z_off_t
404 #endif
406 #if defined(__OS400__)
407 # define NO_vsnprintf
408 #endif
410 #if defined(__MVS__)
411 # define NO_vsnprintf
412 #endif
414 /* MVS linker does not support external names larger than 8 bytes */
415 #if defined(__MVS__)
416 #pragma map(deflateInit_,"DEIN")
417 #pragma map(deflateInit2_,"DEIN2")
418 #pragma map(deflateEnd,"DEEND")
419 #pragma map(deflateBound,"DEBND")
420 #pragma map(inflateInit_,"ININ")
421 #pragma map(inflateInit2_,"ININ2")
422 #pragma map(inflateEnd,"INEND")
423 #pragma map(inflateSync,"INSY")
424 #pragma map(inflateSetDictionary,"INSEDI")
425 #pragma map(compressBound,"CMBND")
426 #pragma map(inflate_table,"INTABL")
427 #pragma map(inflate_fast,"INFA")
428 #pragma map(inflate_copyright,"INCOPY")
429 #endif
431 #endif /* ZCONF_H */