summaryrefslogtreecommitdiff
path: root/ext/zlib/php_zlib.h
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-11-13 18:54:37 (GMT)
committerZeev Suraski <zeev@php.net>2000-11-13 18:54:37 (GMT)
commit0f7f5c2c0e616445d14b49641e85dbddcc1651e5 (patch)
tree83f0bce3ba6ba891798d828e5ad1c0334739513e /ext/zlib/php_zlib.h
parent9b42296babc97defd3b7635b395506d5539aae20 (diff)
downloadphp-0f7f5c2c0e616445d14b49641e85dbddcc1651e5.tar.gz
- Import Jade Nicoletti's transparent gzip encoding support as an output
handler. Works quite nicely! - Fix buglets in output buffering - Add output_handler INI directive
Diffstat (limited to 'ext/zlib/php_zlib.h')
-rw-r--r--ext/zlib/php_zlib.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h
index 518ae25..b856fc9 100644
--- a/ext/zlib/php_zlib.h
+++ b/ext/zlib/php_zlib.h
@@ -22,10 +22,16 @@
#ifndef PHP_ZLIB_H
#define PHP_ZLIB_H
-#if HAVE_ZLIB
+#include <zlib.h>
+
typedef struct {
int gzgetss_state;
+
+ /* variables for transparent gzip encoding */
+ int compression_coding;
+ z_stream stream;
+ uLong crc;
} php_zlib_globals;
extern zend_module_entry php_zlib_module_entry;
@@ -52,21 +58,25 @@ PHP_FUNCTION(gzcompress);
PHP_FUNCTION(gzuncompress);
PHP_FUNCTION(gzdeflate);
PHP_FUNCTION(gzinflate);
+PHP_FUNCTION(gzencode);
+PHP_FUNCTION(ob_gzhandler);
#ifdef ZTS
#define ZLIBLS_D php_zlib_globals *zlib_globals
+#define ZLIBLS_DC , ZLIBLS_D
+#define ZLIBLS_C zlib_globals
+#define ZLIBLS_CC , ZLIBLS_C
#define ZLIBG(v) (zlib_globals->v)
#define ZLIBLS_FETCH() php_zlib_globals *zlib_globals = ts_resource(zlib_globals_id)
#else
#define ZLIBLS_D
+#define ZLIBLS_DC
+#define ZLIBLS_C
+#define ZLIBLS_CC
#define ZLIBG(v) (zlib_globals.v)
#define ZLIBLS_FETCH()
#endif
-#else
-#define zlib_module_ptr NULL
-#endif /* HAVE_ZLIB */
-
#define phpext_zlib_ptr zlib_module_ptr
#endif /* PHP_ZLIB_H */