[Libreoffice-commits] .: 2 commits - package/source zlib/zlib-1.2.3.patch zlib/zlib-valgrind.patch

Caolán McNamara caolan at kemper.freedesktop.org
Wed Feb 15 08:28:45 PST 2012


 package/source/zipapi/CRC32.cxx |   12 +---
 zlib/zlib-1.2.3.patch           |  103 ----------------------------------------
 zlib/zlib-valgrind.patch        |   78 ------------------------------
 3 files changed, 3 insertions(+), 190 deletions(-)

New commits:
commit a5384f5640dd9d571dff7663b0d69029fc6c2d82
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 15 16:11:34 2012 +0000

    remove unapplied patches

diff --git a/zlib/zlib-1.2.3.patch b/zlib/zlib-1.2.3.patch
deleted file mode 100644
index 4bfad28..0000000
--- a/zlib/zlib-1.2.3.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- misc/zlib-1.2.3/makefile.mk	Fri Mar 14 10:17:06 2008
-+++ misc/build/zlib-1.2.3/makefile.mk	Fri Mar 14 10:16:56 2008
-@@ -1 +1,73 @@
--dummy
-+#*************************************************************************
-+#
-+#   Copyright according the GNU Public License.
-+#
-+#*************************************************************************
-+
-+PRJ=..$/..$/..$/..
-+
-+PRJNAME=zlib
-+TARGET=zlib
-+LIBTARGET=NO
-+EXTERNAL_WARNINGS_NOT_ERRORS=TRUE
-+
-+# --- Settings -----------------------------------------------------
-+
-+.INCLUDE :  settings.mk
-+
-+# --- Files --------------------------------------------------------
-+
-+INCEXT=contrib$/minizip
-+
-+SLOFILES=	$(SLO)$/adler32.obj		\
-+			$(SLO)$/compress.obj	\
-+			$(SLO)$/deflate.obj		\
-+			$(SLO)$/crc32.obj		\
-+			$(SLO)$/inffast.obj		\
-+			$(SLO)$/inflate.obj		\
-+			$(SLO)$/inftrees.obj	\
-+			$(SLO)$/infback.obj		\
-+			$(SLO)$/trees.obj		\
-+			$(SLO)$/zutil.obj       \
-+			$(SLO)$/uncompr.obj		\
-+			$(SLO)$/gzio.obj		\
-+			$(SLO)$/unzip.obj		\
-+			$(SLO)$/ioapi.obj
-+
-+
-+LIB1TARGET=$(SLB)$/$(TARGET).lib
-+LIB1ARCHIV=$(LB)$/lib$(TARGET).a
-+LIB1OBJFILES=$(SLOFILES)
-+
-+.IF "$(BUILD_X64)"!=""
-+SLOFILES_X64=	$(SLO_X64)$/adler32.obj		\
-+			$(SLO_X64)$/compress.obj	\
-+			$(SLO_X64)$/deflate.obj		\
-+			$(SLO_X64)$/crc32.obj		\
-+			$(SLO_X64)$/inffast.obj		\
-+			$(SLO_X64)$/inflate.obj		\
-+			$(SLO_X64)$/inftrees.obj	\
-+			$(SLO_X64)$/infback.obj		\
-+			$(SLO_X64)$/trees.obj		\
-+			$(SLO_X64)$/zutil.obj       \
-+			$(SLO_X64)$/uncompr.obj		\
-+			$(SLO_X64)$/gzio.obj		\
-+			$(SLO_X64)$/unzip.obj		\
-+			$(SLO_X64)$/ioapi.obj
-+
-+LIB1TARGET_X64=$(SLB_X64)$/$(TARGET).lib
-+LIB1OBJFILES_X64=$(SLOFILES_X64)
-+.ENDIF # "$(BUILD_X64)"!=""
-+
-+
-+# --- Targets ------------------------------------------------------
-+
-+$(MISC)$/%.c : contrib$/minizip$/%.c
-+	@echo ------------------------------
-+	@echo Making: $@
-+    @$(COPY) $< $@
-+
-+.INCLUDE :  set_wntx64.mk
-+.INCLUDE :  target.mk
-+.INCLUDE :  tg_wntx64.mk
-+
---- misc/zlib-1.2.3/zconf.h	2010-07-15 09:33:48.921875000 +0200
-+++ misc/build/zlib-1.2.3/zconf.h	2010-07-15 09:39:27.000000000 +0200
-@@ -12,6 +12,12 @@
-  * If you *really* need a unique prefix for all types and library functions,
-  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
-  */
-+/*
-+ * we need the prefix to get the same names as in 1.1.3
-+*/
-+
-+#define Z_PREFIX
-+
- #ifdef Z_PREFIX
- #  define deflateInit_          z_deflateInit_
- #  define deflate               z_deflate
---- misc/zlib-1.2.3/zutil.h
-+++ misc/build/zlib-1.2.3/zutil.h
-@@ -175,7 +175,7 @@
- 
-          /* functions */
- 
--#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
-+#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) || defined(_MSC_VER)
- #  ifndef HAVE_VSNPRINTF
- #    define HAVE_VSNPRINTF
- #  endif
diff --git a/zlib/zlib-valgrind.patch b/zlib/zlib-valgrind.patch
deleted file mode 100644
index 3789ee4..0000000
--- a/zlib/zlib-valgrind.patch
+++ /dev/null
@@ -1,78 +0,0 @@
---- misc/zlib-1.2.3/deflate.c
-+++ misc/build/zlib-1.2.3/deflate.c
-@@ -288,6 +288,8 @@
-     s->prev   = (Posf *)  ZALLOC(strm, s->w_size, sizeof(Pos));
-     s->head   = (Posf *)  ZALLOC(strm, s->hash_size, sizeof(Pos));
- 
-+    s->high_water = 0;      /* nothing written to s->window yet */
-+
-     s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
- 
-     overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
-@@ -1355,6 +1355,40 @@
-          */
- 
-     } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
-+
-+    /* If the WIN_INIT bytes after the end of the current data have never been
-+     * written, then zero those bytes in order to avoid memory check reports of
-+     * the use of uninitialized (or uninitialised as Julian writes) bytes by
-+     * the longest match routines.  Update the high water mark for the next
-+     * time through here.  WIN_INIT is set to MAX_MATCH since the longest match
-+     * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
-+     */
-+    if (s->high_water < s->window_size) {
-+        ulg curr = s->strstart + (ulg)(s->lookahead);
-+        ulg init;
-+
-+        if (s->high_water < curr) {
-+            /* Previous high water mark below current data -- zero WIN_INIT
-+             * bytes or up to end of window, whichever is less.
-+             */
-+            init = s->window_size - curr;
-+            if (init > WIN_INIT)
-+                init = WIN_INIT;
-+            zmemzero(s->window + curr, (unsigned)init);
-+            s->high_water = curr + init;
-+        }
-+        else if (s->high_water < (ulg)curr + WIN_INIT) {
-+            /* High water mark at or above current data, but below current data
-+             * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
-+             * to end of window, whichever is less.
-+             */
-+            init = (ulg)curr + WIN_INIT - s->high_water;
-+            if (init > s->window_size - s->high_water)
-+                init = s->window_size - s->high_water;
-+            zmemzero(s->window + s->high_water, (unsigned)init);
-+            s->high_water += init;
-+        }
-+    }
- }
- 
- /* ===========================================================================
---- misc/zlib-1.2.3/deflate.h
-+++ misc/build/zlib-1.2.3/deflate.h
-@@ -260,6 +260,12 @@
-      * are always zero.
-      */
- 
-+    ulg high_water;
-+    /* High water mark offset in window for initialized bytes -- bytes above
-+     * this are set to zero in order to avoid memory check warnings when
-+     * longest match routines access bytes past the input.  This is then
-+     * updated to the new high water mark.
-+     */
- } FAR deflate_state;
- 
- /* Output a byte on the stream.
-@@ -278,6 +284,10 @@
-  * distances are limited to MAX_DIST instead of WSIZE.
-  */
- 
-+#define WIN_INIT MAX_MATCH
-+/* Number of bytes after end of data in window to initialize in order to avoid
-+   memory checker errors from longest match routines */
-+
-         /* in trees.c */
- void _tr_init         OF((deflate_state *s));
- int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));
commit dcfc99705f958114e9b28aeb58b8081b58a32a6a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 15 16:08:46 2012 +0000

    use sal crc32 and skip cast frenzy

diff --git a/package/source/zipapi/CRC32.cxx b/package/source/zipapi/CRC32.cxx
index 5c5dedc..274fb58 100644
--- a/package/source/zipapi/CRC32.cxx
+++ b/package/source/zipapi/CRC32.cxx
@@ -27,14 +27,8 @@
  ************************************************************************/
 
 #include <CRC32.hxx>
-#ifndef _ZLIB_H
-#ifdef SYSTEM_ZLIB
-#include <zlib.h>
-#else
-#include <external/zlib/zlib.h>
-#endif
-#endif
 #include <PackageConstants.hxx>
+#include <rtl/crc.h>
 #include <com/sun/star/io/XInputStream.hpp>
 
 using namespace com::sun::star::uno;
@@ -67,14 +61,14 @@ void SAL_CALL CRC32::updateSegment(const Sequence< sal_Int8 > &b,
                                     sal_Int32 len)
         throw(RuntimeException)
 {
-    nCRC = crc32(nCRC, (const unsigned char*)b.getConstArray()+off, len );
+    nCRC = rtl_crc32(nCRC, b.getConstArray()+off, len );
 }
 /** Update CRC32 with specified sequence of bytes
  */
 void SAL_CALL CRC32::update(const Sequence< sal_Int8 > &b)
         throw(RuntimeException)
 {
-    nCRC = crc32(nCRC, (const unsigned char*)b.getConstArray(),b.getLength());
+    nCRC = rtl_crc32(nCRC, b.getConstArray(),b.getLength());
 }
 
 sal_Int32 SAL_CALL CRC32::updateStream( Reference < XInputStream > & xStream )


More information about the Libreoffice-commits mailing list