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 # ifndef WIN32_LEAN_AND_MEAN
361 # define WIN32_LEAN_AND_MEAN
362 # endif
363 # include <windows.h>
364  /* No need for _export, use ZLIB.DEF instead. */
365  /* For complete Windows compatibility, use WINAPI, not __stdcall. */
366 # define ZEXPORT WINAPI
367 # ifdef WIN32
368 # define ZEXPORTVA WINAPIV
369 # else
370 # define ZEXPORTVA FAR CDECL
371 # endif
372 # endif
373 #endif
374 
375 #if defined (__BEOS__)
376 # ifdef ZLIB_DLL
377 # ifdef ZLIB_INTERNAL
378 # define ZEXPORT __declspec(dllexport)
379 # define ZEXPORTVA __declspec(dllexport)
380 # else
381 # define ZEXPORT __declspec(dllimport)
382 # define ZEXPORTVA __declspec(dllimport)
383 # endif
384 # endif
385 #endif
386 
387 #ifndef ZEXTERN
388 # define ZEXTERN extern
389 #endif
390 #ifndef ZEXPORT
391 # define ZEXPORT
392 #endif
393 #ifndef ZEXPORTVA
394 # define ZEXPORTVA
395 #endif
396 
397 #ifndef FAR
398 # define FAR
399 #endif
400 
401 #if !defined(__MACTYPES__)
402 typedef unsigned char Byte; /* 8 bits */
403 #endif
404 typedef unsigned int uInt; /* 16 bits or more */
405 typedef unsigned long uLong; /* 32 bits or more */
406 
407 #ifdef SMALL_MEDIUM
408  /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
409 # define Bytef Byte FAR
410 #else
411  typedef Byte FAR Bytef;
412 #endif
413 typedef char FAR charf;
414 typedef int FAR intf;
415 typedef uInt FAR uIntf;
416 typedef uLong FAR uLongf;
417 
418 #ifdef STDC
419  typedef void const *voidpc;
420  typedef void FAR *voidpf;
421  typedef void *voidp;
422 #else
423  typedef Byte const *voidpc;
424  typedef Byte FAR *voidpf;
425  typedef Byte *voidp;
426 #endif
427 
428 #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
429 # include <limits.h>
430 # if (UINT_MAX == 0xffffffffUL)
431 # define Z_U4 unsigned
432 # elif (ULONG_MAX == 0xffffffffUL)
433 # define Z_U4 unsigned long
434 # elif (USHRT_MAX == 0xffffffffUL)
435 # define Z_U4 unsigned short
436 # endif
437 #endif
438 
439 #ifdef Z_U4
440  typedef Z_U4 z_crc_t;
441 #else
442  typedef unsigned long z_crc_t;
443 #endif
444 
445 #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
446 # define Z_HAVE_UNISTD_H
447 #endif
448 
449 #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
450 # define Z_HAVE_STDARG_H
451 #endif
452 
453 #ifdef STDC
454 # ifndef Z_SOLO
455 # include <sys/types.h> /* for off_t */
456 # endif
457 #endif
458 
459 #if defined(STDC) || defined(Z_HAVE_STDARG_H)
460 # ifndef Z_SOLO
461 # include <stdarg.h> /* for va_list */
462 # endif
463 #endif
464 
465 #ifdef _WIN32
466 # ifndef Z_SOLO
467 # include <stddef.h> /* for wchar_t */
468 # endif
469 #endif
470 
471 /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
472  * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
473  * though the former does not conform to the LFS document), but considering
474  * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
475  * equivalently requesting no 64-bit operations
476  */
477 #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
478 # undef _LARGEFILE64_SOURCE
479 #endif
480 
481 #ifndef Z_HAVE_UNISTD_H
482 # ifdef __WATCOMC__
483 # define Z_HAVE_UNISTD_H
484 # endif
485 #endif
486 #ifndef Z_HAVE_UNISTD_H
487 # if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
488 # define Z_HAVE_UNISTD_H
489 # endif
490 #endif
491 #ifndef Z_SOLO
492 # if defined(Z_HAVE_UNISTD_H)
493 # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
494 # ifdef VMS
495 # include <unixio.h> /* for off_t */
496 # endif
497 # ifndef z_off_t
498 # define z_off_t off_t
499 # endif
500 # endif
501 #endif
502 
503 #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
504 # define Z_LFS64
505 #endif
506 
507 #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
508 # define Z_LARGE64
509 #endif
510 
511 #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
512 # define Z_WANT64
513 #endif
514 
515 #if !defined(SEEK_SET) && !defined(Z_SOLO)
516 # define SEEK_SET 0 /* Seek from beginning of file. */
517 # define SEEK_CUR 1 /* Seek from current position. */
518 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
519 #endif
520 
521 #ifndef z_off_t
522 # define z_off_t long
523 #endif
524 
525 #if !defined(_WIN32) && defined(Z_LARGE64)
526 # define z_off64_t off64_t
527 #else
528 # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
529 # define z_off64_t __int64
530 # else
531 # define z_off64_t z_off_t
532 # endif
533 #endif
534 
535 /* MVS linker does not support external names larger than 8 bytes */
536 #if defined(__MVS__)
537  #pragma map(deflateInit_,"DEIN")
538  #pragma map(deflateInit2_,"DEIN2")
539  #pragma map(deflateEnd,"DEEND")
540  #pragma map(deflateBound,"DEBND")
541  #pragma map(inflateInit_,"ININ")
542  #pragma map(inflateInit2_,"ININ2")
543  #pragma map(inflateEnd,"INEND")
544  #pragma map(inflateSync,"INSY")
545  #pragma map(inflateSetDictionary,"INSEDI")
546  #pragma map(compressBound,"CMBND")
547  #pragma map(inflate_table,"INTABL")
548  #pragma map(inflate_fast,"INFA")
549  #pragma map(inflate_copyright,"INCOPY")
550 #endif
551 
552 #endif /* ZCONF_H */
unsigned long z_size_t
Definition: zconf.h:258
unsigned long z_crc_t
Definition: zconf.h:442
#define intf
Definition: zconf.h:157
#define voidpf
Definition: zconf.h:165
unsigned char Byte
Definition: zconf.h:402
#define Bytef
Definition: zconf.h:147
unsigned long uLong
Definition: zconf.h:405
#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:398
#define uIntf
Definition: zconf.h:160
unsigned int uInt
Definition: zconf.h:404