1
/* zconf.h -- configuration of the zlib compression library
2
* Copyright (C) 1995-2013 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_bits z__tr_flush_bits
27
# define _tr_flush_block z__tr_flush_block
28
# define _tr_init z__tr_init
29
# define _tr_stored_block z__tr_stored_block
30
# define _tr_tally z__tr_tally
31
# define adler32 z_adler32
32
# define adler32_combine z_adler32_combine
33
# define adler32_combine64 z_adler32_combine64
35
# define compress z_compress
36
# define compress2 z_compress2
37
# define compressBound z_compressBound
39
# define crc32 z_crc32
40
# define crc32_combine z_crc32_combine
41
# define crc32_combine64 z_crc32_combine64
42
# define deflate z_deflate
43
# define deflateBound z_deflateBound
44
# define deflateCopy z_deflateCopy
45
# define deflateEnd z_deflateEnd
46
# define deflateInit2_ z_deflateInit2_
47
# define deflateInit_ z_deflateInit_
48
# define deflateParams z_deflateParams
49
# define deflatePending z_deflatePending
50
# define deflatePrime z_deflatePrime
51
# define deflateReset z_deflateReset
52
# define deflateResetKeep z_deflateResetKeep
53
# define deflateSetDictionary z_deflateSetDictionary
54
# define deflateSetHeader z_deflateSetHeader
55
# define deflateTune z_deflateTune
56
# define deflate_copyright z_deflate_copyright
57
# define get_crc_table z_get_crc_table
59
# define gz_error z_gz_error
60
# define gz_intmax z_gz_intmax
61
# define gz_strwinerror z_gz_strwinerror
62
# define gzbuffer z_gzbuffer
63
# define gzclearerr z_gzclearerr
64
# define gzclose z_gzclose
65
# define gzclose_r z_gzclose_r
66
# define gzclose_w z_gzclose_w
67
# define gzdirect z_gzdirect
68
# define gzdopen z_gzdopen
69
# define gzeof z_gzeof
70
# define gzerror z_gzerror
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
80
# define gzopen_w z_gzopen_w
82
# define gzprintf z_gzprintf
83
# define gzvprintf z_gzvprintf
84
# define gzputc z_gzputc
85
# define gzputs z_gzputs
86
# define gzread z_gzread
87
# define gzrewind z_gzrewind
88
# define gzseek z_gzseek
89
# define gzseek64 z_gzseek64
90
# define gzsetparams z_gzsetparams
91
# define gztell z_gztell
92
# define gztell64 z_gztell64
93
# define gzungetc z_gzungetc
94
# define gzwrite z_gzwrite
96
# define inflate z_inflate
97
# define inflateBack z_inflateBack
98
# define inflateBackEnd z_inflateBackEnd
99
# define inflateBackInit_ z_inflateBackInit_
100
# define inflateCopy z_inflateCopy
101
# define inflateEnd z_inflateEnd
102
# define inflateGetHeader z_inflateGetHeader
103
# define inflateInit2_ z_inflateInit2_
104
# define inflateInit_ z_inflateInit_
105
# define inflateMark z_inflateMark
106
# define inflatePrime z_inflatePrime
107
# define inflateReset z_inflateReset
108
# define inflateReset2 z_inflateReset2
109
# define inflateSetDictionary z_inflateSetDictionary
110
# define inflateGetDictionary z_inflateGetDictionary
111
# define inflateSync z_inflateSync
112
# define inflateSyncPoint z_inflateSyncPoint
113
# define inflateUndermine z_inflateUndermine
114
# define inflateResetKeep z_inflateResetKeep
115
# define inflate_copyright z_inflate_copyright
116
# define inflate_fast z_inflate_fast
117
# define inflate_table z_inflate_table
119
# define uncompress z_uncompress
121
# define zError z_zError
123
# define zcalloc z_zcalloc
124
# define zcfree z_zcfree
126
# define zlibCompileFlags z_zlibCompileFlags
127
# define zlibVersion z_zlibVersion
129
/* all zlib typedefs in zlib.h and zconf.h */
131
# define Bytef z_Bytef
132
# define alloc_func z_alloc_func
133
# define charf z_charf
134
# define free_func z_free_func
136
# define gzFile z_gzFile
138
# define gz_header z_gz_header
139
# define gz_headerp z_gz_headerp
140
# define in_func z_in_func
142
# define out_func z_out_func
144
# define uIntf z_uIntf
145
# define uLong z_uLong
146
# define uLongf z_uLongf
147
# define voidp z_voidp
148
# define voidpc z_voidpc
149
# define voidpf z_voidpf
151
/* all zlib structs in zlib.h and zconf.h */
152
# define gz_header_s z_gz_header_s
153
# define internal_state z_internal_state
157
#if defined(__MSDOS__) && !defined(MSDOS)
160
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
163
#if defined(_WINDOWS) && !defined(WINDOWS)
166
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
171
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
172
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
180
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
181
* than 64k bytes at a time (needed on systems with 16-bit int).
187
# define UNALIGNED_OK
190
#ifdef __STDC_VERSION__
194
# if __STDC_VERSION__ >= 199901L
200
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
203
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
206
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
209
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
213
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
218
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
219
# define const /* note: need a more gentle solution here */
223
#if defined(ZLIB_CONST) && !defined(z_const)
224
# define z_const const
229
/* Some Mac compilers merge all .h files incorrectly: */
230
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
231
# define NO_DUMMY_DECL
234
/* Maximum value for memLevel in deflateInit2 */
235
#ifndef MAX_MEM_LEVEL
237
# define MAX_MEM_LEVEL 8
239
# define MAX_MEM_LEVEL 9
243
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
244
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
245
* created by gzip. (Files created by minigzip can still be extracted by
249
# define MAX_WBITS 15 /* 32K LZ77 window */
252
/* The memory requirements for deflate are (in bytes):
253
(1 << (windowBits+2)) + (1 << (memLevel+9))
254
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
255
plus a few kilobytes for small objects. For example, if you want to reduce
256
the default memory requirements from 256K to 128K, compile with
257
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
258
Of course this will generally degrade compression (there's no free lunch).
260
The memory requirements for inflate are (in bytes) 1 << windowBits
261
that is, 32K for windowBits=15 (default value) plus a few kilobytes
265
/* Type declarations */
267
#ifndef OF /* function prototypes */
269
# define OF(args) args
275
#ifndef Z_ARG /* function prototypes for stdarg */
276
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
277
# define Z_ARG(args) args
279
# define Z_ARG(args) ()
283
/* The following definitions for FAR are needed only for MSDOS mixed
284
* model programming (small or medium model with some far allocations).
285
* This was tested only with MSC; for other MSDOS compilers you may have
286
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
287
* just define FAR to be empty.
290
# if defined(M_I86SM) || defined(M_I86MM)
291
/* MSC small or medium model */
292
# define SMALL_MEDIUM
299
# if (defined(__SMALL__) || defined(__MEDIUM__))
300
/* Turbo C small or medium model */
301
# define SMALL_MEDIUM
310
#if defined(WINDOWS) || defined(WIN32)
311
/* If building or using zlib as a DLL, define ZLIB_DLL.
312
* This is not mandatory, but it offers a little performance increase.
315
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
316
# ifdef ZLIB_INTERNAL
317
# define ZEXTERN extern __declspec(dllexport)
319
# define ZEXTERN extern __declspec(dllimport)
322
# endif /* ZLIB_DLL */
323
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
324
* define ZLIB_WINAPI.
325
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
331
# include <windows.h>
332
/* No need for _export, use ZLIB.DEF instead. */
333
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
334
# define ZEXPORT WINAPI
336
# define ZEXPORTVA WINAPIV
338
# define ZEXPORTVA FAR CDECL
343
#if defined (__BEOS__)
345
# ifdef ZLIB_INTERNAL
346
# define ZEXPORT __declspec(dllexport)
347
# define ZEXPORTVA __declspec(dllexport)
349
# define ZEXPORT __declspec(dllimport)
350
# define ZEXPORTVA __declspec(dllimport)
356
# define ZEXTERN extern
369
#if !defined(__MACTYPES__)
370
typedef unsigned char Byte; /* 8 bits */
372
typedef unsigned int uInt; /* 16 bits or more */
373
typedef unsigned long uLong; /* 32 bits or more */
376
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
377
# define Bytef Byte FAR
379
typedef Byte FAR Bytef;
381
typedef char FAR charf;
382
typedef int FAR intf;
383
typedef uInt FAR uIntf;
384
typedef uLong FAR uLongf;
387
typedef void const *voidpc;
388
typedef void FAR *voidpf;
391
typedef Byte const *voidpc;
392
typedef Byte FAR *voidpf;
396
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
398
# if (UINT_MAX == 0xffffffffUL)
399
# define Z_U4 unsigned
400
# elif (ULONG_MAX == 0xffffffffUL)
401
# define Z_U4 unsigned long
402
# elif (USHRT_MAX == 0xffffffffUL)
403
# define Z_U4 unsigned short
408
typedef Z_U4 z_crc_t;
410
typedef unsigned long z_crc_t;
413
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
414
# define Z_HAVE_UNISTD_H
417
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
418
# define Z_HAVE_STDARG_H
423
# include <sys/types.h> /* for off_t */
427
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
429
# include <stdarg.h> /* for va_list */
435
# include <stddef.h> /* for wchar_t */
439
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
440
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
441
* though the former does not conform to the LFS document), but considering
442
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
443
* equivalently requesting no 64-bit operations
445
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
446
# undef _LARGEFILE64_SOURCE
449
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
450
# define Z_HAVE_UNISTD_H
453
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
454
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
456
# include <unixio.h> /* for off_t */
459
# define z_off_t off_t
464
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
467
# define _LFS64_LARGEFILE 0
470
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
474
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
478
#if !defined(SEEK_SET) && !defined(Z_SOLO)
479
# define SEEK_SET 0 /* Seek from beginning of file. */
480
# define SEEK_CUR 1 /* Seek from current position. */
481
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
485
# define z_off_t long
488
#if !defined(_WIN32) && defined(Z_LARGE64)
489
# define z_off64_t off64_t
491
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
492
# define z_off64_t __int64
494
# define z_off64_t z_off_t
498
/* MVS linker does not support external names larger than 8 bytes */
500
#pragma map(deflateInit_,"DEIN")
501
#pragma map(deflateInit2_,"DEIN2")
502
#pragma map(deflateEnd,"DEEND")
503
#pragma map(deflateBound,"DEBND")
504
#pragma map(inflateInit_,"ININ")
505
#pragma map(inflateInit2_,"ININ2")
506
#pragma map(inflateEnd,"INEND")
507
#pragma map(inflateSync,"INSY")
508
#pragma map(inflateSetDictionary,"INSEDI")
509
#pragma map(compressBound,"CMBND")
510
#pragma map(inflate_table,"INTABL")
511
#pragma map(inflate_fast,"INFA")
512
#pragma map(inflate_copyright,"INCOPY")