initialize OCI in threaded mode if ZTS is defined.

This commit is contained in:
Thies C. Arntzen 1999-09-28 11:12:32 +00:00
parent 9156c2c8d1
commit 74bc24d9d5

View File

@ -376,10 +376,16 @@ PHP_MINIT_FUNCTION(oci)
REGISTER_LONG_CONSTANT("OCI_D_LOB",OCI_DTYPE_LOB, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("OCI_D_ROWID",OCI_DTYPE_ROWID, CONST_CS | CONST_PERSISTENT);
#if OCI_USE_EMALLOC
OCIInitialize(OCI_DEFAULT, NULL, ocimalloc, ocirealloc, ocifree);
#ifdef ZTS
#define PHP_OCI_INIT_MODE OCI_THREADED
#else
OCIInitialize(OCI_DEFAULT, NULL, NULL, NULL, NULL);
#define PHP_OCI_INIT_MODE OCI_DEFAULT
#endif
#if OCI_USE_EMALLOC
OCIInitialize(PHP_OCI_INIT_MODE, NULL, ocimalloc, ocirealloc, ocifree);
#else
OCIInitialize(PHP_OCI_INIT_MODE, NULL, NULL, NULL, NULL);
#endif
return SUCCESS;