| OLD | NEW |
| 1 /* zconf.h -- configuration of the zlib compression library | 1 /* zconf.h -- configuration of the zlib compression library |
| 2 * Copyright (C) 1995-2013 Jean-loup Gailly. | 2 * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler |
| 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 */ |
| 5 | 5 |
| 6 /* @(#) $Id$ */ | 6 /* @(#) $Id$ */ |
| 7 | 7 |
| 8 #ifndef ZCONF_H | 8 #ifndef ZCONF_H |
| 9 #define ZCONF_H | 9 #define ZCONF_H |
| 10 | 10 |
| 11 /* This include does prefixing as below, but with an updated set of names */ | 11 /* This include does prefixing as below, but with an updated set of names */ |
| 12 #include "mozzconf.h" | 12 #include "names.h" |
| 13 | 13 |
| 14 /* | 14 /* |
| 15 * If you *really* need a unique prefix for all types and library functions, | 15 * If you *really* need a unique prefix for all types and library functions, |
| 16 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. | 16 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. |
| 17 * Even better than compiling with -DZ_PREFIX would be to use configure to set | 17 * Even better than compiling with -DZ_PREFIX would be to use configure to set |
| 18 * this permanently in zconf.h using "./configure --zprefix". | 18 * this permanently in zconf.h using "./configure --zprefix". |
| 19 */ | 19 */ |
| 20 #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ | 20 #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ |
| 21 # define Z_PREFIX_SET | 21 # define Z_PREFIX_SET |
| 22 | 22 |
| 23 /* all linked symbols */ | 23 /* all linked symbols and init macros */ |
| 24 # define _dist_code z__dist_code | 24 # define _dist_code z__dist_code |
| 25 # define _length_code z__length_code | 25 # define _length_code z__length_code |
| 26 # define _tr_align z__tr_align | 26 # define _tr_align z__tr_align |
| 27 # define _tr_flush_bits z__tr_flush_bits | 27 # define _tr_flush_bits z__tr_flush_bits |
| 28 # define _tr_flush_block z__tr_flush_block | 28 # define _tr_flush_block z__tr_flush_block |
| 29 # define _tr_init z__tr_init | 29 # define _tr_init z__tr_init |
| 30 # define _tr_stored_block z__tr_stored_block | 30 # define _tr_stored_block z__tr_stored_block |
| 31 # define _tr_tally z__tr_tally | 31 # define _tr_tally z__tr_tally |
| 32 # define adler32 z_adler32 | 32 # define adler32 z_adler32 |
| 33 # define adler32_combine z_adler32_combine | 33 # define adler32_combine z_adler32_combine |
| 34 # define adler32_combine64 z_adler32_combine64 | 34 # define adler32_combine64 z_adler32_combine64 |
| 35 # define adler32_z z_adler32_z |
| 35 # ifndef Z_SOLO | 36 # ifndef Z_SOLO |
| 36 # define compress z_compress | 37 # define compress z_compress |
| 37 # define compress2 z_compress2 | 38 # define compress2 z_compress2 |
| 38 # define compressBound z_compressBound | 39 # define compressBound z_compressBound |
| 39 # endif | 40 # endif |
| 40 # define crc32 z_crc32 | 41 # define crc32 z_crc32 |
| 41 # define crc32_combine z_crc32_combine | 42 # define crc32_combine z_crc32_combine |
| 42 # define crc32_combine64 z_crc32_combine64 | 43 # define crc32_combine64 z_crc32_combine64 |
| 44 # define crc32_z z_crc32_z |
| 43 # define deflate z_deflate | 45 # define deflate z_deflate |
| 44 # define deflateBound z_deflateBound | 46 # define deflateBound z_deflateBound |
| 45 # define deflateCopy z_deflateCopy | 47 # define deflateCopy z_deflateCopy |
| 46 # define deflateEnd z_deflateEnd | 48 # define deflateEnd z_deflateEnd |
| 49 # define deflateGetDictionary z_deflateGetDictionary |
| 50 # define deflateInit z_deflateInit |
| 51 # define deflateInit2 z_deflateInit2 |
| 47 # define deflateInit2_ z_deflateInit2_ | 52 # define deflateInit2_ z_deflateInit2_ |
| 48 # define deflateInit_ z_deflateInit_ | 53 # define deflateInit_ z_deflateInit_ |
| 49 # define deflateParams z_deflateParams | 54 # define deflateParams z_deflateParams |
| 50 # define deflatePending z_deflatePending | 55 # define deflatePending z_deflatePending |
| 51 # define deflatePrime z_deflatePrime | 56 # define deflatePrime z_deflatePrime |
| 52 # define deflateReset z_deflateReset | 57 # define deflateReset z_deflateReset |
| 53 # define deflateResetKeep z_deflateResetKeep | 58 # define deflateResetKeep z_deflateResetKeep |
| 54 # define deflateSetDictionary z_deflateSetDictionary | 59 # define deflateSetDictionary z_deflateSetDictionary |
| 55 # define deflateSetHeader z_deflateSetHeader | 60 # define deflateSetHeader z_deflateSetHeader |
| 56 # define deflateTune z_deflateTune | 61 # define deflateTune z_deflateTune |
| 57 # define deflate_copyright z_deflate_copyright | 62 # define deflate_copyright z_deflate_copyright |
| 58 # define get_crc_table z_get_crc_table | 63 # define get_crc_table z_get_crc_table |
| 59 # ifndef Z_SOLO | 64 # ifndef Z_SOLO |
| 60 # define gz_error z_gz_error | 65 # define gz_error z_gz_error |
| 61 # define gz_intmax z_gz_intmax | 66 # define gz_intmax z_gz_intmax |
| 62 # define gz_strwinerror z_gz_strwinerror | 67 # define gz_strwinerror z_gz_strwinerror |
| 63 # define gzbuffer z_gzbuffer | 68 # define gzbuffer z_gzbuffer |
| 64 # define gzclearerr z_gzclearerr | 69 # define gzclearerr z_gzclearerr |
| 65 # define gzclose z_gzclose | 70 # define gzclose z_gzclose |
| 66 # define gzclose_r z_gzclose_r | 71 # define gzclose_r z_gzclose_r |
| 67 # define gzclose_w z_gzclose_w | 72 # define gzclose_w z_gzclose_w |
| 68 # define gzdirect z_gzdirect | 73 # define gzdirect z_gzdirect |
| 69 # define gzdopen z_gzdopen | 74 # define gzdopen z_gzdopen |
| 70 # define gzeof z_gzeof | 75 # define gzeof z_gzeof |
| 71 # define gzerror z_gzerror | 76 # define gzerror z_gzerror |
| 72 # define gzflush z_gzflush | 77 # define gzflush z_gzflush |
| 78 # define gzfread z_gzfread |
| 79 # define gzfwrite z_gzfwrite |
| 73 # define gzgetc z_gzgetc | 80 # define gzgetc z_gzgetc |
| 74 # define gzgetc_ z_gzgetc_ | 81 # define gzgetc_ z_gzgetc_ |
| 75 # define gzgets z_gzgets | 82 # define gzgets z_gzgets |
| 76 # define gzoffset z_gzoffset | 83 # define gzoffset z_gzoffset |
| 77 # define gzoffset64 z_gzoffset64 | 84 # define gzoffset64 z_gzoffset64 |
| 78 # define gzopen z_gzopen | 85 # define gzopen z_gzopen |
| 79 # define gzopen64 z_gzopen64 | 86 # define gzopen64 z_gzopen64 |
| 80 # ifdef _WIN32 | 87 # ifdef _WIN32 |
| 81 # define gzopen_w z_gzopen_w | 88 # define gzopen_w z_gzopen_w |
| 82 # endif | 89 # endif |
| 83 # define gzprintf z_gzprintf | 90 # define gzprintf z_gzprintf |
| 84 # define gzvprintf z_gzvprintf | |
| 85 # define gzputc z_gzputc | 91 # define gzputc z_gzputc |
| 86 # define gzputs z_gzputs | 92 # define gzputs z_gzputs |
| 87 # define gzread z_gzread | 93 # define gzread z_gzread |
| 88 # define gzrewind z_gzrewind | 94 # define gzrewind z_gzrewind |
| 89 # define gzseek z_gzseek | 95 # define gzseek z_gzseek |
| 90 # define gzseek64 z_gzseek64 | 96 # define gzseek64 z_gzseek64 |
| 91 # define gzsetparams z_gzsetparams | 97 # define gzsetparams z_gzsetparams |
| 92 # define gztell z_gztell | 98 # define gztell z_gztell |
| 93 # define gztell64 z_gztell64 | 99 # define gztell64 z_gztell64 |
| 94 # define gzungetc z_gzungetc | 100 # define gzungetc z_gzungetc |
| 101 # define gzvprintf z_gzvprintf |
| 95 # define gzwrite z_gzwrite | 102 # define gzwrite z_gzwrite |
| 96 # endif | 103 # endif |
| 97 # define inflate z_inflate | 104 # define inflate z_inflate |
| 98 # define inflateBack z_inflateBack | 105 # define inflateBack z_inflateBack |
| 99 # define inflateBackEnd z_inflateBackEnd | 106 # define inflateBackEnd z_inflateBackEnd |
| 107 # define inflateBackInit z_inflateBackInit |
| 100 # define inflateBackInit_ z_inflateBackInit_ | 108 # define inflateBackInit_ z_inflateBackInit_ |
| 109 # define inflateCodesUsed z_inflateCodesUsed |
| 101 # define inflateCopy z_inflateCopy | 110 # define inflateCopy z_inflateCopy |
| 102 # define inflateEnd z_inflateEnd | 111 # define inflateEnd z_inflateEnd |
| 112 # define inflateGetDictionary z_inflateGetDictionary |
| 103 # define inflateGetHeader z_inflateGetHeader | 113 # define inflateGetHeader z_inflateGetHeader |
| 114 # define inflateInit z_inflateInit |
| 115 # define inflateInit2 z_inflateInit2 |
| 104 # define inflateInit2_ z_inflateInit2_ | 116 # define inflateInit2_ z_inflateInit2_ |
| 105 # define inflateInit_ z_inflateInit_ | 117 # define inflateInit_ z_inflateInit_ |
| 106 # define inflateMark z_inflateMark | 118 # define inflateMark z_inflateMark |
| 107 # define inflatePrime z_inflatePrime | 119 # define inflatePrime z_inflatePrime |
| 108 # define inflateReset z_inflateReset | 120 # define inflateReset z_inflateReset |
| 109 # define inflateReset2 z_inflateReset2 | 121 # define inflateReset2 z_inflateReset2 |
| 122 # define inflateResetKeep z_inflateResetKeep |
| 110 # define inflateSetDictionary z_inflateSetDictionary | 123 # define inflateSetDictionary z_inflateSetDictionary |
| 111 # define inflateGetDictionary z_inflateGetDictionary | |
| 112 # define inflateSync z_inflateSync | 124 # define inflateSync z_inflateSync |
| 113 # define inflateSyncPoint z_inflateSyncPoint | 125 # define inflateSyncPoint z_inflateSyncPoint |
| 114 # define inflateUndermine z_inflateUndermine | 126 # define inflateUndermine z_inflateUndermine |
| 115 # define inflateResetKeep z_inflateResetKeep | 127 # define inflateValidate z_inflateValidate |
| 116 # define inflate_copyright z_inflate_copyright | 128 # define inflate_copyright z_inflate_copyright |
| 117 # define inflate_fast z_inflate_fast | 129 # define inflate_fast z_inflate_fast |
| 118 # define inflate_table z_inflate_table | 130 # define inflate_table z_inflate_table |
| 119 # ifndef Z_SOLO | 131 # ifndef Z_SOLO |
| 120 # define uncompress z_uncompress | 132 # define uncompress z_uncompress |
| 133 # define uncompress2 z_uncompress2 |
| 121 # endif | 134 # endif |
| 122 # define zError z_zError | 135 # define zError z_zError |
| 123 # ifndef Z_SOLO | 136 # ifndef Z_SOLO |
| 124 # define zcalloc z_zcalloc | 137 # define zcalloc z_zcalloc |
| 125 # define zcfree z_zcfree | 138 # define zcfree z_zcfree |
| 126 # endif | 139 # endif |
| 127 # define zlibCompileFlags z_zlibCompileFlags | 140 # define zlibCompileFlags z_zlibCompileFlags |
| 128 # define zlibVersion z_zlibVersion | 141 # define zlibVersion z_zlibVersion |
| 129 | 142 |
| 130 /* all zlib typedefs in zlib.h and zconf.h */ | 143 /* all zlib typedefs in zlib.h and zconf.h */ |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 # define const /* note: need a more gentle solution here */ | 233 # define const /* note: need a more gentle solution here */ |
| 221 # endif | 234 # endif |
| 222 #endif | 235 #endif |
| 223 | 236 |
| 224 #if defined(ZLIB_CONST) && !defined(z_const) | 237 #if defined(ZLIB_CONST) && !defined(z_const) |
| 225 # define z_const const | 238 # define z_const const |
| 226 #else | 239 #else |
| 227 # define z_const | 240 # define z_const |
| 228 #endif | 241 #endif |
| 229 | 242 |
| 230 /* Some Mac compilers merge all .h files incorrectly: */ | 243 #ifdef Z_SOLO |
| 231 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) | 244 typedef unsigned long z_size_t; |
| 232 # define NO_DUMMY_DECL | 245 #else |
| 246 # define z_longlong long long |
| 247 # if defined(NO_SIZE_T) |
| 248 typedef unsigned NO_SIZE_T z_size_t; |
| 249 # elif defined(STDC) |
| 250 # include <stddef.h> |
| 251 typedef size_t z_size_t; |
| 252 # else |
| 253 typedef unsigned long z_size_t; |
| 254 # endif |
| 255 # undef z_longlong |
| 233 #endif | 256 #endif |
| 234 | 257 |
| 235 /* Maximum value for memLevel in deflateInit2 */ | 258 /* Maximum value for memLevel in deflateInit2 */ |
| 236 #ifndef MAX_MEM_LEVEL | 259 #ifndef MAX_MEM_LEVEL |
| 237 # ifdef MAXSEG_64K | 260 # ifdef MAXSEG_64K |
| 238 # define MAX_MEM_LEVEL 8 | 261 # define MAX_MEM_LEVEL 8 |
| 239 # else | 262 # else |
| 240 # define MAX_MEM_LEVEL 9 | 263 # define MAX_MEM_LEVEL 9 |
| 241 # endif | 264 # endif |
| 242 #endif | 265 #endif |
| 243 | 266 |
| 244 /* Maximum value for windowBits in deflateInit2 and inflateInit2. | 267 /* Maximum value for windowBits in deflateInit2 and inflateInit2. |
| 245 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files | 268 * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files |
| 246 * created by gzip. (Files created by minigzip can still be extracted by | 269 * created by gzip. (Files created by minigzip can still be extracted by |
| 247 * gzip.) | 270 * gzip.) |
| 248 */ | 271 */ |
| 249 #ifndef MAX_WBITS | 272 #ifndef MAX_WBITS |
| 250 # define MAX_WBITS 15 /* 32K LZ77 window */ | 273 # define MAX_WBITS 15 /* 32K LZ77 window */ |
| 251 #endif | 274 #endif |
| 252 | 275 |
| 253 /* The memory requirements for deflate are (in bytes): | 276 /* The memory requirements for deflate are (in bytes): |
| 254 (1 << (windowBits+2)) + (1 << (memLevel+9)) | 277 (1 << (windowBits+2)) + (1 << (memLevel+9)) |
| 255 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) | 278 that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) |
| 256 plus a few kilobytes for small objects. For example, if you want to reduce | 279 plus a few kilobytes for small objects. For example, if you want to reduce |
| 257 the default memory requirements from 256K to 128K, compile with | 280 the default memory requirements from 256K to 128K, compile with |
| 258 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" | 281 make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" |
| 259 Of course this will generally degrade compression (there's no free lunch). | 282 Of course this will generally degrade compression (there's no free lunch). |
| 260 | 283 |
| 261 The memory requirements for inflate are (in bytes) 1 << windowBits | 284 The memory requirements for inflate are (in bytes) 1 << windowBits |
| 262 that is, 32K for windowBits=15 (default value) plus a few kilobytes | 285 that is, 32K for windowBits=15 (default value) plus about 7 kilobytes |
| 263 for small objects. | 286 for small objects. |
| 264 */ | 287 */ |
| 265 | 288 |
| 266 /* Type declarations */ | 289 /* Type declarations */ |
| 267 | 290 |
| 268 #ifndef OF /* function prototypes */ | 291 #ifndef OF /* function prototypes */ |
| 269 # ifdef STDC | 292 # ifdef STDC |
| 270 # define OF(args) args | 293 # define OF(args) args |
| 271 # else | 294 # else |
| 272 # define OF(args) () | 295 # define OF(args) () |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 #pragma map(inflateEnd,"INEND") | 528 #pragma map(inflateEnd,"INEND") |
| 506 #pragma map(inflateSync,"INSY") | 529 #pragma map(inflateSync,"INSY") |
| 507 #pragma map(inflateSetDictionary,"INSEDI") | 530 #pragma map(inflateSetDictionary,"INSEDI") |
| 508 #pragma map(compressBound,"CMBND") | 531 #pragma map(compressBound,"CMBND") |
| 509 #pragma map(inflate_table,"INTABL") | 532 #pragma map(inflate_table,"INTABL") |
| 510 #pragma map(inflate_fast,"INFA") | 533 #pragma map(inflate_fast,"INFA") |
| 511 #pragma map(inflate_copyright,"INCOPY") | 534 #pragma map(inflate_copyright,"INCOPY") |
| 512 #endif | 535 #endif |
| 513 | 536 |
| 514 #endif /* ZCONF_H */ | 537 #endif /* ZCONF_H */ |
| OLD | NEW |