Bugzilla Bug 338798: use PR_FindFunctionSymbol to look up function

symbols. r=alexei.volkov,nelson.
Modified files: freebl/loader.c softoken/dbinit.c
This commit is contained in:
wtchang%redhat.com 2006-06-26 23:42:59 +00:00
Родитель ab411b37bd
Коммит 1360e00abe
2 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -37,7 +37,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: loader.c,v 1.28 2006/02/01 21:18:44 wtchang%redhat.com Exp $ */
/* $Id: loader.c,v 1.29 2006/06/26 23:42:58 wtchang%redhat.com Exp $ */
#include "loader.h"
#include "prmem.h"
@ -284,12 +284,12 @@ bl_LoadLibrary(const char *name)
return lib;
}
static void *
static PRFuncPtr
bl_FindSymbol(BLLibrary *lib, const char *name)
{
void *f;
PRFuncPtr f;
f = PR_FindSymbol(lib->dlh, name);
f = PR_FindFunctionSymbol(lib->dlh, name);
return f;
}
@ -324,7 +324,7 @@ freebl_LoadDSO( void )
handle = bl_LoadLibrary(name);
if (handle) {
void * address = bl_FindSymbol(handle, "FREEBL_GetVector");
PRFuncPtr address = bl_FindSymbol(handle, "FREEBL_GetVector");
if (address) {
FREEBLGetVectorFn * getVector = (FREEBLGetVectorFn *)address;
const FREEBLVector * dsoVector = getVector();

Просмотреть файл

@ -36,7 +36,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: dbinit.c,v 1.28 2005/09/28 17:12:17 relyea%netscape.com Exp $ */
/* $Id: dbinit.c,v 1.29 2006/06/26 23:42:59 wtchang%redhat.com Exp $ */
#include <ctype.h>
#include "seccomon.h"
@ -335,8 +335,8 @@ DB * rdbopen(const char *appName, const char *prefix,
}
/* get the entry points */
sftk_rdbstatusfunc = (rdbstatusfunc) PR_FindSymbol(lib,"rdbstatus");
sftk_rdbfunc = (rdbfunc) PR_FindSymbol(lib,"rdbopen");
sftk_rdbstatusfunc = (rdbstatusfunc) PR_FindFunctionSymbol(lib,"rdbstatus");
sftk_rdbfunc = (rdbfunc) PR_FindFunctionSymbol(lib,"rdbopen");
if (sftk_rdbfunc) {
db = (*sftk_rdbfunc)(appName,prefix,type,rdbmapflags(flags));
if (!db && status && sftk_rdbstatusfunc) {