PSARC/2014/167 zlib 1.2.8 s11-update
authorPetr Sumbera <petr.sumbera@oracle.com>
Mon, 22 Dec 2014 05:44:26 -0800
branchs11-update
changeset 3670 fe32d4cd3c6b
parent 3668 614657dc60eb
child 3672 8cca0e1c6328
PSARC/2014/167 zlib 1.2.8 16808660 Upgrade zlib to 1.2.8 for decompression bug fix 15596370 SUNBT6891268 zlib should provide large file support
components/zlib/Makefile
components/zlib/llib-lz
components/zlib/mapfile
components/zlib/patches/destdir.patch
components/zlib/patches/manpage.patch
components/zlib/patches/parfait.patch
components/zlib/patches/perf.patch
components/zlib/zlib.license
components/zlib/zlib.p5m
--- a/components/zlib/Makefile	Mon Dec 22 06:30:12 2014 -0800
+++ b/components/zlib/Makefile	Mon Dec 22 05:44:26 2014 -0800
@@ -20,22 +20,22 @@
 #
 
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		zlib
-COMPONENT_VERSION=	1.2.3
+COMPONENT_VERSION=	1.2.8
 COMPONENT_PROJECT_URL=	http://www.zlib.net/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e
+    sha256:36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d
 COMPONENT_ARCHIVE_URL=	http://downloads.sourceforge.net/project/libpng/zlib/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	library/libz
 
-TPNO=			9246
+TPNO=			17611
 
 include ../../make-rules/prep.mk
 include ../../make-rules/configure.mk
@@ -67,16 +67,19 @@
 	$(RM) $(@D)/Makefile $(@D)/zconf.h; \
 	$(CP) $(SOURCE_DIR)/zconf.h $(@D) )
 CFLAGS_EXTRA = -DUNALIGNED_OK -DORIG_LONGEST_MATCH_GLOBAL
-PIC_OBJS =
+PIC_OBJA=
 else
 COMPONENT_PRE_CONFIGURE_ACTION = ( \
 	$(CLONEY) $(SOURCE_DIR) $(@D); \
 	$(RM) $(@D)/Makefile $(@D)/zconf.h; \
 	$(CP) $(SOURCE_DIR)/zconf.h $(@D) )
 CFLAGS_EXTRA = -DORIG_LONGEST_MATCH_GLOBAL -xinline=%auto,no%longest_match
-PIC_OBJS=$(CAP_OBJS)
+PIC_OBJA=$(CAP_OBJS)
 endif
 
+# Avoid *.lo.bc from Parfait analyze (see also parfait.patch).
+PARFAIT += -X *.lo.bc
+
 CFLAGS += $(CC_PIC)
 
 CFLAGS += $(CFLAGS_EXTRA)
@@ -95,7 +98,7 @@
 # This LDSHARED definitions is forced to get all required options plus
 # mapfile for result linking. While the one used with configure is just
 # to allow Zlib detect capability of creating shared libraries.
-COMPONENT_BUILD_ARGS = LDSHARED="$(CC) $(CFLAGS) -G -h libz.so.1 $(LD_OPTIONS_SO) -M ../../mapfile -L." PIC_OBJS=$(PIC_OBJS)
+COMPONENT_BUILD_ARGS = LDSHARED="$(CC) $(CFLAGS) -G -h libz.so.1 $(LD_OPTIONS_SO) -M ../../mapfile -L." PIC_OBJA=$(PIC_OBJA)
 
 $(BUILD_DIR)/sparc%/.built: COMPONENT_PRE_BUILD_ACTION = ( \
 	cd capabilities; \
--- a/components/zlib/llib-lz	Mon Dec 22 06:30:12 2014 -0800
+++ b/components/zlib/llib-lz	Mon Dec 22 05:44:26 2014 -0800
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  */
 
 /* LINTLIBRARY */
@@ -45,10 +45,12 @@
 int deflateEnd(z_streamp strm);
 int deflateTune(z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain);
 uLong deflateBound(z_streamp strm, uLong sourceLen);
+int deflatePending(z_streamp strm, unsigned *pending, int *bits);
 int deflatePrime(z_streamp strm, int bits, int value);
 int deflateSetHeader(z_streamp strm, gz_headerp head);
 int inflateCopy(z_streamp dest, z_streamp source);
 int inflatePrime(z_streamp strm, int bits, int value);
+long inflateMark(z_streamp strm);
 int inflateGetHeader(z_streamp strm, gz_headerp head);
 int inflateBack(z_streamp strm, in_func in, void FAR *in_desc, out_func out, void FAR *out_desc);
 int inflateBackEnd(z_streamp strm);
@@ -60,8 +62,10 @@
 int inflate(z_streamp strm, int flush);
 int inflateSetDictionary(z_streamp strm, const Bytef *dictionary,
     uInt dictLength);
+int inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt  *dictLength);
 int inflateSync(z_streamp strm);
 int inflateReset(z_streamp strm);
+int inflateReset2(z_streamp strm, int windowBits);
 int inflateEnd(z_streamp strm);
 int compress(Bytef *dest, uLongf *destLen, const Bytef *source,
     uLong sourceLen);
@@ -71,7 +75,9 @@
 int uncompress(Bytef *dest, uLongf *destLen, const Bytef *source,
     uLong sourceLen);
 gzFile gzopen(const char *path, const char *mode);
+gzFile gzopen64(const char *path, const char *mode);
 gzFile gzdopen(int fd, const char *mode);
+int gzbuffer(gzFile file, unsigned size);
 int gzsetparams(gzFile file, int level, int strategy);
 int gzread(gzFile file, voidp buf, unsigned len);
 int gzwrite(gzFile file, voidpc buf, unsigned len);
@@ -80,21 +86,32 @@
 char *gzgets(gzFile file, char *buf, int len);
 int gzungetc(int c, gzFile file);
 int gzputc(gzFile file, int c);
-int gzgetc(gzFile file);
 int gzflush(gzFile file, int flush);
 z_off_t gzseek(gzFile file, z_off_t offset, int whence);
+z_off64_t gzseek64(gzFile, z_off64_t, int);
 int gzrewind(gzFile file);
 z_off_t gztell(gzFile file);
+z_off64_t gztell64(gzFile file);
+z_off_t gzoffset(gzFile file);
+z_off64_t gzoffset64(gzFile file);
 int gzeof(gzFile file);
 int gzclose(gzFile file);
+int gzclose_r(gzFile file);
+int gzclose_w(gzFile file);
 int gzdirect(gzFile file);
 void gzclearerr(gzFile file);
 const char *gzerror(gzFile file, int *errnum);
 uLong adler32(uLong adler, const Bytef *buf, uInt len);
 uLong adler32_combine(uLong adler1, uLong adler2, z_off_t len2);
+uLong adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2);
 uLong crc32(uLong crc, const Bytef *buf, uInt len);
 uLong crc32_combine(uLong crc1, uLong crc2, z_off_t len2);
+uLong crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2);
 const char *zError(int err);
 uLong zlibCompileFlags(void);
 int inflateSyncPoint(z_streamp z);
-const uLongf *get_crc_table(void);
+const z_crc_t *get_crc_table(void);
+int inflateUndermine(z_streamp, int);
+int inflateResetKeep(z_streamp);
+int deflateResetKeep(z_streamp);
+int gzvprintf(gzFile file, const char *format, va_list va);
--- a/components/zlib/mapfile	Mon Dec 22 06:30:12 2014 -0800
+++ b/components/zlib/mapfile	Mon Dec 22 05:44:26 2014 -0800
@@ -32,12 +32,34 @@
 #
 # Note that the source above actually lives in the ON tree.
 #
-# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 # public interfaces in libz
 #
 $mapfile_version 2
 
+SYMBOL_VERSION SUNW_1.3 {
+    global:
+	deflatePending ;
+	inflateGetDictionary ;
+	inflateReset2 ;
+	inflateMark ;
+	gzbuffer ;
+	gzoffset ;
+	gzclose_r ;
+	gzclose_w ;
+	gzopen64 ;
+	gzseek64 ;
+	gztell64 ;
+	gzoffset64 ;
+	adler32_combine64 ;
+	crc32_combine64 ;
+	inflateUndermine ;
+	inflateResetKeep ;
+	deflateResetKeep ;
+	gzvprintf ;
+} SUNW_1.2;
+
 SYMBOL_VERSION SUNW_1.2 {
     global:
 	deflateTune ;
--- a/components/zlib/patches/destdir.patch	Mon Dec 22 06:30:12 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
---- zlib-1.2.3/Makefile.in.orig
-+++ zlib-1.2.3/Makefile.in
-@@ -90,23 +90,23 @@
- 	$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
- 
- install: $(LIBS)
--	-@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
--	-@if [ ! -d $(includedir)  ]; then mkdir -p $(includedir); fi
--	-@if [ ! -d $(libdir)      ]; then mkdir -p $(libdir); fi
--	-@if [ ! -d $(man3dir)     ]; then mkdir -p $(man3dir); fi
--	cp zlib.h zconf.h $(includedir)
--	chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
--	cp $(LIBS) $(libdir)
--	cd $(libdir); chmod 755 $(LIBS)
--	-@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
--	cd $(libdir); if test -f $(SHAREDLIBV); then \
-+	-@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
-+	-@if [ ! -d $(DESTDIR)$(includedir)  ]; then mkdir -p $(DESTDIR)$(includedir); fi
-+	-@if [ ! -d $(DESTDIR)$(libdir)      ]; then mkdir -p $(DESTDIR)$(libdir); fi
-+	-@if [ ! -d $(DESTDIR)$(man3dir)     ]; then mkdir -p $(DESTDIR)$(man3dir); fi
-+	cp zlib.h zconf.h $(DESTDIR)$(includedir)
-+	chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
-+	cp $(LIBS) $(DESTDIR)$(libdir)
-+	cd $(DESTDIR)$(libdir); chmod 755 $(LIBS)
-+	-@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
-+	cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
- 	  rm -f $(SHAREDLIB) $(SHAREDLIBM); \
- 	  ln -s $(SHAREDLIBV) $(SHAREDLIB); \
- 	  ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
- 	  (ldconfig || true)  >/dev/null 2>&1; \
- 	fi
--	cp zlib.3 $(man3dir)
--	chmod 644 $(man3dir)/zlib.3
-+	cp zlib.3 $(DESTDIR)$(man3dir)
-+	chmod 644 $(DESTDIR)$(man3dir)/zlib.3
- # The ranlib in install is needed on NeXTSTEP which checks file times
- # ldconfig is for Linux
- 
--- a/components/zlib/patches/manpage.patch	Mon Dec 22 06:30:12 2014 -0800
+++ b/components/zlib/patches/manpage.patch	Mon Dec 22 05:44:26 2014 -0800
@@ -1,20 +1,22 @@
---- zlib-1.2.3/zlib.3.orig
-+++ zlib-1.2.3/zlib.3
-@@ -1,6 +1,6 @@
--.TH ZLIB 3 "18 July 2005"
-+.TH LIBZ 3 "18 July 2005"
+Patch origin: in-house
+Patch status: Solaris-specific; not suitable for upstream
+
+--- zlib-1.2.8/zlib.3	2013-04-28 17:23:49.000000000 -0700
++++ zlib-1.2.8/zlib.3	2014-04-18 06:07:00.037749015 -0700
+@@ -1,13 +1,13 @@
+-.TH ZLIB 3 "28 Apr 2013"
++.TH LIBZ 3 "28 Apr 2013"
  .SH NAME
 -zlib \- compression/decompression library
 +libz \- compression/decompression library
  .SH SYNOPSIS
  [see
  .I zlib.h
-@@ -7,7 +7,7 @@
  for full description]
  .SH DESCRIPTION
  The
 -.I zlib
 +.I libz (zlib)
  library is a general purpose data compression library.
- The code is thread safe.
- It provides in-memory compression and decompression functions,
+ The code is thread safe, assuming that the standard library functions
+ used are thread safe, such as memory allocation routines.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/zlib/patches/parfait.patch	Mon Dec 22 05:44:26 2014 -0800
@@ -0,0 +1,20 @@
+Patch origin: in-house
+Patch status: Solaris-specific; not suitable for upstream
+
+ZLIB renames *.o file into *.lo before it links them info shared
+library. We need to do same to *.o.bc files so they are recognized by
+Parfait during linking.
+
+Downside of it is that Parfait will analyze also these separate object
+files.
+
+--- zlib-1.2.8/Makefile.in	2013-04-28 15:57:11.000000000 -0700
++++ zlib-1.2.8/Makefile.in	2014-05-07 07:30:58.047571894 -0700
+@@ -158,6 +158,7 @@
+ 	-@mkdir objs 2>/dev/null || test -d objs
+ 	$(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $<
+ 	-@mv objs/$*.o $@
++	-@if [ -f objs/$*.o.bc ]; then mv objs/$*.o.bc [email protected]; fi
+ 
+ placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a
+ 	$(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS)
--- a/components/zlib/patches/perf.patch	Mon Dec 22 06:30:12 2014 -0800
+++ b/components/zlib/patches/perf.patch	Mon Dec 22 05:44:26 2014 -0800
@@ -1,38 +1,28 @@
---- zlib-1.2.3/zlib.h.orig   Sun Jul 17 19:26:49 2005
-+++ zlib-1.2.3/zlib.h        Tue May 22 10:17:54 2012
+Patch origin: in-house
+Patch status: inffast.c part: submitted back to community without feedback
+Patch status: deflate.c part: Solaris-specific; not suitable for upstream
+
+--- zlib-1.2.8/zlib.h	2013-04-28 17:23:49.000000000 -0700
++++ zlib-1.2.8/zlib.h	2014-04-18 05:32:31.316290241 -0700
 @@ -37,8 +37,8 @@
  extern "C" {
  #endif
  
--#define ZLIB_VERSION "1.2.3"
--#define ZLIB_VERNUM 0x1230
-+#define ZLIB_VERSION "1.2.3-T4mods"
-+#define ZLIB_VERNUM 0x123f
- 
- /*
-      The 'zlib' compression library provides in-memory compression and
---- zlib-1.2.3/Makefile.in.orig	Mon May 14 14:29:35 2012
-+++ zlib-1.2.3/Makefile.in	Mon May 14 14:30:29 2012
-@@ -77,8 +77,8 @@
- 	mv _match.o match.o
- 	rm -f _match.s
- 
--$(SHAREDLIBV): $(OBJS)
--	$(LDSHARED) -o $@ $(OBJS)
-+$(SHAREDLIBV): $(OBJS) $(PIC_OBJS)
-+	$(LDSHARED) -o $@ $(OBJS) $(PIC_OBJS)
- 	rm -f $(SHAREDLIB) $(SHAREDLIBM)
- 	ln -s $@ $(SHAREDLIB)
- 	ln -s $@ $(SHAREDLIBM)
-
---- zlib-1.2.3/inffast.c.orig	Fri Nov 12 22:05:29 2004
-+++ zlib-1.2.3/inffast.c	Tue Mar 27 08:05:36 2012
+-#define ZLIB_VERSION "1.2.8"
+-#define ZLIB_VERNUM 0x1280
++#define ZLIB_VERSION "1.2.8-T4mods"
++#define ZLIB_VERNUM 0x128f
+ #define ZLIB_VER_MAJOR 1
+ #define ZLIB_VER_MINOR 2
+ #define ZLIB_VER_REVISION 8
+--- zlib-1.2.8/inffast.c	2013-03-24 22:47:59.000000000 -0700
++++ zlib-1.2.8/inffast.c	2014-02-28 01:57:57.075708259 -0800
 @@ -87,7 +87,7 @@
      code const FAR *dcode;      /* local strm->distcode */
      unsigned lmask;             /* mask for first level of length codes */
      unsigned dmask;             /* mask for first level of distance codes */
--    code this;                  /* retrieved table entry */
-+    code *this;                 /* retrieved table entry */
+-    code here;                  /* retrieved table entry */
++    code *here;                 /* retrieved table entry */
      unsigned op;                /* code bits, operation, extra bits, or */
                                  /*  window position, window bytes to copy */
      unsigned len;               /* match length, unused bytes */
@@ -40,27 +30,27 @@
              hold += (unsigned long)(PUP(in)) << bits;
              bits += 8;
          }
--        this = lcode[hold & lmask];
-+        this = (code *)(&(lcode[hold & lmask]));
+-        here = lcode[hold & lmask];
++        here = (code *)(&(lcode[hold & lmask]));
        dolen:
--        op = (unsigned)(this.bits);
-+        op = (unsigned)(this->bits);
+-        op = (unsigned)(here.bits);
++        op = (unsigned)(here->bits);
          hold >>= op;
          bits -= op;
--        op = (unsigned)(this.op);
-+        op = (unsigned)(this->op);
+-        op = (unsigned)(here.op);
++        op = (unsigned)(here->op);
          if (op == 0) {                          /* literal */
--            Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-+            Tracevv((stderr, this->val >= 0x20 && this->val < 0x7f ?
+-            Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
++            Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ?
                      "inflate:         literal '%c'\n" :
--                    "inflate:         literal 0x%02x\n", this.val));
--            PUP(out) = (unsigned char)(this.val);
-+                    "inflate:         literal 0x%02x\n", this->val));
-+            PUP(out) = (unsigned char)(this->val);
+-                    "inflate:         literal 0x%02x\n", here.val));
+-            PUP(out) = (unsigned char)(here.val);
++                    "inflate:         literal 0x%02x\n", here->val));
++            PUP(out) = (unsigned char)(here->val);
          }
          else if (op & 16) {                     /* length base */
--            len = (unsigned)(this.val);
-+            len = (unsigned)(this->val);
+-            len = (unsigned)(here.val);
++            len = (unsigned)(here->val);
              op &= 15;                           /* number of extra bits */
              if (op) {
                  if (bits < op) {
@@ -68,44 +58,50 @@
                  hold += (unsigned long)(PUP(in)) << bits;
                  bits += 8;
              }
--            this = dcode[hold & dmask];
-+            this = (code *)(&(dcode[hold & dmask]));
+-            here = dcode[hold & dmask];
++            here = (code *)(&(dcode[hold & dmask]));
            dodist:
--            op = (unsigned)(this.bits);
-+            op = (unsigned)(this->bits);
+-            op = (unsigned)(here.bits);
++            op = (unsigned)(here->bits);
              hold >>= op;
              bits -= op;
--            op = (unsigned)(this.op);
-+            op = (unsigned)(this->op);
+-            op = (unsigned)(here.op);
++            op = (unsigned)(here->op);
              if (op & 16) {                      /* distance base */
--                dist = (unsigned)(this.val);
-+                dist = (unsigned)(this->val);
+-                dist = (unsigned)(here.val);
++                dist = (unsigned)(here->val);
                  op &= 15;                       /* number of extra bits */
                  if (bits < op) {
                      hold += (unsigned long)(PUP(in)) << bits;
-@@ -259,7 +259,8 @@
+@@ -281,7 +281,7 @@
                  }
              }
              else if ((op & 64) == 0) {          /* 2nd level distance code */
--                this = dcode[this.val + (hold & ((1U << op) - 1))];
-+                this = (code *)
-+		    (&(dcode[this->val + (hold & ((1U << op) - 1))]));
+-                here = dcode[here.val + (hold & ((1U << op) - 1))];
++                here = (code *)(&(dcode[here->val + (hold & ((1U << op) - 1))]));
                  goto dodist;
              }
              else {
-@@ -269,7 +270,7 @@
+@@ -291,7 +291,7 @@
              }
          }
          else if ((op & 64) == 0) {              /* 2nd level length code */
--            this = lcode[this.val + (hold & ((1U << op) - 1))];
-+            this = (code *)(&(lcode[this->val + (hold & ((1U << op) - 1))]));
+-            here = lcode[here.val + (hold & ((1U << op) - 1))];
++            here = (code *)(&(lcode[here->val + (hold & ((1U << op) - 1))]));
              goto dolen;
          }
          else if (op & 32) {                     /* end-of-block */
-
---- zlib-1.2.3/deflate.c.orig   Tue Mar 27 10:02:52 2012
-+++ zlib-1.2.3/deflate.c        Sun Jul 17 19:27:31 2005
-@@ -88,9 +88,13 @@
+--- zlib-1.2.8/deflate.c	2013-04-28 15:57:10.000000000 -0700
++++ zlib-1.2.8/deflate.c	2014-02-28 02:32:02.517988885 -0800
+@@ -60,6 +60,7 @@
+   copyright string in the executable of your product.
+  */
+ 
++#ifndef LONGEST_MATCH_ONLY
+ /* ===========================================================================
+  *  Function prototypes.
+  */
+@@ -89,13 +90,18 @@
        void match_init OF((void)); /* asm code initialization */
        uInt longest_match  OF((deflate_state *s, IPos cur_match));
  #else
@@ -113,21 +109,36 @@
  local uInt longest_match  OF((deflate_state *s, IPos cur_match));
 +#else
 +uInt longest_match  OF((deflate_state *s, IPos cur_match));
++#endif
+ #endif
+ 
+ #ifdef DEBUG
+ local  void check_match OF((deflate_state *s, IPos start, IPos match,
+                             int length));
+ #endif
++#endif /* ! LONGEST_MATCH_ONLY */
+ 
+ /* ===========================================================================
+  * Local data
+@@ -104,6 +110,7 @@
+ #define NIL 0
+ /* Tail of hash chains */
+ 
++#ifndef LONGEST_MATCH_ONLY
+ #ifndef TOO_FAR
+ #  define TOO_FAR 4096
+ #endif
+@@ -1130,7 +1137,9 @@
  #endif
  #endif
-+#endif
- local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
- 
- #ifdef DEBUG
-@@ -1010,6 +1014,7 @@
- #endif
  }
++#endif /* ! LONGEST_MATCH_ONLY */
  
 +#if defined(ORIG_LONGEST_MATCH) || defined(ORIG_LONGEST_MATCH_GLOBAL)
  #ifndef FASTEST
  /* ===========================================================================
   * Set match_start to the longest match starting at the given string and
-@@ -1024,7 +1029,11 @@
+@@ -1145,7 +1154,11 @@
  /* For 80x86 and 680x0, an optimized version will be provided in match.asm or
   * match.S. The code will be functionally equivalent.
   */
@@ -139,11 +150,24 @@
      deflate_state *s;
      IPos cur_match;                             /* current match */
  {
-@@ -1168,6 +1177,7 @@
+@@ -1288,6 +1301,7 @@
+     return s->lookahead;
  }
  #endif /* ASMV */
- #endif /* FASTEST */
 +#endif /* ORIG_LONGEST_MATCHT */
  
- /* ---------------------------------------------------------------------------
-  * Optimized version for level == 1 or strategy == Z_RLE only
+ #else /* FASTEST */
+ 
+@@ -1349,6 +1363,7 @@
+ 
+ #endif /* FASTEST */
+ 
++#ifndef LONGEST_MATCH_ONLY
+ #ifdef DEBUG
+ /* ===========================================================================
+  * Check that the match at match_start is indeed a match.
+@@ -1965,3 +1980,4 @@
+         FLUSH_BLOCK(s, 0);
+     return block_done;
+ }
++#endif /* ! LONGEST_MATCH_ONLY */
--- a/components/zlib/zlib.license	Mon Dec 22 06:30:12 2014 -0800
+++ b/components/zlib/zlib.license	Mon Dec 22 05:44:26 2014 -0800
@@ -1,5 +1,5 @@
 
-(C) 1995-2002 Jean-loup Gailly and Mark Adler
+Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
 
 This software is provided 'as-is', without any express or implied
 warranty.  In no event will the authors be held liable for any damages
--- a/components/zlib/zlib.p5m	Mon Dec 22 06:30:12 2014 -0800
+++ b/components/zlib/zlib.p5m	Mon Dec 22 05:44:26 2014 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability committed>
@@ -35,15 +35,6 @@
     value=PSARC/2006/537
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
 
-dir path=lib
-dir path=lib/$(MACH64)
-dir path=usr
-dir path=usr/include
-dir path=usr/lib
-dir path=usr/lib/$(MACH64)
-dir path=usr/share
-dir path=usr/share/man
-dir path=usr/share/man/man3
 
 file usr/lib/libz.so.1 path=lib/libz.so.1
 file usr/lib/llib-lz.ln path=lib/llib-lz.ln