changed sys_dl_sym to sys_dl_getsym
This commit is contained in:
parent
ee5dde159b
commit
47ac7b03a3
@ -79,7 +79,7 @@
|
|||||||
# define sys_dl_open(x) lt_dlopen(x)
|
# define sys_dl_open(x) lt_dlopen(x)
|
||||||
# define sys_dl_openext(x) lt_dlopenext(x)
|
# define sys_dl_openext(x) lt_dlopenext(x)
|
||||||
# define sys_dl_close(x) lt_dlclose(x)
|
# define sys_dl_close(x) lt_dlclose(x)
|
||||||
# define sys_dl_sym(x,n) lt_dlsym(x,n)
|
# define sys_dl_getsym(x,n) lt_dlsym(x,n)
|
||||||
# elif defined(HAVE_DLFCN_H)
|
# elif defined(HAVE_DLFCN_H)
|
||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
# define USE_DLFCN
|
# define USE_DLFCN
|
||||||
@ -87,7 +87,7 @@
|
|||||||
# define sys_dl_open(x) dlopen(x,RTLD_NOW)
|
# define sys_dl_open(x) dlopen(x,RTLD_NOW)
|
||||||
# define sys_dl_openext(x) dlopen(x,RTLD_NOW)
|
# define sys_dl_openext(x) dlopen(x,RTLD_NOW)
|
||||||
# define sys_dl_close(x) dlclose(x)
|
# define sys_dl_close(x) dlclose(x)
|
||||||
# define sys_dl_sym(x,n) dlsym(x,n)
|
# define sys_dl_getsym(x,n) dlsym(x,n)
|
||||||
# else
|
# else
|
||||||
# error UNSUPPORTED DYNAMIC LINKER
|
# error UNSUPPORTED DYNAMIC LINKER
|
||||||
# endif
|
# endif
|
||||||
@ -650,24 +650,24 @@ static void* dl_getsym (moo_t* moo, void* handle, const moo_ooch_t* name)
|
|||||||
for (i = 1; i <= bcslen; i++) if (bufptr[i] == '.') bufptr[i] = '_';
|
for (i = 1; i <= bcslen; i++) if (bufptr[i] == '.') bufptr[i] = '_';
|
||||||
|
|
||||||
symname = &bufptr[1]; /* try the name as it is */
|
symname = &bufptr[1]; /* try the name as it is */
|
||||||
sym = sys_dl_sym(handle, symname);
|
sym = sys_dl_getsym(handle, symname);
|
||||||
if (!sym)
|
if (!sym)
|
||||||
{
|
{
|
||||||
bufptr[0] = '_';
|
bufptr[0] = '_';
|
||||||
symname = &bufptr[0]; /* try _name */
|
symname = &bufptr[0]; /* try _name */
|
||||||
sym = sys_dl_sym(handle, symname);
|
sym = sys_dl_getsym(handle, symname);
|
||||||
if (!sym)
|
if (!sym)
|
||||||
{
|
{
|
||||||
bufptr[bcslen + 1] = '_';
|
bufptr[bcslen + 1] = '_';
|
||||||
bufptr[bcslen + 2] = '\0';
|
bufptr[bcslen + 2] = '\0';
|
||||||
|
|
||||||
symname = &bufptr[1]; /* try name_ */
|
symname = &bufptr[1]; /* try name_ */
|
||||||
sym = sys_dl_sym(handle, symname);
|
sym = sys_dl_getsym(handle, symname);
|
||||||
|
|
||||||
if (!sym)
|
if (!sym)
|
||||||
{
|
{
|
||||||
symname = &bufptr[0]; /* try _name_ */
|
symname = &bufptr[0]; /* try _name_ */
|
||||||
sym = sys_dl_sym(handle, symname);
|
sym = sys_dl_getsym(handle, symname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user