Use the new dependency system

This commit is contained in:
foobar 2005-06-17 16:42:54 +00:00
parent a491b82c4c
commit 19639aa9ab
3 changed files with 23 additions and 4 deletions

View file

@ -581,10 +581,23 @@ PHP_RSHUTDOWN_FUNCTION(spl) /* {{{ */
return SUCCESS; return SUCCESS;
} /* }}} */ } /* }}} */
#ifdef HAVE_SIMPLEXML
static zend_module_dep spl_deps[] = {
ZEND_MOD_REQUIRED("libxml")
ZEND_MOD_REQUIRED("simplexml")
{NULL, NULL, NULL}
};
#endif
/* {{{ spl_module_entry /* {{{ spl_module_entry
*/ */
zend_module_entry spl_module_entry = { zend_module_entry spl_module_entry = {
#ifdef HAVE_SIMPLEXML
STANDARD_MODULE_HEADER_EX, NULL,
spl_deps,
#else
STANDARD_MODULE_HEADER, STANDARD_MODULE_HEADER,
#endif
"SPL", "SPL",
spl_functions, spl_functions,
PHP_MINIT(spl), PHP_MINIT(spl),

View file

@ -275,7 +275,7 @@ static zend_module_dep sqlite_deps[] = {
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION) #if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
ZEND_MOD_REQUIRED("session") ZEND_MOD_REQUIRED("session")
#endif #endif
#if PHP_SQLITE2_HAVE_PDO #ifdef PHP_SQLITE2_HAVE_PDO
ZEND_MOD_REQUIRED("pdo") ZEND_MOD_REQUIRED("pdo")
#endif #endif
{NULL, NULL, NULL} {NULL, NULL, NULL}
@ -1096,7 +1096,7 @@ PHP_MINIT_FUNCTION(sqlite)
REGISTER_LONG_CONSTANT("SQLITE_ROW", SQLITE_ROW, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SQLITE_ROW", SQLITE_ROW, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SQLITE_DONE", SQLITE_DONE, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SQLITE_DONE", SQLITE_DONE, CONST_CS|CONST_PERSISTENT);
#if PHP_SQLITE2_HAVE_PDO #ifdef PHP_SQLITE2_HAVE_PDO
if (FAILURE == php_pdo_register_driver(&pdo_sqlite2_driver)) { if (FAILURE == php_pdo_register_driver(&pdo_sqlite2_driver)) {
return FAILURE; return FAILURE;
} }
@ -1109,7 +1109,7 @@ PHP_MSHUTDOWN_FUNCTION(sqlite)
{ {
UNREGISTER_INI_ENTRIES(); UNREGISTER_INI_ENTRIES();
#if PHP_SQLITE2_HAVE_PDO #ifdef PHP_SQLITE2_HAVE_PDO
php_pdo_unregister_driver(&pdo_sqlite2_driver); php_pdo_unregister_driver(&pdo_sqlite2_driver);
#endif #endif

View file

@ -276,10 +276,16 @@ static xmlRelaxNGPtr _xmlreader_get_relaxNG(char *source, int source_len, int ty
} }
#endif #endif
static zend_module_dep xmlreader_deps[] = {
ZEND_MOD_REQUIRED("libxml")
{NULL, NULL, NULL}
};
/* {{{ xmlreader_module_entry /* {{{ xmlreader_module_entry
*/ */
zend_module_entry xmlreader_module_entry = { zend_module_entry xmlreader_module_entry = {
STANDARD_MODULE_HEADER, STANDARD_MODULE_HEADER_EX, NULL,
xmlreader_deps,
"xmlreader", "xmlreader",
NULL, NULL,
PHP_MINIT(xmlreader), PHP_MINIT(xmlreader),