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
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 */
21
/* all linked symbols */
22
# define _dist_code z__dist_code
23
# define _length_code z__length_code
24
# define _tr_align z__tr_align
25
# define _tr_flush_block z__tr_flush_block
26
# define _tr_init z__tr_init
27
# define _tr_stored_block z__tr_stored_block
28
# define _tr_tally z__tr_tally
29
# define adler32 z_adler32
30
# define adler32_combine z_adler32_combine
31
# define adler32_combine64 z_adler32_combine64
32
# define compress z_compress
33
# define compress2 z_compress2
34
# define compressBound z_compressBound
35
# define crc32 z_crc32
36
# define crc32_combine z_crc32_combine
37
# define crc32_combine64 z_crc32_combine64
38
# define deflate z_deflate
39
# define deflateBound z_deflateBound
40
# define deflateCopy z_deflateCopy
41
# define deflateEnd z_deflateEnd
42
# define deflateInit2_ z_deflateInit2_
43
# define deflateInit_ z_deflateInit_
44
# define deflateParams z_deflateParams
45
# define deflatePrime z_deflatePrime
46
# define deflateReset z_deflateReset
47
# define deflateSetDictionary z_deflateSetDictionary
48
# define deflateSetHeader z_deflateSetHeader
49
# define deflateTune z_deflateTune
50
# define deflate_copyright z_deflate_copyright
51
# define get_crc_table z_get_crc_table
52
# define gz_error z_gz_error
53
# define gz_intmax z_gz_intmax
54
# define gz_strwinerror z_gz_strwinerror
55
# define gzbuffer z_gzbuffer
56
# define gzclearerr z_gzclearerr
57
# define gzclose z_gzclose
58
# define gzclose_r z_gzclose_r
59
# define gzclose_w z_gzclose_w
60
# define gzdirect z_gzdirect
61
# define gzdopen z_gzdopen
62
# define gzeof z_gzeof
63
# define gzerror z_gzerror
64
# define gzflush z_gzflush
65
# define gzgetc z_gzgetc
66
# define gzgets z_gzgets
67
# define gzoffset z_gzoffset
68
# define gzoffset64 z_gzoffset64
69
# define gzopen z_gzopen
70
# define gzopen64 z_gzopen64
71
# define gzprintf z_gzprintf
72
# define gzputc z_gzputc
73
# define gzputs z_gzputs
74
# define gzread z_gzread
75
# define gzrewind z_gzrewind
76
# define gzseek z_gzseek
77
# define gzseek64 z_gzseek64
78
# define gzsetparams z_gzsetparams
79
# define gztell z_gztell
80
# define gztell64 z_gztell64
81
# define gzungetc z_gzungetc
82
# define gzwrite z_gzwrite
83
# define inflate z_inflate
84
# define inflateBack z_inflateBack
85
# define inflateBackEnd z_inflateBackEnd
86
# define inflateBackInit_ z_inflateBackInit_
87
# define inflateCopy z_inflateCopy
88
# define inflateEnd z_inflateEnd
89
# define inflateGetHeader z_inflateGetHeader
90
# define inflateInit2_ z_inflateInit2_
91
# define inflateInit_ z_inflateInit_
92
# define inflateMark z_inflateMark
93
# define inflatePrime z_inflatePrime
94
# define inflateReset z_inflateReset
95
# define inflateReset2 z_inflateReset2
96
# define inflateSetDictionary z_inflateSetDictionary
97
# define inflateSync z_inflateSync
98
# define inflateSyncPoint z_inflateSyncPoint
99
# define inflateUndermine z_inflateUndermine
100
# define inflate_copyright z_inflate_copyright
101
# define inflate_fast z_inflate_fast
102
# define inflate_table z_inflate_table
103
# define uncompress z_uncompress
104
# define zError z_zError
105
# define zcalloc z_zcalloc
106
# define zcfree z_zcfree
107
# define zlibCompileFlags z_zlibCompileFlags
108
# define zlibVersion z_zlibVersion
110
/* all zlib typedefs in zlib.h and zconf.h */
112
# define Bytef z_Bytef
113
# define alloc_func z_alloc_func
114
# define charf z_charf
115
# define free_func z_free_func
116
# define gzFile z_gzFile
117
# define gz_header z_gz_header
118
# define gz_headerp z_gz_headerp
119
# define in_func z_in_func
121
# define out_func z_out_func
123
# define uIntf z_uIntf
124
# define uLong z_uLong
125
# define uLongf z_uLongf
126
# define voidp z_voidp
127
# define voidpc z_voidpc
128
# define voidpf z_voidpf
130
/* all zlib structs in zlib.h and zconf.h */
131
# define gz_header_s z_gz_header_s
132
# define internal_state z_internal_state
136
#if defined(__MSDOS__) && !defined(MSDOS)
139
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
142
#if defined(_WINDOWS) && !defined(WINDOWS)
145
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
150
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
151
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
159
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
160
* than 64k bytes at a time (needed on systems with 16-bit int).
166
# define UNALIGNED_OK
169
#ifdef __STDC_VERSION__
173
# if __STDC_VERSION__ >= 199901L
179
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
182
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
185
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
188
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
192
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
197
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
198
# define const /* note: need a more gentle solution here */
202
/* Some Mac compilers merge all .h files incorrectly: */
203
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
204
# define NO_DUMMY_DECL
207
/* Maximum value for memLevel in deflateInit2 */
208
#ifndef MAX_MEM_LEVEL
210
# define MAX_MEM_LEVEL 8
212
# define MAX_MEM_LEVEL 9
216
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
217
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
218
* created by gzip. (Files created by minigzip can still be extracted by
222
# define MAX_WBITS 15 /* 32K LZ77 window */
225
/* The memory requirements for deflate are (in bytes):
226
(1 << (windowBits+2)) + (1 << (memLevel+9))
227
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
228
plus a few kilobytes for small objects. For example, if you want to reduce
229
the default memory requirements from 256K to 128K, compile with
230
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
231
Of course this will generally degrade compression (there's no free lunch).
233
The memory requirements for inflate are (in bytes) 1 << windowBits
234
that is, 32K for windowBits=15 (default value) plus a few kilobytes
238
/* Type declarations */
240
#ifndef OF /* function prototypes */
242
# define OF(args) args
248
/* The following definitions for FAR are needed only for MSDOS mixed
249
* model programming (small or medium model with some far allocations).
250
* This was tested only with MSC; for other MSDOS compilers you may have
251
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
252
* just define FAR to be empty.
255
# if defined(M_I86SM) || defined(M_I86MM)
256
/* MSC small or medium model */
257
# define SMALL_MEDIUM
264
# if (defined(__SMALL__) || defined(__MEDIUM__))
265
/* Turbo C small or medium model */
266
# define SMALL_MEDIUM
275
#if defined(WINDOWS) || defined(WIN32)
276
/* If building or using zlib as a DLL, define ZLIB_DLL.
277
* This is not mandatory, but it offers a little performance increase.
280
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
281
# ifdef ZLIB_INTERNAL
282
# define ZEXTERN extern __declspec(dllexport)
284
# define ZEXTERN extern __declspec(dllimport)
287
# endif /* ZLIB_DLL */
288
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
289
* define ZLIB_WINAPI.
290
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
296
# include <windows.h>
297
/* No need for _export, use ZLIB.DEF instead. */
298
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
299
# define ZEXPORT WINAPI
301
# define ZEXPORTVA WINAPIV
303
# define ZEXPORTVA FAR CDECL
308
#if defined (__BEOS__)
310
# ifdef ZLIB_INTERNAL
311
# define ZEXPORT __declspec(dllexport)
312
# define ZEXPORTVA __declspec(dllexport)
314
# define ZEXPORT __declspec(dllimport)
315
# define ZEXPORTVA __declspec(dllimport)
321
# define ZEXTERN extern
334
#if !defined(__MACTYPES__)
335
typedef unsigned char Byte; /* 8 bits */
337
typedef unsigned int uInt; /* 16 bits or more */
338
typedef unsigned long uLong; /* 32 bits or more */
341
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
342
# define Bytef Byte FAR
344
typedef Byte FAR Bytef;
346
typedef char FAR charf;
347
typedef int FAR intf;
348
typedef uInt FAR uIntf;
349
typedef uLong FAR uLongf;
352
typedef void const *voidpc;
353
typedef void FAR *voidpf;
356
typedef Byte const *voidpc;
357
typedef Byte FAR *voidpf;
361
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
362
# define Z_HAVE_UNISTD_H
366
# include <sys/types.h> /* for off_t */
369
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
370
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
371
* though the former does not conform to the LFS document), but considering
372
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
373
* equivalently requesting no 64-bit operations
375
#if -_LARGEFILE64_SOURCE - -1 == 1
376
# undef _LARGEFILE64_SOURCE
379
#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
380
# include <unistd.h> /* for SEEK_* and off_t */
382
# include <unixio.h> /* for off_t */
385
# define z_off_t off_t
390
# define SEEK_SET 0 /* Seek from beginning of file. */
391
# define SEEK_CUR 1 /* Seek from current position. */
392
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
396
# define z_off_t long
399
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
400
# define z_off64_t off64_t
402
# define z_off64_t z_off_t
405
#if defined(__OS400__)
406
# define NO_vsnprintf
410
# define NO_vsnprintf
413
/* MVS linker does not support external names larger than 8 bytes */
415
#pragma map(deflateInit_,"DEIN")
416
#pragma map(deflateInit2_,"DEIN2")
417
#pragma map(deflateEnd,"DEEND")
418
#pragma map(deflateBound,"DEBND")
419
#pragma map(inflateInit_,"ININ")
420
#pragma map(inflateInit2_,"ININ2")
421
#pragma map(inflateEnd,"INEND")
422
#pragma map(inflateSync,"INSY")
423
#pragma map(inflateSetDictionary,"INSEDI")
424
#pragma map(compressBound,"CMBND")
425
#pragma map(inflate_table,"INTABL")
426
#pragma map(inflate_fast,"INFA")
427
#pragma map(inflate_copyright,"INCOPY")