summaryrefslogtreecommitdiff
path: root/ext/bcmath/php_bcmath.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bcmath/php_bcmath.h')
-rw-r--r--ext/bcmath/php_bcmath.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h
index bf57c25e88..35299d3cc9 100644
--- a/ext/bcmath/php_bcmath.h
+++ b/ext/bcmath/php_bcmath.h
@@ -23,9 +23,30 @@
#if WITH_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_MINFO_FUNCTION(bcmath);