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@zend.com> | 16 +----------------------------------------------------------------------+ 17 */ 18 19 /* $Id$ */ 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 /* PHP_BCMATH_H */ 62