From 4cde8d52f15e04634c322a3db0c270cdd6a7087b Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Thu, 4 Oct 2012 14:39:29 +0200 Subject: [PATCH] - updated patch optimizing deflate on s390(x) architectures --- zlib-1.2.7-optimized-s390.patch | 20 ++++++-------------- zlib.spec | 5 ++++- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/zlib-1.2.7-optimized-s390.patch b/zlib-1.2.7-optimized-s390.patch index b8a158c..4534674 100644 --- a/zlib-1.2.7-optimized-s390.patch +++ b/zlib-1.2.7-optimized-s390.patch @@ -1,7 +1,7 @@ diff -upr zlib-1.2.7.orig/deflate.c zlib-1.2.7/deflate.c ---- zlib-1.2.7.orig/deflate.c 2012-02-13 01:15:47.000000000 +0100 -+++ zlib-1.2.7/deflate.c 2012-08-13 12:58:49.275911722 +0200 -@@ -1143,15 +1143,16 @@ local void lm_init (s) +--- zlib-1.2.7.orig/deflate.c 2012-10-04 12:18:50.750427902 +0200 ++++ zlib-1.2.7/deflate.c 2012-10-04 12:20:04.222190460 +0200 +@@ -1150,15 +1150,16 @@ local void lm_init (s) /* For 80x86 and 680x0, an optimized version will be provided in match.asm or * match.S. The code will be functionally equivalent. */ @@ -11,25 +11,17 @@ diff -upr zlib-1.2.7.orig/deflate.c zlib-1.2.7/deflate.c - IPos cur_match; /* current match */ + IPos pcur_match; /* current match */ { -+ uLong cur_match = pcur_match; /* extend to pointer width */ ++ ptrdiff_t cur_match = pcur_match; /* extend to pointer width */ unsigned chain_length = s->max_chain_length;/* max hash chain length */ register Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *match; /* matched string */ register int len; /* length of current match */ - int best_len = s->prev_length; /* best match length so far */ -+ uLong best_len = s->prev_length; /* best match length so far */ ++ ptrdiff_t best_len = s->prev_length; /* best match length so far */ int nice_match = s->nice_match; /* stop if match long enough */ IPos limit = s->strstart > (IPos)MAX_DIST(s) ? s->strstart - (IPos)MAX_DIST(s) : NIL; -@@ -1159,19 +1160,19 @@ local uInt longest_match(s, cur_match) - * we prevent matches with the string of window index 0. - */ - Posf *prev = s->prev; -- uInt wmask = s->w_mask; -+ uLong wmask = s->w_mask; - - #ifdef UNALIGNED_OK - /* Compare two bytes at a time. Note: this is not always beneficial. +@@ -1173,12 +1174,12 @@ local uInt longest_match(s, cur_match) * Try with and without -DUNALIGNED_OK to check. */ register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; diff --git a/zlib.spec b/zlib.spec index 026140b..95443bd 100644 --- a/zlib.spec +++ b/zlib.spec @@ -1,7 +1,7 @@ Summary: The compression and decompression library Name: zlib Version: 1.2.7 -Release: 8%{?dist} +Release: 9%{?dist} # /contrib/dotzlib/ have Boost license License: zlib and Boost Group: System Environment/Libraries @@ -126,6 +126,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_libdir}/pkgconfig/minizip.pc %changelog +* Thu Oct 4 2012 Peter Schiffer - 1.2.7-9 +- updated patch optimizing deflate on s390(x) architectures + * Wed Aug 29 2012 Peter Schiffer - 1.2.7-8 - related: #832545 reverted changes for this bug, static libraries shouldn't be compiled with