1
/* zconf.h -- configuration of the zlib compression library
2
* Copyright (C) 1995-2011 Jean-loup Gailly.
3
* For conditions of distribution and use, see copyright notice in zlib.h
11
#cmakedefine Z_HAVE_UNISTD_H
14
* If you *really* need a unique prefix for all types and library functions,
15
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
16
* Even better than compiling with -DZ_PREFIX would be to use configure to set
17
* this permanently in zconf.h using "./configure --zprefix".
19
#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
34
# define compress z_compress
35
# define compress2 z_compress2
36
# define compressBound z_compressBound
38
# define crc32 z_crc32
39
# define crc32_combine z_crc32_combine
40
# define crc32_combine64 z_crc32_combine64
41
# define deflate z_deflate
42
# define deflateBound z_deflateBound
43
# define deflateCopy z_deflateCopy
44
# define deflateEnd z_deflateEnd
45
# define deflateInit2_ z_deflateInit2_
46
# define deflateInit_ z_deflateInit_
47
# define deflateParams z_deflateParams
48
# define deflatePending z_deflatePending
49
# define deflatePrime z_deflatePrime
50
# define deflateReset z_deflateReset
51
# define deflateResetKeep z_deflateResetKeep
52
# define deflateSetDictionary z_deflateSetDictionary
53
# define deflateSetHeader z_deflateSetHeader
54
# define deflateTune z_deflateTune
55
# define deflate_copyright z_deflate_copyright
56
# define get_crc_table z_get_crc_table
58
# define gz_error z_gz_error
59
# define gz_intmax z_gz_intmax
60
# define gz_strwinerror z_gz_strwinerror
61
# define gzbuffer z_gzbuffer
62
# define gzclearerr z_gzclearerr
63
# define gzclose z_gzclose
64
# define gzclose_r z_gzclose_r
65
# define gzclose_w z_gzclose_w
66
# define gzdirect z_gzdirect
67
# define gzdopen z_gzdopen
68
# define gzeof z_gzeof
69
# define gzerror z_gzerror
70
# define gzflags z_gzflags
71
# define gzflush z_gzflush
72
# define gzgetc z_gzgetc
73
# define gzgetc_ z_gzgetc_
74
# define gzgets z_gzgets
75
# define gzoffset z_gzoffset
76
# define gzoffset64 z_gzoffset64
77
# define gzopen z_gzopen
78
# define gzopen64 z_gzopen64
79
# define gzprintf z_gzprintf
80
# define gzputc z_gzputc
81
# define gzputs z_gzputs
82
# define gzread z_gzread
83
# define gzrewind z_gzrewind
84
# define gzseek z_gzseek
85
# define gzseek64 z_gzseek64
86
# define gzsetparams z_gzsetparams
87
# define gztell z_gztell
88
# define gztell64 z_gztell64
89
# define gzungetc z_gzungetc
90
# define gzwrite z_gzwrite
92
# define inflate z_inflate
93
# define inflateBack z_inflateBack
94
# define inflateBackEnd z_inflateBackEnd
95
# define inflateBackInit_ z_inflateBackInit_
96
# define inflateCopy z_inflateCopy
97
# define inflateEnd z_inflateEnd
98
# define inflateGetHeader z_inflateGetHeader
99
# define inflateInit2_ z_inflateInit2_
100
# define inflateInit_ z_inflateInit_
101
# define inflateMark z_inflateMark
102
# define inflatePrime z_inflatePrime
103
# define inflateReset z_inflateReset
104
# define inflateReset2 z_inflateReset2
105
# define inflateSetDictionary z_inflateSetDictionary
106
# define inflateSync z_inflateSync
107
# define inflateSyncPoint z_inflateSyncPoint
108
# define inflateUndermine z_inflateUndermine
109
# define inflateResetKeep z_inflateResetKeep
110
# define inflate_copyright z_inflate_copyright
111
# define inflate_fast z_inflate_fast
112
# define inflate_table z_inflate_table
114
# define uncompress z_uncompress
116
# define zError z_zError
118
# define zcalloc z_zcalloc
119
# define zcfree z_zcfree
121
# define zlibCompileFlags z_zlibCompileFlags
122
# define zlibVersion z_zlibVersion
124
/* all zlib typedefs in zlib.h and zconf.h */
126
# define Bytef z_Bytef
127
# define alloc_func z_alloc_func
128
# define charf z_charf
129
# define free_func z_free_func
131
# define gzFile z_gzFile
132
# define gz_header z_gz_header
133
# define gz_headerp z_gz_headerp
135
# define in_func z_in_func
137
# define out_func z_out_func
139
# define uIntf z_uIntf
140
# define uLong z_uLong
141
# define uLongf z_uLongf
142
# define voidp z_voidp
143
# define voidpc z_voidpc
144
# define voidpf z_voidpf
146
/* all zlib structs in zlib.h and zconf.h */
148
# define gz_header_s z_gz_header_s
150
# define internal_state z_internal_state
154
#if defined(__MSDOS__) && !defined(MSDOS)
157
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
160
#if defined(_WINDOWS) && !defined(WINDOWS)
163
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
168
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
169
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
177
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
178
* than 64k bytes at a time (needed on systems with 16-bit int).
184
# define UNALIGNED_OK
187
#ifdef __STDC_VERSION__
191
# if __STDC_VERSION__ >= 199901L
197
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
200
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
203
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
206
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
210
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
215
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
216
# define const /* note: need a more gentle solution here */
220
#if defined(ZLIB_CONST) && !defined(z_const)
221
# define z_const const
226
/* Some Mac compilers merge all .h files incorrectly: */
227
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
228
# define NO_DUMMY_DECL
231
/* Maximum value for memLevel in deflateInit2 */
232
#ifndef MAX_MEM_LEVEL
234
# define MAX_MEM_LEVEL 8
236
# define MAX_MEM_LEVEL 9
240
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
241
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
242
* created by gzip. (Files created by minigzip can still be extracted by
246
# define MAX_WBITS 15 /* 32K LZ77 window */
249
/* The memory requirements for deflate are (in bytes):
250
(1 << (windowBits+2)) + (1 << (memLevel+9))
251
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
252
plus a few kilobytes for small objects. For example, if you want to reduce
253
the default memory requirements from 256K to 128K, compile with
254
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
255
Of course this will generally degrade compression (there's no free lunch).
257
The memory requirements for inflate are (in bytes) 1 << windowBits
258
that is, 32K for windowBits=15 (default value) plus a few kilobytes
262
/* Type declarations */
264
#ifndef OF /* function prototypes */
266
# define OF(args) args
272
#ifndef Z_ARG /* function prototypes for stdarg */
273
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
274
# define Z_ARG(args) args
276
# define Z_ARG(args) ()
280
/* The following definitions for FAR are needed only for MSDOS mixed
281
* model programming (small or medium model with some far allocations).
282
* This was tested only with MSC; for other MSDOS compilers you may have
283
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
284
* just define FAR to be empty.
287
# if defined(M_I86SM) || defined(M_I86MM)
288
/* MSC small or medium model */
289
# define SMALL_MEDIUM
296
# if (defined(__SMALL__) || defined(__MEDIUM__))
297
/* Turbo C small or medium model */
298
# define SMALL_MEDIUM
307
#if defined(WINDOWS) || defined(WIN32)
308
/* If building or using zlib as a DLL, define ZLIB_DLL.
309
* This is not mandatory, but it offers a little performance increase.
312
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
313
# ifdef ZLIB_INTERNAL
314
# define ZEXTERN extern __declspec(dllexport)
316
# define ZEXTERN extern __declspec(dllimport)
319
# endif /* ZLIB_DLL */
320
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
321
* define ZLIB_WINAPI.
322
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
328
# include <windows.h>
329
/* No need for _export, use ZLIB.DEF instead. */
330
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
331
# define ZEXPORT WINAPI
333
# define ZEXPORTVA WINAPIV
335
# define ZEXPORTVA FAR CDECL
340
#if defined (__BEOS__)
342
# ifdef ZLIB_INTERNAL
343
# define ZEXPORT __declspec(dllexport)
344
# define ZEXPORTVA __declspec(dllexport)
346
# define ZEXPORT __declspec(dllimport)
347
# define ZEXPORTVA __declspec(dllimport)
353
# define ZEXTERN extern
366
#if !defined(__MACTYPES__)
367
typedef unsigned char Byte; /* 8 bits */
369
typedef unsigned int uInt; /* 16 bits or more */
370
typedef unsigned long uLong; /* 32 bits or more */
373
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
374
# define Bytef Byte FAR
376
typedef Byte FAR Bytef;
378
typedef char FAR charf;
379
typedef int FAR intf;
380
typedef uInt FAR uIntf;
381
typedef uLong FAR uLongf;
384
typedef void const *voidpc;
385
typedef void FAR *voidpf;
388
typedef Byte const *voidpc;
389
typedef Byte FAR *voidpf;
393
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
394
# define Z_HAVE_UNISTD_H
397
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
398
# define Z_HAVE_STDARG_H
403
# include <sys/types.h> /* for off_t */
407
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
408
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
409
* though the former does not conform to the LFS document), but considering
410
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
411
* equivalently requesting no 64-bit operations
413
#if -_LARGEFILE64_SOURCE - -1 == 1
414
# undef _LARGEFILE64_SOURCE
417
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
421
#if (defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE)) && !defined(Z_SOLO)
422
# include <unistd.h> /* for SEEK_* and off_t */
424
# include <unixio.h> /* for off_t */
427
# define z_off_t off_t
431
#if !defined(SEEK_SET) && !defined(Z_SOLO)
432
# define SEEK_SET 0 /* Seek from beginning of file. */
433
# define SEEK_CUR 1 /* Seek from current position. */
434
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
438
# define z_off_t long
441
#if !defined(_WIN32) && (defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0)
442
# define z_off64_t off64_t
445
# define z_off64_t __int64
447
# define z_off64_t z_off_t
451
/* MVS linker does not support external names larger than 8 bytes */
453
#pragma map(deflateInit_,"DEIN")
454
#pragma map(deflateInit2_,"DEIN2")
455
#pragma map(deflateEnd,"DEEND")
456
#pragma map(deflateBound,"DEBND")
457
#pragma map(inflateInit_,"ININ")
458
#pragma map(inflateInit2_,"ININ2")
459
#pragma map(inflateEnd,"INEND")
460
#pragma map(inflateSync,"INSY")
461
#pragma map(inflateSetDictionary,"INSEDI")
462
#pragma map(compressBound,"CMBND")
463
#pragma map(inflate_table,"INTABL")
464
#pragma map(inflate_fast,"INFA")
465
#pragma map(inflate_copyright,"INCOPY")