Update Zlib to version 1.2.8
merge the latest open source zlib into chromium external projects
Version 1.2.8 fixes a very rare bug in decompression. All users are encouraged to upgrade immediately. Version 1.2.8 also has these improvements:
- Add new inflateGetDictionary() function
- Fix bug where gzopen() immediately followed by gzclose() would write an empty file instead of an empty gzip stream.
- Fix bug in gzclose() when gzwrite() runs out of memory Version 1.2.7 has many portability improvements over 1.2.6, and has these enhancements:
- Fix bug in gzclose_w() when gzwrite() fails to allocate memory
- Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen()
- Add gzopen_w() in Windows for wide character path names
- Fix type mismatch between get_crc_table() and crc_table Version 1.2.6 has many changes over 1.2.5, including these improvements:
- gzread() can now read a file that is being written concurrently
- gzgetc() is now a macro for increased speed
- Added a 'T' option to gzopen() for transparent writing (no compression)
- Added deflatePending() to return the amount of pending output
- Allow deflateSetDictionary() and inflateSetDictionary() at any time in raw mode
- deflatePrime() can now insert bits in the middle of the stream
- ./configure now creates a configure.log file with all of the results
- Added a ./configure --solo option to compile zlib with no dependency on any libraries
- Fixed a problem with large file support macros
- Fixed a bug in contrib/puff
- Many portability improvements
BUG=610615 R=gavinp@chromium.org
Review-Url: https://codereview.chromium.org/2084863002
Cr-Original-Commit-Position: refs/heads/master@{#401538}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ca1c569cff20aa43a42816791744d847c7d788de
diff --git a/zutil.c b/zutil.c
index 898ed34..23d2ebe 100644
--- a/zutil.c
+++ b/zutil.c
@@ -1,17 +1,20 @@
/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005, 2010 Jean-loup Gailly.
+ * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#include "zutil.h"
+#ifndef Z_SOLO
+# include "gzguts.h"
+#endif
#ifndef NO_DUMMY_DECL
struct internal_state {int dummy;}; /* for buggy compilers */
#endif
-const char * const z_errmsg[10] = {
+z_const char * const z_errmsg[10] = {
"need dictionary", /* Z_NEED_DICT 2 */
"stream end", /* Z_STREAM_END 1 */
"", /* Z_OK 0 */
@@ -85,27 +88,27 @@
#ifdef FASTEST
flags += 1L << 21;
#endif
-#ifdef STDC
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
# ifdef NO_vsnprintf
- flags += 1L << 25;
+ flags += 1L << 25;
# ifdef HAS_vsprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# else
# ifdef HAS_vsnprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# endif
#else
- flags += 1L << 24;
+ flags += 1L << 24;
# ifdef NO_snprintf
- flags += 1L << 25;
+ flags += 1L << 25;
# ifdef HAS_sprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# else
# ifdef HAS_snprintf_void
- flags += 1L << 26;
+ flags += 1L << 26;
# endif
# endif
#endif
@@ -181,6 +184,7 @@
}
#endif
+#ifndef Z_SOLO
#ifdef SYS16BIT
@@ -316,3 +320,5 @@
}
#endif /* MY_ZCALLOC */
+
+#endif /* !Z_SOLO */