xref: /PHP-7.3/ext/bcmath/php_bcmath.h (revision 9afce019)
1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 7                                                        |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1997-2018 The PHP Group                                |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 3.01 of the PHP license,      |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.php.net/license/3_01.txt                                  |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Author: Andi Gutmans <andi@php.net>                                  |
16    +----------------------------------------------------------------------+
17 */
18 
19 #ifndef PHP_BCMATH_H
20 #define PHP_BCMATH_H
21 
22 #include "libbcmath/src/bcmath.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 PHP_MINIT_FUNCTION(bcmath);
31 PHP_MSHUTDOWN_FUNCTION(bcmath);
32 PHP_MINFO_FUNCTION(bcmath);
33 
34 PHP_FUNCTION(bcadd);
35 PHP_FUNCTION(bcsub);
36 PHP_FUNCTION(bcmul);
37 PHP_FUNCTION(bcdiv);
38 PHP_FUNCTION(bcmod);
39 PHP_FUNCTION(bcpow);
40 PHP_FUNCTION(bcsqrt);
41 PHP_FUNCTION(bccomp);
42 PHP_FUNCTION(bcscale);
43 PHP_FUNCTION(bcpowmod);
44 
45 ZEND_BEGIN_MODULE_GLOBALS(bcmath)
46 	bc_num _zero_;
47 	bc_num _one_;
48 	bc_num _two_;
49 	zend_long bc_precision;
50 ZEND_END_MODULE_GLOBALS(bcmath)
51 
52 #if defined(ZTS) && defined(COMPILE_DL_BCMATH)
53 ZEND_TSRMLS_CACHE_EXTERN()
54 #endif
55 
56 ZEND_EXTERN_MODULE_GLOBALS(bcmath)
57 #define BCG(v) ZEND_MODULE_GLOBALS_ACCESSOR(bcmath, v)
58 
59 #endif /* PHP_BCMATH_H */
60