components/php-5_3/php-sapi/patches/172_php_zlib.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Thu, 03 Jul 2014 14:21:36 -0700
changeset 1984 00f4f2142725
permissions -rw-r--r--
18938882 PHP 5.2 and 5.3 need some changes to build with zlib 1.2.8

Patch origin: upstream
Patch status: unclear; patch attached to bug

https://bugs.php.net/bug.php?id=53829

--- php-5.3.17/ext/zlib/zlib.c
+++ php-5.3.17/ext/zlib/zlib.c
@@ -58,6 +58,18 @@
 # endif
 #endif
 
+/*
+ * zlib include files can define the following preprocessor defines which rename
+ * the corresponding PHP functions to gzopen64, gzseek64 and gztell64 and thereby
+ * breaking some software, most notably PEAR's Archive_Tar, which halts execution
+ * without error message on gzip compressed archivesa.
+ *
+ * This only seems to happen on 32bit systems with large file support.
+ */
+#undef gzopen
+#undef gzseek
+#undef gztell
+
 #if defined(HAVE_UNISTD_H) && defined(PHP_WIN32)
 # undef HAVE_UNISTD_H
 #endif