cvs: Zend(PHP_4_3) / zend.h zend_API.c
| From: | Rasmus Lerdorf | Date: | Mon, 10 Jan 2005 21:28:30 +0000 |
| Subject: | cvs: Zend(PHP_4_3) / zend.h zend_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3274@lists.php.net to get a copy of this message | ||
rasmus Mon Jan 10 16:28:30 2005 EDT
Modified files: (Branch: PHP_4_3)
/Zend zend.h zend_API.c
Log:
Fixed shared extensions on OSX. We were using zend_mh_bundle_load to
load a shared extension, but dlclose() to unload it because it was
hardcoded. This caused problems for extensions loaded from php.ini
since the Apple linker does a symbol check on an unload and we hadn't
properly unloaded the shared extensions when Apache unloaded the parent
PHP shared library during its 2-pass load/unload/load startup routine.
By fixing the DL_UNLOAD macro and un-hardcoding the dlclose() call this
now works.
http://cvs.php.net/diff.php/Zend/zend.h?r1=1.164.2.25&r2=1.164.2.26&ty=u
Index: Zend/zend.h
diff -u Zend/zend.h:1.164.2.25 Zend/zend.h:1.164.2.26
--- Zend/zend.h:1.164.2.25 Sun Jan 9 16:06:23 2005
+++ Zend/zend.h Mon Jan 10 16:28:30 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h,v 1.164.2.25 2005/01/09 21:06:23 sniper Exp $ */
+/* $Id: zend.h,v 1.164.2.26 2005/01/10 21:28:30 rasmus Exp $ */
#ifndef ZEND_H
#define ZEND_H
@@ -116,7 +116,7 @@
# define ZEND_EXTENSIONS_SUPPORT 1
#elif defined(HAVE_MACH_O_DYLD_H)
# define DL_LOAD(libname) zend_mh_bundle_load(libname)
-# define DL_UNLOAD(handle) zend_mh_bundle_unload(handle)
+# define DL_UNLOAD zend_mh_bundle_unload
# define DL_FETCH_SYMBOL(h,s) zend_mh_bundle_symbol(h,s)
# define DL_ERROR zend_mh_bundle_error
# define DL_HANDLE void *
http://cvs.php.net/diff.php/Zend/zend_API.c?r1=1.113.2.4&r2=1.113.2.5&ty=u
Index: Zend/zend_API.c
diff -u Zend/zend_API.c:1.113.2.4 Zend/zend_API.c:1.113.2.5
--- Zend/zend_API.c:1.113.2.4 Mon Sep 22 00:22:06 2003
+++ Zend/zend_API.c Mon Jan 10 16:28:30 2005
@@ -1131,7 +1131,7 @@
#if HAVE_LIBDL
if (module->handle) {
- dlclose(module->handle);
+ DL_UNLOAD(module->handle);
}
#endif
}