zconf.h
Go to the documentation of this file.
1 /* zconf.h -- configuration of the zlib compression library
2  * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
3  * For conditions of distribution and use, see copyright notice in zlib.h
4  */
5 
6 /* @(#) $Id$ */
7 
8 #ifndef ZCONF_H
9 #define ZCONF_H
10 #define Z_PREFIX
11 #define Z_HAVE_UNISTD_H
12 
13 /*
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".
18  */
19 #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
20 # define Z_PREFIX_SET
21 
22 /* all linked symbols and init macros */
23 # define _dist_code vtkzlib__dist_code
24 # define _length_code vtkzlib__length_code
25 # define _tr_align vtkzlib__tr_align
26 # define _tr_flush_bits vtkzlib__tr_flush_bits
27 # define _tr_flush_block vtkzlib__tr_flush_block
28 # define _tr_init vtkzlib__tr_init
29 # define _tr_stored_block vtkzlib__tr_stored_block
30 # define _tr_tally vtkzlib__tr_tally
31 # define adler32 vtkzlib_adler32
32 # define adler32_combine vtkzlib_adler32_combine
33 # define adler32_combine64 vtkzlib_adler32_combine64
34 # define adler32_z vtkzlib_adler32_z
35 # ifndef Z_SOLO
36 # define compress vtkzlib_compress
37 # define compress2 vtkzlib_compress2
38 # define compressBound vtkzlib_compressBound
39 # endif
40 # define crc32 vtkzlib_crc32
41 # define crc32_combine vtkzlib_crc32_combine
42 # define crc32_combine64 vtkzlib_crc32_combine64
43 # define crc32_combine_gen vtkzlib_crc32_combine_gen
44 # define crc32_combine_gen64 vtkzlib_crc32_combine_gen64
45 # define crc32_combine_op vtkzlib_crc32_combine_op
46 # define crc32_z vtkzlib_crc32_z
47 # define deflate vtkzlib_deflate
48 # define deflateBound vtkzlib_deflateBound
49 # define deflateCopy vtkzlib_deflateCopy
50 # define deflateEnd vtkzlib_deflateEnd
51 # define deflateGetDictionary vtkzlib_deflateGetDictionary
52 # define deflateInit vtkzlib_deflateInit
53 # define deflateInit2 vtkzlib_deflateInit2
54 # define deflateInit2_ vtkzlib_deflateInit2_
55 # define deflateInit_ vtkzlib_deflateInit_
56 # define deflateParams vtkzlib_deflateParams
57 # define deflatePending vtkzlib_deflatePending
58 # define deflatePrime vtkzlib_deflatePrime
59 # define deflateReset vtkzlib_deflateReset
60 # define deflateResetKeep vtkzlib_deflateResetKeep
61 # define deflateSetDictionary vtkzlib_deflateSetDictionary
62 # define deflateSetHeader vtkzlib_deflateSetHeader
63 # define deflateTune vtkzlib_deflateTune
64 # define deflate_copyright vtkzlib_deflate_copyright
65 # define get_crc_table vtkzlib_get_crc_table
66 # ifndef Z_SOLO
67 # define gz_error vtkzlib_gz_error
68 # define gz_intmax vtkzlib_gz_intmax
69 # define gz_strwinerror vtkzlib_gz_strwinerror
70 # define gzbuffer vtkzlib_gzbuffer
71 # define gzclearerr vtkzlib_gzclearerr
72 # define gzclose vtkzlib_gzclose
73 # define gzclose_r vtkzlib_gzclose_r
74 # define gzclose_w vtkzlib_gzclose_w
75 # define gzdirect vtkzlib_gzdirect
76 # define gzdopen vtkzlib_gzdopen
77 # define gzeof vtkzlib_gzeof
78 # define gzerror vtkzlib_gzerror
79 # define gzflush vtkzlib_gzflush
80 # define gzfread vtkzlib_gzfread
81 # define gzfwrite vtkzlib_gzfwrite
82 # define gzgetc vtkzlib_gzgetc
83 # define gzgetc_ vtkzlib_gzgetc_
84 # define gzgets vtkzlib_gzgets
85 # define gzoffset vtkzlib_gzoffset
86 # define gzoffset64 vtkzlib_gzoffset64
87 # define gzopen vtkzlib_gzopen
88 # define gzopen64 vtkzlib_gzopen64
89 # ifdef _WIN32
90 # define gzopen_w vtkzlib_gzopen_w
91 # endif
92 # define gzprintf vtkzlib_gzprintf
93 # define gzputc vtkzlib_gzputc
94 # define gzputs vtkzlib_gzputs
95 # define gzread vtkzlib_gzread
96 # define gzrewind vtkzlib_gzrewind
97 # define gzseek vtkzlib_gzseek
98 # define gzseek64 vtkzlib_gzseek64
99 # define gzsetparams vtkzlib_gzsetparams
100 # define gztell vtkzlib_gztell
101 # define gztell64 vtkzlib_gztell64
102 # define gzungetc vtkzlib_gzungetc
103 # define gzvprintf vtkzlib_gzvprintf
104 # define gzwrite vtkzlib_gzwrite
105 # endif
106 # define inflate vtkzlib_inflate
107 # define inflateBack vtkzlib_inflateBack
108 # define inflateBackEnd vtkzlib_inflateBackEnd
109 # define inflateBackInit vtkzlib_inflateBackInit
110 # define inflateBackInit_ vtkzlib_inflateBackInit_
111 # define inflateCodesUsed vtkzlib_inflateCodesUsed
112 # define inflateCopy vtkzlib_inflateCopy
113 # define inflateEnd vtkzlib_inflateEnd
114 # define inflateGetDictionary vtkzlib_inflateGetDictionary
115 # define inflateGetHeader vtkzlib_inflateGetHeader
116 # define inflateInit vtkzlib_inflateInit
117 # define inflateInit2 vtkzlib_inflateInit2
118 # define inflateInit2_ vtkzlib_inflateInit2_
119 # define inflateInit_ vtkzlib_inflateInit_
120 # define inflateMark vtkzlib_inflateMark
121 # define inflatePrime vtkzlib_inflatePrime
122 # define inflateReset vtkzlib_inflateReset
123 # define inflateReset2 vtkzlib_inflateReset2
124 # define inflateResetKeep vtkzlib_inflateResetKeep
125 # define inflateSetDictionary vtkzlib_inflateSetDictionary
126 # define inflateSync vtkzlib_inflateSync
127 # define inflateSyncPoint vtkzlib_inflateSyncPoint
128 # define inflateUndermine vtkzlib_inflateUndermine
129 # define inflateValidate vtkzlib_inflateValidate
130 # define inflate_copyright vtkzlib_inflate_copyright
131 # define inflate_fast vtkzlib_inflate_fast
132 # define inflate_table vtkzlib_inflate_table
133 # ifndef Z_SOLO
134 # define uncompress vtkzlib_uncompress
135 # define uncompress2 vtkzlib_uncompress2
136 # endif
137 # define zError vtkzlib_zError
138 # ifndef Z_SOLO
139 # define zcalloc vtkzlib_zcalloc
140 # define zcfree vtkzlib_zcfree
141 # endif
142 # define zlibCompileFlags vtkzlib_zlibCompileFlags
143 # define zlibVersion vtkzlib_zlibVersion
144 
145 /* all zlib typedefs in zlib.h and zconf.h */
146 # define Byte vtkzlib_Byte
147 # define Bytef vtkzlib_Bytef
148 # define alloc_func vtkzlib_alloc_func
149 # define charf vtkzlib_charf
150 # define free_func vtkzlib_free_func
151 # ifndef Z_SOLO
152 # define gzFile vtkzlib_gzFile
153 # endif
154 # define gz_header vtkzlib_gz_header
155 # define gz_headerp vtkzlib_gz_headerp
156 # define in_func vtkzlib_in_func
157 # define intf vtkzlib_intf
158 # define out_func vtkzlib_out_func
159 # define uInt vtkzlib_uInt
160 # define uIntf vtkzlib_uIntf
161 # define uLong vtkzlib_uLong
162 # define uLongf vtkzlib_uLongf
163 # define voidp vtkzlib_voidp
164 # define voidpc vtkzlib_voidpc
165 # define voidpf vtkzlib_voidpf
166 
167 /* all zlib structs in zlib.h and zconf.h */
168 # define gz_header_s vtkzlib_gz_header_s
169 # define internal_state vtkzlib_internal_state
170 
171 /* all zlib structs in zutil.h */
172 # define z_errmsg vtkzlib_z_errmsg
173 
174 #endif
175 
176 #if defined(__MSDOS__) && !defined(MSDOS)
177 # define MSDOS
178 #endif
179 #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
180 # define OS2
181 #endif
182 #if defined(_WINDOWS) && !defined(WINDOWS)
183 # define WINDOWS
184 #endif
185 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
186 # ifndef WIN32
187 # define WIN32
188 # endif
189 #endif
190 #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
191 # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
192 # ifndef SYS16BIT
193 # define SYS16BIT
194 # endif
195 # endif
196 #endif
197 
198 /*
199  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
200  * than 64k bytes at a time (needed on systems with 16-bit int).
201  */
202 #ifdef SYS16BIT
203 # define MAXSEG_64K
204 #endif
205 #ifdef MSDOS
206 # define UNALIGNED_OK
207 #endif
208 
209 #ifdef __STDC_VERSION__
210 # ifndef STDC
211 # define STDC
212 # endif
213 # if __STDC_VERSION__ >= 199901L
214 # ifndef STDC99
215 # define STDC99
216 # endif
217 # endif
218 #endif
219 #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
220 # define STDC
221 #endif
222 #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
223 # define STDC
224 #endif
225 #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
226 # define STDC
227 #endif
228 #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
229 # define STDC
230 #endif
231 
232 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
233 # define STDC
234 #endif
235 
236 #ifndef STDC
237 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
238 # define const /* note: need a more gentle solution here */
239 # endif
240 #endif
241 
242 #if defined(ZLIB_CONST) && !defined(z_const)
243 # define z_const const
244 #else
245 # define z_const
246 #endif
247 
248 #ifdef Z_SOLO
249  typedef unsigned long z_size_t;
250 #else
251 # define z_longlong long long
252 # if defined(NO_SIZE_T)
253  typedef unsigned NO_SIZE_T z_size_t;
254 # elif defined(STDC)
255 # include <stddef.h>
256  typedef size_t z_size_t;
257 # else
258  typedef unsigned long z_size_t;
259 # endif
260 # undef z_longlong
261 #endif
262 
263 /* Maximum value for memLevel in deflateInit2 */
264 #ifndef MAX_MEM_LEVEL
265 # ifdef MAXSEG_64K
266 # define MAX_MEM_LEVEL 8
267 # else
268 # define MAX_MEM_LEVEL 9
269 # endif
270 #endif
271 
272 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
273  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
274  * created by gzip. (Files created by minigzip can still be extracted by
275  * gzip.)
276  */
277 #ifndef MAX_WBITS
278 # define MAX_WBITS 15 /* 32K LZ77 window */
279 #endif
280 
281 /* The memory requirements for deflate are (in bytes):
282  (1 << (windowBits+2)) + (1 << (memLevel+9))
283  that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
284  plus a few kilobytes for small objects. For example, if you want to reduce
285  the default memory requirements from 256K to 128K, compile with
286  make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
287  Of course this will generally degrade compression (there's no free lunch).
288 
289  The memory requirements for inflate are (in bytes) 1 << windowBits
290  that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
291  for small objects.
292 */
293 
294  /* Type declarations */
295 
296 #ifndef OF /* function prototypes */
297 # ifdef STDC
298 # define OF(args) args
299 # else
300 # define OF(args) ()
301 # endif
302 #endif
303 
304 #ifndef Z_ARG /* function prototypes for stdarg */
305 # if defined(STDC) || defined(Z_HAVE_STDARG_H)
306 # define Z_ARG(args) args
307 # else
308 # define Z_ARG(args) ()
309 # endif
310 #endif
311 
312 /* The following definitions for FAR are needed only for MSDOS mixed
313  * model programming (small or medium model with some far allocations).
314  * This was tested only with MSC; for other MSDOS compilers you may have
315  * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
316  * just define FAR to be empty.
317  */
318 #ifdef SYS16BIT
319 # if defined(M_I86SM) || defined(M_I86MM)
320  /* MSC small or medium model */
321 # define SMALL_MEDIUM
322 # ifdef _MSC_VER
323 # define FAR _far
324 # else
325 # define FAR far
326 # endif
327 # endif
328 # if (defined(__SMALL__) || defined(__MEDIUM__))
329  /* Turbo C small or medium model */
330 # define SMALL_MEDIUM
331 # ifdef __BORLANDC__
332 # define FAR _far
333 # else
334 # define FAR far
335 # endif
336 # endif
337 #endif
338 
339 #if defined(WINDOWS) || defined(WIN32)
340  /* If building or using zlib as a DLL, define ZLIB_DLL.
341  * This is not mandatory, but it offers a little performance increase.
342  */
343 # ifdef ZLIB_DLL
344 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
345 # ifdef ZLIB_INTERNAL
346 # define ZEXTERN extern __declspec(dllexport)
347 # else
348 # define ZEXTERN extern __declspec(dllimport)
349 # endif
350 # endif
351 # endif /* ZLIB_DLL */
352  /* If building or using zlib with the WINAPI/WINAPIV calling convention,
353  * define ZLIB_WINAPI.
354  * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
355  */
356 # ifdef ZLIB_WINAPI
357 # ifdef FAR
358 # undef FAR
359 # endif
360 # include <windows.h>
361  /* No need for _export, use ZLIB.DEF instead. */
362  /* For complete Windows compatibility, use WINAPI, not __stdcall. */
363 # define ZEXPORT WINAPI
364 # ifdef WIN32
365 # define ZEXPORTVA WINAPIV
366 # else
367 # define ZEXPORTVA FAR CDECL
368 # endif
369 # endif
370 #endif
371 
372 #if defined (__BEOS__)
373 # ifdef ZLIB_DLL
374 # ifdef ZLIB_INTERNAL
375 # define ZEXPORT __declspec(dllexport)
376 # define ZEXPORTVA __declspec(dllexport)
377 # else
378 # define ZEXPORT __declspec(dllimport)
379 # define ZEXPORTVA __declspec(dllimport)
380 # endif
381 # endif
382 #endif
383 
384 #ifndef ZEXTERN
385 # define ZEXTERN extern
386 #endif
387 #ifndef ZEXPORT
388 # define ZEXPORT
389 #endif
390 #ifndef ZEXPORTVA
391 # define ZEXPORTVA
392 #endif
393 
394 #ifndef FAR
395 # define FAR
396 #endif
397 
398 #if !defined(__MACTYPES__)
399 typedef unsigned char Byte; /* 8 bits */
400 #endif
401 typedef unsigned int uInt; /* 16 bits or more */
402 typedef unsigned long uLong; /* 32 bits or more */
403 
404 #ifdef SMALL_MEDIUM
405  /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
406 # define Bytef Byte FAR
407 #else
408  typedef Byte FAR Bytef;
409 #endif
410 typedef char FAR charf;
411 typedef int FAR intf;
412 typedef uInt FAR uIntf;
413 typedef uLong FAR uLongf;
414 
415 #ifdef STDC
416  typedef void const *voidpc;
417  typedef void FAR *voidpf;
418  typedef void *voidp;
419 #else
420  typedef Byte const *voidpc;
421  typedef Byte FAR *voidpf;
422  typedef Byte *voidp;
423 #endif
424 
425 #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
426 # include <limits.h>
427 # if (UINT_MAX == 0xffffffffUL)
428 # define Z_U4 unsigned
429 # elif (ULONG_MAX == 0xffffffffUL)
430 # define Z_U4 unsigned long
431 # elif (USHRT_MAX == 0xffffffffUL)
432 # define Z_U4 unsigned short
433 # endif
434 #endif
435 
436 #ifdef Z_U4
437  typedef Z_U4 z_crc_t;
438 #else
439  typedef unsigned long z_crc_t;
440 #endif
441 
442 #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
443 # define Z_HAVE_UNISTD_H
444 #endif
445 
446 #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
447 # define Z_HAVE_STDARG_H
448 #endif
449 
450 #ifdef STDC
451 # ifndef Z_SOLO
452 # include <sys/types.h> /* for off_t */
453 # endif
454 #endif
455 
456 #if defined(STDC) || defined(Z_HAVE_STDARG_H)
457 # ifndef Z_SOLO
458 # include <stdarg.h> /* for va_list */
459 # endif
460 #endif
461 
462 #ifdef _WIN32
463 # ifndef Z_SOLO
464 # include <stddef.h> /* for wchar_t */
465 # endif
466 #endif
467 
468 /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
469  * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
470  * though the former does not conform to the LFS document), but considering
471  * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
472  * equivalently requesting no 64-bit operations
473  */
474 #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
475 # undef _LARGEFILE64_SOURCE
476 #endif
477 
478 #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
479 # define Z_HAVE_UNISTD_H
480 #endif
481 #ifndef Z_SOLO
482 # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
483 # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
484 # ifdef VMS
485 # include <unixio.h> /* for off_t */
486 # endif
487 # ifndef z_off_t
488 # define z_off_t off_t
489 # endif
490 # endif
491 #endif
492 
493 #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
494 # define Z_LFS64
495 #endif
496 
497 #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
498 # define Z_LARGE64
499 #endif
500 
501 #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
502 # define Z_WANT64
503 #endif
504 
505 #if !defined(SEEK_SET) && !defined(Z_SOLO)
506 # define SEEK_SET 0 /* Seek from beginning of file. */
507 # define SEEK_CUR 1 /* Seek from current position. */
508 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
509 #endif
510 
511 #ifndef z_off_t
512 # define z_off_t long
513 #endif
514 
515 #if !defined(_WIN32) && defined(Z_LARGE64)
516 # define z_off64_t off64_t
517 #else
518 # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
519 # define z_off64_t __int64
520 # else
521 # define z_off64_t z_off_t
522 # endif
523 #endif
524 
525 /* MVS linker does not support external names larger than 8 bytes */
526 #if defined(__MVS__)
527  #pragma map(deflateInit_,"DEIN")
528  #pragma map(deflateInit2_,"DEIN2")
529  #pragma map(deflateEnd,"DEEND")
530  #pragma map(deflateBound,"DEBND")
531  #pragma map(inflateInit_,"ININ")
532  #pragma map(inflateInit2_,"ININ2")
533  #pragma map(inflateEnd,"INEND")
534  #pragma map(inflateSync,"INSY")
535  #pragma map(inflateSetDictionary,"INSEDI")
536  #pragma map(compressBound,"CMBND")
537  #pragma map(inflate_table,"INTABL")
538  #pragma map(inflate_fast,"INFA")
539  #pragma map(inflate_copyright,"INCOPY")
540 #endif
541 
542 #endif /* ZCONF_H */
unsigned long z_size_t
Definition: zconf.h:258
unsigned long z_crc_t
Definition: zconf.h:439
#define intf
Definition: zconf.h:157
#define voidpf
Definition: zconf.h:165
unsigned char Byte
Definition: zconf.h:399
#define Bytef
Definition: zconf.h:147
unsigned long uLong
Definition: zconf.h:402
#define voidp
Definition: zconf.h:163
#define charf
Definition: zconf.h:149
#define uLongf
Definition: zconf.h:162
#define Byte
Definition: zconf.h:146
#define uLong
Definition: zconf.h:161
#define voidpc
Definition: zconf.h:164
#define uInt
Definition: zconf.h:159
#define FAR
Definition: zconf.h:395
#define uIntf
Definition: zconf.h:160
unsigned int uInt
Definition: zconf.h:401