Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(868)

Side by Side Diff: third_party/zlib/zconf.h

Issue 2084863002: Update Zlib to version 1.2.8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/zlib/uncompr.c ('k') | third_party/zlib/zlib.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 */
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 "mozzconf.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 22
22 /* all linked symbols */ 23 /* all linked symbols */
23 # define _dist_code z__dist_code 24 # define _dist_code z__dist_code
24 # define _length_code z__length_code 25 # define _length_code z__length_code
25 # define _tr_align z__tr_align 26 # define _tr_align z__tr_align
27 # define _tr_flush_bits z__tr_flush_bits
26 # define _tr_flush_block z__tr_flush_block 28 # define _tr_flush_block z__tr_flush_block
27 # define _tr_init z__tr_init 29 # define _tr_init z__tr_init
28 # define _tr_stored_block z__tr_stored_block 30 # define _tr_stored_block z__tr_stored_block
29 # define _tr_tally z__tr_tally 31 # define _tr_tally z__tr_tally
30 # define adler32 z_adler32 32 # define adler32 z_adler32
31 # define adler32_combine z_adler32_combine 33 # define adler32_combine z_adler32_combine
32 # define adler32_combine64 z_adler32_combine64 34 # define adler32_combine64 z_adler32_combine64
33 # define compress z_compress 35 # ifndef Z_SOLO
34 # define compress2 z_compress2 36 # define compress z_compress
35 # define compressBound z_compressBound 37 # define compress2 z_compress2
38 # define compressBound z_compressBound
39 # endif
36 # define crc32 z_crc32 40 # define crc32 z_crc32
37 # define crc32_combine z_crc32_combine 41 # define crc32_combine z_crc32_combine
38 # define crc32_combine64 z_crc32_combine64 42 # define crc32_combine64 z_crc32_combine64
39 # define deflate z_deflate 43 # define deflate z_deflate
40 # define deflateBound z_deflateBound 44 # define deflateBound z_deflateBound
41 # define deflateCopy z_deflateCopy 45 # define deflateCopy z_deflateCopy
42 # define deflateEnd z_deflateEnd 46 # define deflateEnd z_deflateEnd
43 # define deflateInit2_ z_deflateInit2_ 47 # define deflateInit2_ z_deflateInit2_
44 # define deflateInit_ z_deflateInit_ 48 # define deflateInit_ z_deflateInit_
45 # define deflateParams z_deflateParams 49 # define deflateParams z_deflateParams
50 # define deflatePending z_deflatePending
46 # define deflatePrime z_deflatePrime 51 # define deflatePrime z_deflatePrime
47 # define deflateReset z_deflateReset 52 # define deflateReset z_deflateReset
53 # define deflateResetKeep z_deflateResetKeep
48 # define deflateSetDictionary z_deflateSetDictionary 54 # define deflateSetDictionary z_deflateSetDictionary
49 # define deflateSetHeader z_deflateSetHeader 55 # define deflateSetHeader z_deflateSetHeader
50 # define deflateTune z_deflateTune 56 # define deflateTune z_deflateTune
51 # define deflate_copyright z_deflate_copyright 57 # define deflate_copyright z_deflate_copyright
52 # define get_crc_table z_get_crc_table 58 # define get_crc_table z_get_crc_table
53 # define gz_error z_gz_error 59 # ifndef Z_SOLO
54 # define gz_intmax z_gz_intmax 60 # define gz_error z_gz_error
55 # define gz_strwinerror z_gz_strwinerror 61 # define gz_intmax z_gz_intmax
56 # define gzbuffer z_gzbuffer 62 # define gz_strwinerror z_gz_strwinerror
57 # define gzclearerr z_gzclearerr 63 # define gzbuffer z_gzbuffer
58 # define gzclose z_gzclose 64 # define gzclearerr z_gzclearerr
59 # define gzclose_r z_gzclose_r 65 # define gzclose z_gzclose
60 # define gzclose_w z_gzclose_w 66 # define gzclose_r z_gzclose_r
61 # define gzdirect z_gzdirect 67 # define gzclose_w z_gzclose_w
62 # define gzdopen z_gzdopen 68 # define gzdirect z_gzdirect
63 # define gzeof z_gzeof 69 # define gzdopen z_gzdopen
64 # define gzerror z_gzerror 70 # define gzeof z_gzeof
65 # define gzflush z_gzflush 71 # define gzerror z_gzerror
66 # define gzgetc z_gzgetc 72 # define gzflush z_gzflush
67 # define gzgets z_gzgets 73 # define gzgetc z_gzgetc
68 # define gzoffset z_gzoffset 74 # define gzgetc_ z_gzgetc_
69 # define gzoffset64 z_gzoffset64 75 # define gzgets z_gzgets
70 # define gzopen z_gzopen 76 # define gzoffset z_gzoffset
71 # define gzopen64 z_gzopen64 77 # define gzoffset64 z_gzoffset64
72 # define gzprintf z_gzprintf 78 # define gzopen z_gzopen
73 # define gzputc z_gzputc 79 # define gzopen64 z_gzopen64
74 # define gzputs z_gzputs 80 # ifdef _WIN32
75 # define gzread z_gzread 81 # define gzopen_w z_gzopen_w
76 # define gzrewind z_gzrewind 82 # endif
77 # define gzseek z_gzseek 83 # define gzprintf z_gzprintf
78 # define gzseek64 z_gzseek64 84 # define gzvprintf z_gzvprintf
79 # define gzsetparams z_gzsetparams 85 # define gzputc z_gzputc
80 # define gztell z_gztell 86 # define gzputs z_gzputs
81 # define gztell64 z_gztell64 87 # define gzread z_gzread
82 # define gzungetc z_gzungetc 88 # define gzrewind z_gzrewind
83 # define gzwrite z_gzwrite 89 # define gzseek z_gzseek
90 # define gzseek64 z_gzseek64
91 # define gzsetparams z_gzsetparams
92 # define gztell z_gztell
93 # define gztell64 z_gztell64
94 # define gzungetc z_gzungetc
95 # define gzwrite z_gzwrite
96 # endif
84 # define inflate z_inflate 97 # define inflate z_inflate
85 # define inflateBack z_inflateBack 98 # define inflateBack z_inflateBack
86 # define inflateBackEnd z_inflateBackEnd 99 # define inflateBackEnd z_inflateBackEnd
87 # define inflateBackInit_ z_inflateBackInit_ 100 # define inflateBackInit_ z_inflateBackInit_
88 # define inflateCopy z_inflateCopy 101 # define inflateCopy z_inflateCopy
89 # define inflateEnd z_inflateEnd 102 # define inflateEnd z_inflateEnd
90 # define inflateGetHeader z_inflateGetHeader 103 # define inflateGetHeader z_inflateGetHeader
91 # define inflateInit2_ z_inflateInit2_ 104 # define inflateInit2_ z_inflateInit2_
92 # define inflateInit_ z_inflateInit_ 105 # define inflateInit_ z_inflateInit_
93 # define inflateMark z_inflateMark 106 # define inflateMark z_inflateMark
94 # define inflatePrime z_inflatePrime 107 # define inflatePrime z_inflatePrime
95 # define inflateReset z_inflateReset 108 # define inflateReset z_inflateReset
96 # define inflateReset2 z_inflateReset2 109 # define inflateReset2 z_inflateReset2
97 # define inflateSetDictionary z_inflateSetDictionary 110 # define inflateSetDictionary z_inflateSetDictionary
111 # define inflateGetDictionary z_inflateGetDictionary
98 # define inflateSync z_inflateSync 112 # define inflateSync z_inflateSync
99 # define inflateSyncPoint z_inflateSyncPoint 113 # define inflateSyncPoint z_inflateSyncPoint
100 # define inflateUndermine z_inflateUndermine 114 # define inflateUndermine z_inflateUndermine
115 # define inflateResetKeep z_inflateResetKeep
101 # define inflate_copyright z_inflate_copyright 116 # define inflate_copyright z_inflate_copyright
102 # define inflate_fast z_inflate_fast 117 # define inflate_fast z_inflate_fast
103 # define inflate_table z_inflate_table 118 # define inflate_table z_inflate_table
104 # define uncompress z_uncompress 119 # ifndef Z_SOLO
120 # define uncompress z_uncompress
121 # endif
105 # define zError z_zError 122 # define zError z_zError
106 # define zcalloc z_zcalloc 123 # ifndef Z_SOLO
107 # define zcfree z_zcfree 124 # define zcalloc z_zcalloc
125 # define zcfree z_zcfree
126 # endif
108 # define zlibCompileFlags z_zlibCompileFlags 127 # define zlibCompileFlags z_zlibCompileFlags
109 # define zlibVersion z_zlibVersion 128 # define zlibVersion z_zlibVersion
110 129
111 /* all zlib typedefs in zlib.h and zconf.h */ 130 /* all zlib typedefs in zlib.h and zconf.h */
112 # define Byte z_Byte 131 # define Byte z_Byte
113 # define Bytef z_Bytef 132 # define Bytef z_Bytef
114 # define alloc_func z_alloc_func 133 # define alloc_func z_alloc_func
115 # define charf z_charf 134 # define charf z_charf
116 # define free_func z_free_func 135 # define free_func z_free_func
117 # define gzFile z_gzFile 136 # ifndef Z_SOLO
137 # define gzFile z_gzFile
138 # endif
118 # define gz_header z_gz_header 139 # define gz_header z_gz_header
119 # define gz_headerp z_gz_headerp 140 # define gz_headerp z_gz_headerp
120 # define in_func z_in_func 141 # define in_func z_in_func
121 # define intf z_intf 142 # define intf z_intf
122 # define out_func z_out_func 143 # define out_func z_out_func
123 # define uInt z_uInt 144 # define uInt z_uInt
124 # define uIntf z_uIntf 145 # define uIntf z_uIntf
125 # define uLong z_uLong 146 # define uLong z_uLong
126 # define uLongf z_uLongf 147 # define uLongf z_uLongf
127 # define voidp z_voidp 148 # define voidp z_voidp
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ 214 #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
194 # define STDC 215 # define STDC
195 #endif 216 #endif
196 217
197 #ifndef STDC 218 #ifndef STDC
198 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ 219 # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
199 # define const /* note: need a more gentle solution here */ 220 # define const /* note: need a more gentle solution here */
200 # endif 221 # endif
201 #endif 222 #endif
202 223
224 #if defined(ZLIB_CONST) && !defined(z_const)
225 # define z_const const
226 #else
227 # define z_const
228 #endif
229
203 /* Some Mac compilers merge all .h files incorrectly: */ 230 /* Some Mac compilers merge all .h files incorrectly: */
204 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) 231 #if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
205 # define NO_DUMMY_DECL 232 # define NO_DUMMY_DECL
206 #endif 233 #endif
207 234
208 /* Maximum value for memLevel in deflateInit2 */ 235 /* Maximum value for memLevel in deflateInit2 */
209 #ifndef MAX_MEM_LEVEL 236 #ifndef MAX_MEM_LEVEL
210 # ifdef MAXSEG_64K 237 # ifdef MAXSEG_64K
211 # define MAX_MEM_LEVEL 8 238 # define MAX_MEM_LEVEL 8
212 # else 239 # else
(...skipping 26 matching lines...) Expand all
239 /* Type declarations */ 266 /* Type declarations */
240 267
241 #ifndef OF /* function prototypes */ 268 #ifndef OF /* function prototypes */
242 # ifdef STDC 269 # ifdef STDC
243 # define OF(args) args 270 # define OF(args) args
244 # else 271 # else
245 # define OF(args) () 272 # define OF(args) ()
246 # endif 273 # endif
247 #endif 274 #endif
248 275
276 #ifndef Z_ARG /* function prototypes for stdarg */
277 # if defined(STDC) || defined(Z_HAVE_STDARG_H)
278 # define Z_ARG(args) args
279 # else
280 # define Z_ARG(args) ()
281 # endif
282 #endif
283
249 /* The following definitions for FAR are needed only for MSDOS mixed 284 /* The following definitions for FAR are needed only for MSDOS mixed
250 * model programming (small or medium model with some far allocations). 285 * model programming (small or medium model with some far allocations).
251 * This was tested only with MSC; for other MSDOS compilers you may have 286 * This was tested only with MSC; for other MSDOS compilers you may have
252 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 287 * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
253 * just define FAR to be empty. 288 * just define FAR to be empty.
254 */ 289 */
255 #ifdef SYS16BIT 290 #ifdef SYS16BIT
256 # if defined(M_I86SM) || defined(M_I86MM) 291 # if defined(M_I86SM) || defined(M_I86MM)
257 /* MSC small or medium model */ 292 /* MSC small or medium model */
258 # define SMALL_MEDIUM 293 # define SMALL_MEDIUM
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 #ifdef STDC 387 #ifdef STDC
353 typedef void const *voidpc; 388 typedef void const *voidpc;
354 typedef void FAR *voidpf; 389 typedef void FAR *voidpf;
355 typedef void *voidp; 390 typedef void *voidp;
356 #else 391 #else
357 typedef Byte const *voidpc; 392 typedef Byte const *voidpc;
358 typedef Byte FAR *voidpf; 393 typedef Byte FAR *voidpf;
359 typedef Byte *voidp; 394 typedef Byte *voidp;
360 #endif 395 #endif
361 396
397 #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
398 # include <limits.h>
399 # if (UINT_MAX == 0xffffffffUL)
400 # define Z_U4 unsigned
401 # elif (ULONG_MAX == 0xffffffffUL)
402 # define Z_U4 unsigned long
403 # elif (USHRT_MAX == 0xffffffffUL)
404 # define Z_U4 unsigned short
405 # endif
406 #endif
407
408 #ifdef Z_U4
409 typedef Z_U4 z_crc_t;
410 #else
411 typedef unsigned long z_crc_t;
412 #endif
413
362 #if !defined(_WIN32) 414 #if !defined(_WIN32)
363 # define Z_HAVE_UNISTD_H 415 # define Z_HAVE_UNISTD_H
364 #endif 416 #endif
365 417
418 #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
419 # define Z_HAVE_STDARG_H
420 #endif
421
366 #ifdef STDC 422 #ifdef STDC
367 # include <sys/types.h> /* for off_t */ 423 # ifndef Z_SOLO
424 # include <sys/types.h> /* for off_t */
425 # endif
426 #endif
427
428 #if defined(STDC) || defined(Z_HAVE_STDARG_H)
429 # ifndef Z_SOLO
430 # include <stdarg.h> /* for va_list */
431 # endif
432 #endif
433
434 #ifdef _WIN32
435 # ifndef Z_SOLO
436 # include <stddef.h> /* for wchar_t */
437 # endif
368 #endif 438 #endif
369 439
370 /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 440 /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
371 * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 441 * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
372 * though the former does not conform to the LFS document), but considering 442 * though the former does not conform to the LFS document), but considering
373 * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 443 * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
374 * equivalently requesting no 64-bit operations 444 * equivalently requesting no 64-bit operations
375 */ 445 */
376 #if -_LARGEFILE64_SOURCE - -1 == 1 446 #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
377 # undef _LARGEFILE64_SOURCE 447 # undef _LARGEFILE64_SOURCE
378 #endif 448 #endif
379 449
380 #if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) 450 #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
381 # include <unistd.h> /* for SEEK_* and off_t */ 451 # define Z_HAVE_UNISTD_H
382 # ifdef VMS 452 #endif
383 # include <unixio.h> /* for off_t */ 453 #ifndef Z_SOLO
384 # endif 454 # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
385 # ifndef z_off_t 455 # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
386 # define z_off_t off_t 456 # ifdef VMS
457 # include <unixio.h> /* for off_t */
458 # endif
459 # ifndef z_off_t
460 # define z_off_t off_t
461 # endif
387 # endif 462 # endif
388 #endif 463 #endif
389 464
390 #ifndef SEEK_SET 465 #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
466 # define Z_LFS64
467 #endif
468
469 #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
470 # define Z_LARGE64
471 #endif
472
473 #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
474 # define Z_WANT64
475 #endif
476
477 #if !defined(SEEK_SET) && !defined(Z_SOLO)
391 # define SEEK_SET 0 /* Seek from beginning of file. */ 478 # define SEEK_SET 0 /* Seek from beginning of file. */
392 # define SEEK_CUR 1 /* Seek from current position. */ 479 # define SEEK_CUR 1 /* Seek from current position. */
393 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ 480 # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
394 #endif 481 #endif
395 482
396 #ifndef z_off_t 483 #ifndef z_off_t
397 # define z_off_t long 484 # define z_off_t long
398 #endif 485 #endif
399 486
400 #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 487 #if !defined(_WIN32) && defined(Z_LARGE64)
401 # define z_off64_t off64_t 488 # define z_off64_t off64_t
402 #else 489 #else
403 # define z_off64_t z_off_t 490 # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
404 #endif 491 # define z_off64_t __int64
405 492 # else
406 #if defined(__OS400__) 493 # define z_off64_t z_off_t
407 # define NO_vsnprintf 494 # endif
408 #endif
409
410 #if defined(__MVS__)
411 # define NO_vsnprintf
412 #endif 495 #endif
413 496
414 /* MVS linker does not support external names larger than 8 bytes */ 497 /* MVS linker does not support external names larger than 8 bytes */
415 #if defined(__MVS__) 498 #if defined(__MVS__)
416 #pragma map(deflateInit_,"DEIN") 499 #pragma map(deflateInit_,"DEIN")
417 #pragma map(deflateInit2_,"DEIN2") 500 #pragma map(deflateInit2_,"DEIN2")
418 #pragma map(deflateEnd,"DEEND") 501 #pragma map(deflateEnd,"DEEND")
419 #pragma map(deflateBound,"DEBND") 502 #pragma map(deflateBound,"DEBND")
420 #pragma map(inflateInit_,"ININ") 503 #pragma map(inflateInit_,"ININ")
421 #pragma map(inflateInit2_,"ININ2") 504 #pragma map(inflateInit2_,"ININ2")
422 #pragma map(inflateEnd,"INEND") 505 #pragma map(inflateEnd,"INEND")
423 #pragma map(inflateSync,"INSY") 506 #pragma map(inflateSync,"INSY")
424 #pragma map(inflateSetDictionary,"INSEDI") 507 #pragma map(inflateSetDictionary,"INSEDI")
425 #pragma map(compressBound,"CMBND") 508 #pragma map(compressBound,"CMBND")
426 #pragma map(inflate_table,"INTABL") 509 #pragma map(inflate_table,"INTABL")
427 #pragma map(inflate_fast,"INFA") 510 #pragma map(inflate_fast,"INFA")
428 #pragma map(inflate_copyright,"INCOPY") 511 #pragma map(inflate_copyright,"INCOPY")
429 #endif 512 #endif
430 513
431 #endif /* ZCONF_H */ 514 #endif /* ZCONF_H */
OLDNEW
« no previous file with comments | « third_party/zlib/uncompr.c ('k') | third_party/zlib/zlib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698