Made bcmath extension thread safe.

@Made bcmath extension thread safe. (Sander)
This commit is contained in:
Sander Roobol 2002-11-22 09:25:29 +00:00
parent 64a75d6d77
commit f200f739d8
14 changed files with 186 additions and 202 deletions

View file

@ -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);