]> granicus.if.org Git - php/commitdiff
Some OS prepend _ to symbol names while their dynamic linker
authorSascha Schumann <sas@php.net>
Thu, 30 Mar 2000 01:21:03 +0000 (01:21 +0000)
committerSascha Schumann <sas@php.net>
Thu, 30 Mar 2000 01:21:03 +0000 (01:21 +0000)
does not do that automatically. Thus we check manually for
_get_module.

ext/standard/dl.c

index 68f58614d99387587c1b356dfd2fc63a5c09d55f..08041e548c325aae74c14149d31fa435215ddf4f 100644 (file)
@@ -122,8 +122,18 @@ void php_dl(pval *file,int type,pval *return_value)
 
        efree(libpath);
 
-       get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "get_module");
        
+       get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "get_module");
+
+       /*
+        * some OS prepend _ to symbol names while their dynamic linker
+        * does not do that automatically. Thus we check manually for
+        * _get_module.
+        */
+
+       if (!get_module)
+               get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "_get_module");
+
        if (!get_module) {
                DL_UNLOAD(handle);
                php_error(E_CORE_WARNING,"Invalid library (maybe not a PHP library) '%s' ",file->value.str.val);