Back to index

php5  5.3.10
php_bz2.h
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 1997-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Author: Sterling Hughes <sterling@php.net>                           |
00016   +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: php_bz2.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef PHP_BZ2_H
00022 #define PHP_BZ2_H
00023 
00024 #if HAVE_BZ2
00025 
00026 extern zend_module_entry bz2_module_entry;
00027 #define phpext_bz2_ptr &bz2_module_entry
00028 
00029 /* Bzip2 includes */
00030 #include <bzlib.h>
00031 
00032 #else
00033 #define phpext_bz2_ptr NULL
00034 #endif
00035 
00036 #ifdef PHP_WIN32
00037 #      ifdef PHP_BZ2_EXPORTS
00038 #             define PHP_BZ2_API __declspec(dllexport)
00039 #      elif defined(COMPILE_DL_BZ2)
00040 #             define PHP_BZ2_API __declspec(dllimport)
00041 #      else
00042 #             define PHP_BZ2_API /* nothing special */
00043 #      endif
00044 #elif defined(__GNUC__) && __GNUC__ >= 4
00045 #      define PHP_BZ2_API __attribute__ ((visibility("default")))
00046 #else
00047 #      define PHP_BZ2_API
00048 #endif
00049 
00050 PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
00051 PHP_BZ2_API php_stream *_php_stream_bz2open_from_BZFILE(BZFILE *bz, char *mode, php_stream *innerstream STREAMS_DC TSRMLS_DC);
00052 
00053 #define php_stream_bz2open_from_BZFILE(bz, mode, innerstream)  _php_stream_bz2open_from_BZFILE((bz), (mode), (innerstream) STREAMS_CC TSRMLS_CC)
00054 #define php_stream_bz2open(wrapper, path, mode, options, opened_path) _php_stream_bz2open((wrapper), (path), (mode), (options), (opened_path), NULL STREAMS_CC TSRMLS_CC)
00055 
00056 extern php_stream_filter_factory php_bz2_filter_factory;
00057 extern php_stream_ops php_stream_bz2io_ops;
00058 #define PHP_STREAM_IS_BZIP2 &php_stream_bz2io_ops
00059 
00060 /* 400kb */
00061 #define PHP_BZ2_FILTER_DEFAULT_BLOCKSIZE        4
00062 
00063 /* BZ2 Internal Default */
00064 #define PHP_BZ2_FILTER_DEFAULT_WORKFACTOR       0
00065 
00066 #endif
00067 
00068 
00069 /*
00070  * Local variables:
00071  * tab-width: 4
00072  * c-basic-offset: 4
00073  * End:
00074  */