1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifndef PHP_BCMATH_H
22 #define PHP_BCMATH_H
23
24 #include "libbcmath/src/bcmath.h"
25
26 extern zend_module_entry bcmath_module_entry;
27 #define phpext_bcmath_ptr &bcmath_module_entry
28
29 #include "php_version.h"
30 #define PHP_BCMATH_VERSION PHP_VERSION
31
32 PHP_MINIT_FUNCTION(bcmath);
33 PHP_MSHUTDOWN_FUNCTION(bcmath);
34 PHP_MINFO_FUNCTION(bcmath);
35
36 PHP_FUNCTION(bcadd);
37 PHP_FUNCTION(bcsub);
38 PHP_FUNCTION(bcmul);
39 PHP_FUNCTION(bcdiv);
40 PHP_FUNCTION(bcmod);
41 PHP_FUNCTION(bcpow);
42 PHP_FUNCTION(bcsqrt);
43 PHP_FUNCTION(bccomp);
44 PHP_FUNCTION(bcscale);
45 PHP_FUNCTION(bcpowmod);
46
47 ZEND_BEGIN_MODULE_GLOBALS(bcmath)
48 bc_num _zero_;
49 bc_num _one_;
50 bc_num _two_;
51 zend_long bc_precision;
52 ZEND_END_MODULE_GLOBALS(bcmath)
53
54 #if defined(ZTS) && defined(COMPILE_DL_BCMATH)
55 ZEND_TSRMLS_CACHE_EXTERN()
56 #endif
57
58 ZEND_EXTERN_MODULE_GLOBALS(bcmath)
59 #define BCG(v) ZEND_MODULE_GLOBALS_ACCESSOR(bcmath, v)
60
61 #endif