From: Sascha Schumann Date: Thu, 30 Mar 2000 01:21:03 +0000 (+0000) Subject: Some OS prepend _ to symbol names while their dynamic linker X-Git-Tag: php-4.0RC2~578 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3642282b075513284f3f18793bbaaf9b9fa42387;p=php Some OS prepend _ to symbol names while their dynamic linker does not do that automatically. Thus we check manually for _get_module. --- diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 68f58614d9..08041e548c 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -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);