diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2016-03-30 17:29:18 -0500 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2016-03-30 17:29:18 -0500 |
commit | cc3009e613f3e2c64bd047be05f8332c6042853d (patch) | |
tree | c1a03e1bd6f06e28452548e7e42286a0c9506cda | |
parent | 18c708c3a6042a859865096a49fa7fdb6680bf6b (diff) | |
download | cygwin-zlib-cc3009e613f3e2c64bd047be05f8332c6042853d.tar.gz cygwin-zlib-cc3009e613f3e2c64bd047be05f8332c6042853d.tar.xz cygwin-zlib-cc3009e613f3e2c64bd047be05f8332c6042853d.zip |
Commit missing patches
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | zlib-1.2.5-minizip-fixuncrypt.patch | 14 | ||||
-rw-r--r-- | zlib-1.2.7-z-block-flush.patch | 45 | ||||
-rw-r--r-- | zlib-1.2.8-minizip-include.patch | 27 |
4 files changed, 87 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..65ff587 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/zlib-1.2.8.tar.gz diff --git a/zlib-1.2.5-minizip-fixuncrypt.patch b/zlib-1.2.5-minizip-fixuncrypt.patch new file mode 100644 index 0000000..d113879 --- /dev/null +++ b/zlib-1.2.5-minizip-fixuncrypt.patch @@ -0,0 +1,14 @@ +diff -up zlib-1.2.5/contrib/minizip/unzip.c.fixuncrypt zlib-1.2.5/contrib/minizip/unzip.c +--- zlib-1.2.5/contrib/minizip/unzip.c.fixuncrypt 2011-11-11 12:13:56.335867758 -0500 ++++ zlib-1.2.5/contrib/minizip/unzip.c 2011-11-11 12:14:01.747799372 -0500 +@@ -68,10 +68,6 @@ + #include <stdlib.h> + #include <string.h> + +-#ifndef NOUNCRYPT +- #define NOUNCRYPT +-#endif +- + #include "zlib.h" + #include "unzip.h" + diff --git a/zlib-1.2.7-z-block-flush.patch b/zlib-1.2.7-z-block-flush.patch new file mode 100644 index 0000000..9bca519 --- /dev/null +++ b/zlib-1.2.7-z-block-flush.patch @@ -0,0 +1,45 @@ +From f1b8edadc3c733990f8a8de4d643f968e571ae85 Mon Sep 17 00:00:00 2001 +From: Adam Tkac <atkac@redhat.com> +Date: Fri, 17 Aug 2012 15:13:48 +0200 +Subject: [PATCH] Rank Z_BLOCK flush below Z_PARTIAL_FLUSH only when last + flush was Z_BLOCK. + +This fixes regression introduced by f1ebdd6a9c495a5db9a22aa80dd7d54ae7db42e9 +(Permit stronger flushes after Z_BLOCK flushes.). Now this code is valid +again: + +deflate(stream, Z_SYNC_FLUSH); +deflateParams(stream, newLevel, Z_DEFAULT_STRATEGY); + +Signed-off-by: Adam Tkac <atkac@redhat.com> +--- + deflate.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/deflate.c b/deflate.c +index 9e4c2cb..3422f72 100644 +--- a/deflate.c ++++ b/deflate.c +@@ -882,9 +882,16 @@ int ZEXPORT deflate (strm, flush) + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ +- } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) && +- flush != Z_FINISH) { +- ERR_RETURN(strm, Z_BUF_ERROR); ++ } else if (strm->avail_in == 0 && flush != Z_FINISH) { ++ char err; ++ ++ /* Degrade Z_BLOCK only when last flush was Z_BLOCK */ ++ err = (old_flush == Z_BLOCK) ? ++ RANK(flush) <= RANK(old_flush) : flush <= old_flush; ++ ++ if (err) { ++ ERR_RETURN(strm, Z_BUF_ERROR); ++ } + } + + /* User must not provide more input after the first FINISH: */ +-- +1.7.11.4 + diff --git a/zlib-1.2.8-minizip-include.patch b/zlib-1.2.8-minizip-include.patch new file mode 100644 index 0000000..e8afe95 --- /dev/null +++ b/zlib-1.2.8-minizip-include.patch @@ -0,0 +1,27 @@ +From 790c73ad93732d31ec6ae5ba4d7116d7f8fb46a2 Mon Sep 17 00:00:00 2001 +From: Kalev Lember <kalevlember@gmail.com> +Date: Sat, 10 Aug 2013 14:54:04 +0200 +Subject: [PATCH] minizip: Add missing include + +Include zconf.h for z_crc_t, fixes a regression from commit +63ba7582b80eb81b126c2931e485481c35596aab. +--- + contrib/minizip/crypt.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/contrib/minizip/crypt.h b/contrib/minizip/crypt.h +index 1e9e820..835a2ba 100644 +--- a/contrib/minizip/crypt.h ++++ b/contrib/minizip/crypt.h +@@ -27,6 +27,8 @@ + Encryption is not supported. + */ + ++#include "zconf.h" ++ + #define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) + + /*********************************************************************** +-- +1.8.3.1 + |