Rev 1896 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1896 | Rev 3926 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* zconf.h -- configuration of the zlib compression library |
1 | /* zconf.h -- configuration of the zlib compression library |
2 | * Copyright (C) 1995-2010 Jean-loup Gailly. |
2 | * Copyright (C) 1995-2013 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h |
3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ |
4 | */ |
Line 5... | Line 5... | ||
5 | 5 | ||
Line 13... | Line 13... | ||
13 | * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. |
13 | * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. |
14 | * Even better than compiling with -DZ_PREFIX would be to use configure to set |
14 | * Even better than compiling with -DZ_PREFIX would be to use configure to set |
15 | * this permanently in zconf.h using "./configure --zprefix". |
15 | * this permanently in zconf.h using "./configure --zprefix". |
16 | */ |
16 | */ |
17 | #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ |
17 | #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ |
- | 18 | # define Z_PREFIX_SET |
|
Line 18... | Line 19... | ||
18 | 19 | ||
19 | /* all linked symbols */ |
20 | /* all linked symbols */ |
20 | # define _dist_code z__dist_code |
21 | # define _dist_code z__dist_code |
21 | # define _length_code z__length_code |
22 | # define _length_code z__length_code |
- | 23 | # define _tr_align z__tr_align |
|
22 | # define _tr_align z__tr_align |
24 | # define _tr_flush_bits z__tr_flush_bits |
23 | # define _tr_flush_block z__tr_flush_block |
25 | # define _tr_flush_block z__tr_flush_block |
24 | # define _tr_init z__tr_init |
26 | # define _tr_init z__tr_init |
25 | # define _tr_stored_block z__tr_stored_block |
27 | # define _tr_stored_block z__tr_stored_block |
26 | # define _tr_tally z__tr_tally |
28 | # define _tr_tally z__tr_tally |
27 | # define adler32 z_adler32 |
29 | # define adler32 z_adler32 |
28 | # define adler32_combine z_adler32_combine |
30 | # define adler32_combine z_adler32_combine |
- | 31 | # define adler32_combine64 z_adler32_combine64 |
|
29 | # define adler32_combine64 z_adler32_combine64 |
32 | # ifndef Z_SOLO |
30 | # define compress z_compress |
33 | # define compress z_compress |
31 | # define compress2 z_compress2 |
34 | # define compress2 z_compress2 |
- | 35 | # define compressBound z_compressBound |
|
32 | # define compressBound z_compressBound |
36 | # endif |
33 | # define crc32 z_crc32 |
37 | # define crc32 z_crc32 |
34 | # define crc32_combine z_crc32_combine |
38 | # define crc32_combine z_crc32_combine |
35 | # define crc32_combine64 z_crc32_combine64 |
39 | # define crc32_combine64 z_crc32_combine64 |
36 | # define deflate z_deflate |
40 | # define deflate z_deflate |
37 | # define deflateBound z_deflateBound |
41 | # define deflateBound z_deflateBound |
38 | # define deflateCopy z_deflateCopy |
42 | # define deflateCopy z_deflateCopy |
39 | # define deflateEnd z_deflateEnd |
43 | # define deflateEnd z_deflateEnd |
40 | # define deflateInit2_ z_deflateInit2_ |
44 | # define deflateInit2_ z_deflateInit2_ |
41 | # define deflateInit_ z_deflateInit_ |
45 | # define deflateInit_ z_deflateInit_ |
- | 46 | # define deflateParams z_deflateParams |
|
42 | # define deflateParams z_deflateParams |
47 | # define deflatePending z_deflatePending |
43 | # define deflatePrime z_deflatePrime |
48 | # define deflatePrime z_deflatePrime |
- | 49 | # define deflateReset z_deflateReset |
|
44 | # define deflateReset z_deflateReset |
50 | # define deflateResetKeep z_deflateResetKeep |
45 | # define deflateSetDictionary z_deflateSetDictionary |
51 | # define deflateSetDictionary z_deflateSetDictionary |
46 | # define deflateSetHeader z_deflateSetHeader |
52 | # define deflateSetHeader z_deflateSetHeader |
47 | # define deflateTune z_deflateTune |
53 | # define deflateTune z_deflateTune |
48 | # define deflate_copyright z_deflate_copyright |
54 | # define deflate_copyright z_deflate_copyright |
- | 55 | # define get_crc_table z_get_crc_table |
|
49 | # define get_crc_table z_get_crc_table |
56 | # ifndef Z_SOLO |
50 | # define gz_error z_gz_error |
57 | # define gz_error z_gz_error |
51 | # define gz_intmax z_gz_intmax |
58 | # define gz_intmax z_gz_intmax |
52 | # define gz_strwinerror z_gz_strwinerror |
59 | # define gz_strwinerror z_gz_strwinerror |
53 | # define gzbuffer z_gzbuffer |
60 | # define gzbuffer z_gzbuffer |
Line 59... | Line 66... | ||
59 | # define gzdopen z_gzdopen |
66 | # define gzdopen z_gzdopen |
60 | # define gzeof z_gzeof |
67 | # define gzeof z_gzeof |
61 | # define gzerror z_gzerror |
68 | # define gzerror z_gzerror |
62 | # define gzflush z_gzflush |
69 | # define gzflush z_gzflush |
63 | # define gzgetc z_gzgetc |
70 | # define gzgetc z_gzgetc |
- | 71 | # define gzgetc_ z_gzgetc_ |
|
64 | # define gzgets z_gzgets |
72 | # define gzgets z_gzgets |
65 | # define gzoffset z_gzoffset |
73 | # define gzoffset z_gzoffset |
66 | # define gzoffset64 z_gzoffset64 |
74 | # define gzoffset64 z_gzoffset64 |
67 | # define gzopen z_gzopen |
75 | # define gzopen z_gzopen |
68 | # define gzopen64 z_gzopen64 |
76 | # define gzopen64 z_gzopen64 |
- | 77 | # ifdef _WIN32 |
|
- | 78 | # define gzopen_w z_gzopen_w |
|
- | 79 | # endif |
|
69 | # define gzprintf z_gzprintf |
80 | # define gzprintf z_gzprintf |
- | 81 | # define gzvprintf z_gzvprintf |
|
70 | # define gzputc z_gzputc |
82 | # define gzputc z_gzputc |
71 | # define gzputs z_gzputs |
83 | # define gzputs z_gzputs |
72 | # define gzread z_gzread |
84 | # define gzread z_gzread |
73 | # define gzrewind z_gzrewind |
85 | # define gzrewind z_gzrewind |
74 | # define gzseek z_gzseek |
86 | # define gzseek z_gzseek |
Line 76... | Line 88... | ||
76 | # define gzsetparams z_gzsetparams |
88 | # define gzsetparams z_gzsetparams |
77 | # define gztell z_gztell |
89 | # define gztell z_gztell |
78 | # define gztell64 z_gztell64 |
90 | # define gztell64 z_gztell64 |
79 | # define gzungetc z_gzungetc |
91 | # define gzungetc z_gzungetc |
80 | # define gzwrite z_gzwrite |
92 | # define gzwrite z_gzwrite |
- | 93 | # endif |
|
81 | # define inflate z_inflate |
94 | # define inflate z_inflate |
82 | # define inflateBack z_inflateBack |
95 | # define inflateBack z_inflateBack |
83 | # define inflateBackEnd z_inflateBackEnd |
96 | # define inflateBackEnd z_inflateBackEnd |
84 | # define inflateBackInit_ z_inflateBackInit_ |
97 | # define inflateBackInit_ z_inflateBackInit_ |
85 | # define inflateCopy z_inflateCopy |
98 | # define inflateCopy z_inflateCopy |
Line 90... | Line 103... | ||
90 | # define inflateMark z_inflateMark |
103 | # define inflateMark z_inflateMark |
91 | # define inflatePrime z_inflatePrime |
104 | # define inflatePrime z_inflatePrime |
92 | # define inflateReset z_inflateReset |
105 | # define inflateReset z_inflateReset |
93 | # define inflateReset2 z_inflateReset2 |
106 | # define inflateReset2 z_inflateReset2 |
94 | # define inflateSetDictionary z_inflateSetDictionary |
107 | # define inflateSetDictionary z_inflateSetDictionary |
- | 108 | # define inflateGetDictionary z_inflateGetDictionary |
|
95 | # define inflateSync z_inflateSync |
109 | # define inflateSync z_inflateSync |
96 | # define inflateSyncPoint z_inflateSyncPoint |
110 | # define inflateSyncPoint z_inflateSyncPoint |
97 | # define inflateUndermine z_inflateUndermine |
111 | # define inflateUndermine z_inflateUndermine |
- | 112 | # define inflateResetKeep z_inflateResetKeep |
|
98 | # define inflate_copyright z_inflate_copyright |
113 | # define inflate_copyright z_inflate_copyright |
99 | # define inflate_fast z_inflate_fast |
114 | # define inflate_fast z_inflate_fast |
100 | # define inflate_table z_inflate_table |
115 | # define inflate_table z_inflate_table |
- | 116 | # ifndef Z_SOLO |
|
101 | # define uncompress z_uncompress |
117 | # define uncompress z_uncompress |
- | 118 | # endif |
|
102 | # define zError z_zError |
119 | # define zError z_zError |
- | 120 | # ifndef Z_SOLO |
|
103 | # define zcalloc z_zcalloc |
121 | # define zcalloc z_zcalloc |
104 | # define zcfree z_zcfree |
122 | # define zcfree z_zcfree |
- | 123 | # endif |
|
105 | # define zlibCompileFlags z_zlibCompileFlags |
124 | # define zlibCompileFlags z_zlibCompileFlags |
106 | # define zlibVersion z_zlibVersion |
125 | # define zlibVersion z_zlibVersion |
Line 107... | Line 126... | ||
107 | 126 | ||
108 | /* all zlib typedefs in zlib.h and zconf.h */ |
127 | /* all zlib typedefs in zlib.h and zconf.h */ |
109 | # define Byte z_Byte |
128 | # define Byte z_Byte |
110 | # define Bytef z_Bytef |
129 | # define Bytef z_Bytef |
111 | # define alloc_func z_alloc_func |
130 | # define alloc_func z_alloc_func |
112 | # define charf z_charf |
131 | # define charf z_charf |
- | 132 | # define free_func z_free_func |
|
113 | # define free_func z_free_func |
133 | # ifndef Z_SOLO |
- | 134 | # define gzFile z_gzFile |
|
114 | # define gzFile z_gzFile |
135 | # endif |
115 | # define gz_header z_gz_header |
136 | # define gz_header z_gz_header |
116 | # define gz_headerp z_gz_headerp |
137 | # define gz_headerp z_gz_headerp |
117 | # define in_func z_in_func |
138 | # define in_func z_in_func |
118 | # define intf z_intf |
139 | # define intf z_intf |
Line 195... | Line 216... | ||
195 | # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ |
216 | # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ |
196 | # define const /* note: need a more gentle solution here */ |
217 | # define const /* note: need a more gentle solution here */ |
197 | # endif |
218 | # endif |
198 | #endif |
219 | #endif |
Line -... | Line 220... | ||
- | 220 | ||
- | 221 | #if defined(ZLIB_CONST) && !defined(z_const) |
|
- | 222 | # define z_const const |
|
- | 223 | #else |
|
- | 224 | # define z_const |
|
- | 225 | #endif |
|
199 | 226 | ||
200 | /* Some Mac compilers merge all .h files incorrectly: */ |
227 | /* Some Mac compilers merge all .h files incorrectly: */ |
201 | #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) |
228 | #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) |
202 | # define NO_DUMMY_DECL |
229 | # define NO_DUMMY_DECL |
Line 241... | Line 268... | ||
241 | # else |
268 | # else |
242 | # define OF(args) () |
269 | # define OF(args) () |
243 | # endif |
270 | # endif |
244 | #endif |
271 | #endif |
Line -... | Line 272... | ||
- | 272 | ||
- | 273 | #ifndef Z_ARG /* function prototypes for stdarg */ |
|
- | 274 | # if defined(STDC) || defined(Z_HAVE_STDARG_H) |
|
- | 275 | # define Z_ARG(args) args |
|
- | 276 | # else |
|
- | 277 | # define Z_ARG(args) () |
|
- | 278 | # endif |
|
- | 279 | #endif |
|
245 | 280 | ||
246 | /* The following definitions for FAR are needed only for MSDOS mixed |
281 | /* The following definitions for FAR are needed only for MSDOS mixed |
247 | * model programming (small or medium model with some far allocations). |
282 | * model programming (small or medium model with some far allocations). |
248 | * This was tested only with MSC; for other MSDOS compilers you may have |
283 | * This was tested only with MSC; for other MSDOS compilers you may have |
249 | * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, |
284 | * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, |
Line 354... | Line 389... | ||
354 | typedef Byte const *voidpc; |
389 | typedef Byte const *voidpc; |
355 | typedef Byte FAR *voidpf; |
390 | typedef Byte FAR *voidpf; |
356 | typedef Byte *voidp; |
391 | typedef Byte *voidp; |
357 | #endif |
392 | #endif |
Line -... | Line 393... | ||
- | 393 | ||
- | 394 | #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) |
|
- | 395 | # include |
|
- | 396 | # if (UINT_MAX == 0xffffffffUL) |
|
- | 397 | # define Z_U4 unsigned |
|
- | 398 | # elif (ULONG_MAX == 0xffffffffUL) |
|
- | 399 | # define Z_U4 unsigned long |
|
- | 400 | # elif (USHRT_MAX == 0xffffffffUL) |
|
- | 401 | # define Z_U4 unsigned short |
|
- | 402 | # endif |
|
- | 403 | #endif |
|
- | 404 | ||
- | 405 | #ifdef Z_U4 |
|
- | 406 | typedef Z_U4 z_crc_t; |
|
- | 407 | #else |
|
- | 408 | typedef unsigned long z_crc_t; |
|
- | 409 | #endif |
|
358 | 410 | ||
359 | #if 1 /* was set to #if 1 by ./configure */ |
411 | #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ |
360 | # define Z_HAVE_UNISTD_H |
412 | # define Z_HAVE_UNISTD_H |
Line -... | Line 413... | ||
- | 413 | #endif |
|
- | 414 | ||
- | 415 | #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ |
|
- | 416 | # define Z_HAVE_STDARG_H |
|
361 | #endif |
417 | #endif |
- | 418 | ||
362 | 419 | #ifdef STDC |
|
363 | #ifdef STDC |
420 | # ifndef Z_SOLO |
- | 421 | # include |
|
- | 422 | # endif |
|
- | 423 | #endif |
|
- | 424 | ||
- | 425 | #if defined(STDC) || defined(Z_HAVE_STDARG_H) |
|
- | 426 | # ifndef Z_SOLO |
|
- | 427 | # include |
|
- | 428 | # endif |
|
- | 429 | #endif |
|
- | 430 | ||
- | 431 | #ifdef _WIN32 |
|
- | 432 | # ifndef Z_SOLO |
|
- | 433 | # include |
|
Line 364... | Line 434... | ||
364 | # include |
434 | # endif |
365 | #endif |
435 | #endif |
366 | 436 | ||
367 | /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and |
437 | /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and |
368 | * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even |
438 | * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even |
369 | * though the former does not conform to the LFS document), but considering |
439 | * though the former does not conform to the LFS document), but considering |
370 | * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as |
440 | * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as |
371 | * equivalently requesting no 64-bit operations |
441 | * equivalently requesting no 64-bit operations |
372 | */ |
442 | */ |
Line -... | Line 443... | ||
- | 443 | #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 |
|
- | 444 | # undef _LARGEFILE64_SOURCE |
|
- | 445 | #endif |
|
- | 446 | ||
373 | #if -_LARGEFILE64_SOURCE - -1 == 1 |
447 | #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) |
374 | # undef _LARGEFILE64_SOURCE |
448 | # define Z_HAVE_UNISTD_H |
375 | #endif |
449 | #endif |
376 | 450 | #ifndef Z_SOLO |
|
377 | #if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) |
451 | # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) |
378 | # include |
452 | # include |
379 | # ifdef VMS |
453 | # ifdef VMS |
380 | # include |
454 | # include |
381 | # endif |
455 | # endif |
- | 456 | # ifndef z_off_t |
|
Line -... | Line 457... | ||
- | 457 | # define z_off_t off_t |
|
382 | # ifndef z_off_t |
458 | # endif |
- | 459 | # endif |
|
- | 460 | #endif |
|
- | 461 | ||
- | 462 | #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 |
|
- | 463 | # define Z_LFS64 |
|
- | 464 | #endif |
|
- | 465 | ||
- | 466 | #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) |
|
- | 467 | # define Z_LARGE64 |
|
- | 468 | #endif |
|
- | 469 | ||
383 | # define z_off_t off_t |
470 | #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) |
384 | # endif |
471 | # define Z_WANT64 |
385 | #endif |
472 | #endif |
386 | 473 | ||
Line 387... | Line 474... | ||
387 | #ifndef SEEK_SET |
474 | #if !defined(SEEK_SET) && !defined(Z_SOLO) |
388 | # define SEEK_SET 0 /* Seek from beginning of file. */ |
475 | # define SEEK_SET 0 /* Seek from beginning of file. */ |
389 | # define SEEK_CUR 1 /* Seek from current position. */ |
476 | # define SEEK_CUR 1 /* Seek from current position. */ |
Line 390... | Line 477... | ||
390 | # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ |
477 | # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ |
391 | #endif |
478 | #endif |
392 | 479 | ||
- | 480 | #ifndef z_off_t |
|
- | 481 | # define z_off_t long |
|
- | 482 | #endif |
|
393 | #ifndef z_off_t |
483 | |
394 | # define z_off_t long |
484 | #if !defined(_WIN32) && defined(Z_LARGE64) |
395 | #endif |
- | |
396 | - | ||
397 | #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 |
- | |
398 | # define z_off64_t off64_t |
- | |
399 | #else |
- | |
400 | # define z_off64_t z_off_t |
- | |
401 | #endif |
- | |
402 | 485 | # define z_off64_t off64_t |
|
Line 403... | Line 486... | ||
403 | #if defined(__OS400__) |
486 | #else |
404 | # define NO_vsnprintf |
487 | # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) |
405 | #endif |
488 | # define z_off64_t __int64 |