php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #53829
Patch zlib-largefile-function-renaming revision 2013-02-08 12:24 UTC by skettler@php.net
Patch gzopen64 revision 2012-08-26 10:57 UTC by comments at sentfrom dot com

Patch zlib-largefile-function-renaming for Zlib related Bug #53829

Patch version 2013-02-08 12:24 UTC

Return to Bug #53829 | Download this patch
Patch Revisions:

Developer: skettler@php.net

Index: php54-5.4.11/ext/zlib/zlib.c
===================================================================
--- php54-5.4.11.orig/ext/zlib/zlib.c
+++ php54-5.4.11/ext/zlib/zlib.c
@@ -34,6 +34,18 @@
 #include "ext/standard/php_string.h"
 #include "php_zlib.h"
 
+/*
+ * 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
+
 ZEND_DECLARE_MODULE_GLOBALS(zlib);
 
 /* {{{ Memory management wrappers */
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 01:01:28 2024 UTC