xref: /php-src/ext/bcmath/php_bcmath.h (revision 53593927)
1 /*
2    +----------------------------------------------------------------------+
3    | Copyright (c) The PHP Group                                          |
4    +----------------------------------------------------------------------+
5    | This source file is subject to version 3.01 of the PHP license,      |
6    | that is bundled with this package in the file LICENSE, and is        |
7    | available through the world-wide-web at the following url:           |
8    | https://www.php.net/license/3_01.txt                                 |
9    | If you did not receive a copy of the PHP license and are unable to   |
10    | obtain it through the world-wide-web, please send a note to          |
11    | license@php.net so we can mail you a copy immediately.               |
12    +----------------------------------------------------------------------+
13    | Author: Andi Gutmans <andi@php.net>                                  |
14    +----------------------------------------------------------------------+
15 */
16 
17 #ifndef PHP_BCMATH_H
18 #define PHP_BCMATH_H
19 
20 #include "libbcmath/src/bcmath.h"
21 #include "zend_API.h"
22 #include "ext/standard/php_math_round_mode.h"
23 
24 extern zend_module_entry bcmath_module_entry;
25 #define phpext_bcmath_ptr &bcmath_module_entry
26 
27 #include "php_version.h"
28 #define PHP_BCMATH_VERSION PHP_VERSION
29 
30 ZEND_BEGIN_MODULE_GLOBALS(bcmath)
31 	bc_num _zero_;
32 	bc_num _one_;
33 	bc_num _two_;
34 	int bc_precision;
35 ZEND_END_MODULE_GLOBALS(bcmath)
36 
37 #if defined(ZTS) && defined(COMPILE_DL_BCMATH)
38 ZEND_TSRMLS_CACHE_EXTERN()
39 #endif
40 
41 ZEND_EXTERN_MODULE_GLOBALS(bcmath)
42 #define BCG(v) ZEND_MODULE_GLOBALS_ACCESSOR(bcmath, v)
43 
44 #endif /* PHP_BCMATH_H */
45