[Libreoffice-commits] .: libgsf/libgsf-1.14.19.patch libgsf/libgsf-1.14.19.windows.patch

Tor Lillqvist tml at kemper.freedesktop.org
Tue Aug 16 00:51:03 PDT 2011


 libgsf/libgsf-1.14.19.patch         |   52 ++++++++++++++++++++++++++++++++++++
 libgsf/libgsf-1.14.19.windows.patch |   52 ++++++++++++++++++++++++++++++++++++
 2 files changed, 104 insertions(+)

New commits:
commit f3eea21424b27575defc9faff41958c4ed66ffb0
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Tue Aug 16 10:42:08 2011 +0300

    Fix libgsf build with internal zlib that uses Z_PREFIX

diff --git a/libgsf/libgsf-1.14.19.patch b/libgsf/libgsf-1.14.19.patch
index e8acba5..7afcdd8 100644
--- a/libgsf/libgsf-1.14.19.patch
+++ b/libgsf/libgsf-1.14.19.patch
@@ -36,3 +36,55 @@
  	_pkg_min_version=0.9.0
  	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
  $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+--- misc/libgsf-1.14.19/gsf/gsf-infile-zip.c
++++ misc/build/libgsf-1.14.19/gsf/gsf-infile-zip.c
+@@ -30,6 +30,10 @@
+ 
+ #include <string.h>
+ #include <zlib.h>
++
++#if defined(Z_PREFIX) && defined(crc32)
++#undef crc32
++#endif
+ 
+ #undef G_LOG_DOMAIN
+ #define G_LOG_DOMAIN "libgsf:zip"
+
+--- misc/libgsf-1.14.19/gsf/gsf-outfile-zip.c
++++ misc/build/libgsf-1.14.19/gsf/gsf-outfile-zip.c
+@@ -29,6 +29,11 @@
+ #include <string.h>
+ #include <time.h>
+ #include <zlib.h>
++
++#if defined(Z_PREFIX) && defined(crc32)
++#define CRC32_WAS_DEFINED_AS_Z_CRC32
++#undef crc32
++#endif
+ 
+ #undef G_LOG_DOMAIN
+ #define G_LOG_DOMAIN "libgsf:zip"
+@@ -345,7 +345,11 @@
+ 	zip_header_write (zip);
+ 	zip->writing = TRUE;
+ 	zip->root->writing = TRUE;
++#if defined(CRC32_WAS_DEFINED_AS_Z_CRC32)
++	dirent->crc32 = z_crc32 (0L, Z_NULL, 0);
++#else
+ 	dirent->crc32 = crc32 (0L, Z_NULL, 0);
++#endif
+ 	if (zip->compression_method == GSF_ZIP_DEFLATED) {
+ 		if (!zip->stream) {
+ 			zip->stream = g_new0 (z_stream, 1);
+@@ -544,7 +544,11 @@
+ 			return FALSE;
+ 		dirent->csize += num_bytes;
+ 	}
++#if defined(CRC32_WAS_DEFINED_AS_Z_CRC32)
++	dirent->crc32 = z_crc32 (dirent->crc32, data, num_bytes);
++#else
+ 	dirent->crc32 = crc32 (dirent->crc32, data, num_bytes);
++#endif
+ 	dirent->usize += num_bytes;
+ 
+ 	return TRUE;
diff --git a/libgsf/libgsf-1.14.19.windows.patch b/libgsf/libgsf-1.14.19.windows.patch
index 2f42214..56c10c5 100644
--- a/libgsf/libgsf-1.14.19.windows.patch
+++ b/libgsf/libgsf-1.14.19.windows.patch
@@ -136,3 +136,55 @@
 +$(MISC)$/$(SHL1TARGET).flt: makefile.mk
 +    @echo CLEAR_THE_FILE	> $@
 +
+--- misc/libgsf-1.14.19/gsf/gsf-infile-zip.c
++++ misc/build/libgsf-1.14.19/gsf/gsf-infile-zip.c
+@@ -30,6 +30,10 @@
+ 
+ #include <string.h>
+ #include <zlib.h>
++
++#if defined(Z_PREFIX) && defined(crc32)
++#undef crc32
++#endif
+ 
+ #undef G_LOG_DOMAIN
+ #define G_LOG_DOMAIN "libgsf:zip"
+
+--- misc/libgsf-1.14.19/gsf/gsf-outfile-zip.c
++++ misc/build/libgsf-1.14.19/gsf/gsf-outfile-zip.c
+@@ -29,6 +29,11 @@
+ #include <string.h>
+ #include <time.h>
+ #include <zlib.h>
++
++#if defined(Z_PREFIX) && defined(crc32)
++#define CRC32_WAS_DEFINED_AS_Z_CRC32
++#undef crc32
++#endif
+ 
+ #undef G_LOG_DOMAIN
+ #define G_LOG_DOMAIN "libgsf:zip"
+@@ -345,7 +345,11 @@
+ 	zip_header_write (zip);
+ 	zip->writing = TRUE;
+ 	zip->root->writing = TRUE;
++#if defined(CRC32_WAS_DEFINED_AS_Z_CRC32)
++	dirent->crc32 = z_crc32 (0L, Z_NULL, 0);
++#else
+ 	dirent->crc32 = crc32 (0L, Z_NULL, 0);
++#endif
+ 	if (zip->compression_method == GSF_ZIP_DEFLATED) {
+ 		if (!zip->stream) {
+ 			zip->stream = g_new0 (z_stream, 1);
+@@ -544,7 +544,11 @@
+ 			return FALSE;
+ 		dirent->csize += num_bytes;
+ 	}
++#if defined(CRC32_WAS_DEFINED_AS_Z_CRC32)
++	dirent->crc32 = z_crc32 (dirent->crc32, data, num_bytes);
++#else
+ 	dirent->crc32 = crc32 (dirent->crc32, data, num_bytes);
++#endif
+ 	dirent->usize += num_bytes;
+ 
+ 	return TRUE;


More information about the Libreoffice-commits mailing list