--- php-5.2.11/ext/spl/config.m4~ 2006-12-04 20:01:53.000000000 +0200 +++ php-5.2.11/ext/spl/config.m4 2009-09-23 16:07:37.775732678 +0300 @@ -26,7 +26,7 @@ CPPFLAGS=$old_CPPFLAGS AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct _zend_object_value is packed]) AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support]) - PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c, no) + PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c, $ext_shared) PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_sxe.h]) PHP_ADD_EXTENSION_DEP(spl, pcre, true) fi --- php-5.2.11/ext/spl/spl_iterators.c~ 2009-09-23 17:57:06.000000000 +0300 +++ php-5.2.11/ext/spl/spl_iterators.c 2009-09-23 17:57:09.025079005 +0300 @@ -57,7 +57,13 @@ PHPAPI zend_class_entry *spl_ce_AppendIterator; PHPAPI zend_class_entry *spl_ce_RegexIterator; PHPAPI zend_class_entry *spl_ce_RecursiveRegexIterator; +#if COMPILE_DL_SPL +#undef spl_ce_Countable +zend_class_entry *spl_ce_Countable; // real instance +extern PHPAPI zend_class_entry *spl_ce_Countable_p; // external one +#else PHPAPI zend_class_entry *spl_ce_Countable; +#endif zend_function_entry spl_funcs_RecursiveIterator[] = { SPL_ABSTRACT_ME(RecursiveIterator, hasChildren, NULL) @@ -2950,6 +2956,10 @@ REGISTER_SPL_STD_CLASS_EX(EmptyIterator, NULL, spl_funcs_EmptyIterator); REGISTER_SPL_ITERATOR(EmptyIterator); +#if COMPILE_DL_SPL + spl_ce_Countable_p = spl_ce_Countable; +#endif + return SUCCESS; } /* }}} */ --- php-5.2.11/ext/spl/spl_iterators.h 2009-09-23 17:57:59.898412166 +0300 +++ php-5.2.11/ext/spl/spl_iterators.h 2009-09-23 18:04:45.518458679 +0300 @@ -50,7 +50,12 @@ extern PHPAPI zend_class_entry *spl_ce_AppendIterator; extern PHPAPI zend_class_entry *spl_ce_RegexIterator; extern PHPAPI zend_class_entry *spl_ce_RecursiveRegexIterator; +#if COMPILE_DL_SPL +#define spl_ce_Countable spl_ce_Countable_p +extern PHPAPI zend_class_entry *spl_ce_Countable_p; +#else extern PHPAPI zend_class_entry *spl_ce_Countable; +#endif PHP_MINIT_FUNCTION(spl_iterators); --- php-5.2.11/ext/standard/array.c~ 2009-08-14 09:18:47.000000000 +0300 +++ php-5.2.11/ext/standard/array.c 2009-09-24 16:40:24.630430291 +0300 @@ -48,6 +48,9 @@ #include "php_smart_str.h" #ifdef HAVE_SPL #include "ext/spl/spl_array.h" +#if COMPILE_DL_SPL +PHPAPI zend_class_entry *spl_ce_Countable_p = NULL; // external one +#endif #endif /* {{{ defines */ --- php-5.2.11/ext/pdo/pdo.c~ 2009-07-20 01:46:03.000000000 +0300 +++ php-5.2.11/ext/pdo/pdo.c 2009-10-14 13:33:30.397508159 +0300 @@ -127,7 +127,7 @@ /* {{{ pdo_functions[] */ #if ZEND_MODULE_API_NO >= 20050922 static zend_module_dep pdo_deps[] = { -#ifdef HAVE_SPL +#ifdef HAVE_SPL && !COMPILE_DL_SPL ZEND_MOD_REQUIRED("spl") #endif {NULL, NULL, NULL}