_export void*
p4_dlopenext (const char* name)
{
char libname[255];
if (! name) return 0;
if (! p4_dlself) p4_dlinit ();
strncpy (libname, name, 255);
# ifdef USE_LTDL
return (void*)lt_dlopenext(libname);
# else
strncat (libname, ".so" , 255);
if (! memchr (libname, '\0' , 255)) return 0;
return (void*) dlopen (libname, RTLD_NOW|RTLD_GLOBAL);
# endif
} |