summaryrefslogtreecommitdiff
path: root/ext/bcmath/php_bcmath.h
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-12-09 23:59:33 +0000
committerfoobar <sniper@php.net>2003-12-09 23:59:33 +0000
commita08c1e4dce535ba70a5e3d954fce1a3b05411f4b (patch)
tree0a8fea3582a94b82772086262af675d0bdddb60d /ext/bcmath/php_bcmath.h
parent398ab9756a6c6c64f855ed578dd86a9d31168f6e (diff)
downloadphp-git-a08c1e4dce535ba70a5e3d954fce1a3b05411f4b.tar.gz
- Brought ext/bcmath to the new millennium
# consistency..
Diffstat (limited to 'ext/bcmath/php_bcmath.h')
-rw-r--r--ext/bcmath/php_bcmath.h38
1 files changed, 17 insertions, 21 deletions
diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h
index 799c4b2942..e478c4f1f7 100644
--- a/ext/bcmath/php_bcmath.h
+++ b/ext/bcmath/php_bcmath.h
@@ -21,34 +21,15 @@
#ifndef PHP_BCMATH_H
#define PHP_BCMATH_H
-#if WITH_BCMATH
+#if HAVE_BCMATH
#include "libbcmath/src/bcmath.h"
-ZEND_BEGIN_MODULE_GLOBALS(bcmath)
- bc_num _zero_;
- bc_num _one_;
- bc_num _two_;
-ZEND_END_MODULE_GLOBALS(bcmath)
-
-#if ZTS
-# define BCG(v) TSRMG(bcmath_globals_id, zend_bcmath_globals *, v)
-extern int bcmath_globals_id;
-#else
-# define BCG(v) (bcmath_globals.v)
-extern zend_bcmath_globals bcmath_globals;
-#endif
-
-#define BC
-
extern zend_module_entry bcmath_module_entry;
#define phpext_bcmath_ptr &bcmath_module_entry
-#if ZTS
PHP_MINIT_FUNCTION(bcmath);
-#endif
-PHP_RINIT_FUNCTION(bcmath);
-PHP_RSHUTDOWN_FUNCTION(bcmath);
+PHP_MSHUTDOWN_FUNCTION(bcmath);
PHP_MINFO_FUNCTION(bcmath);
PHP_FUNCTION(bcadd);
@@ -62,6 +43,21 @@ PHP_FUNCTION(bccomp);
PHP_FUNCTION(bcscale);
PHP_FUNCTION(bcpowmod);
+ZEND_BEGIN_MODULE_GLOBALS(bcmath)
+ bc_num _zero_;
+ bc_num _one_;
+ bc_num _two_;
+ long bc_precision;
+ZEND_END_MODULE_GLOBALS(bcmath)
+
+#if ZTS
+#define BCG(v) TSRMG(bcmath_globals_id, zend_bcmath_globals *, v)
+#else
+#define BCG(v) (bcmath_globals.v)
+#endif
+
+ZEND_EXTERN_MODULE_GLOBALS(bcmath)
+
#else
#define phpext_bcmath_ptr NULL