Hacked to remove ./ when we PR_LoadLibrary() dlls of the type ./library.so

This improves memory a bit.
This commit is contained in:
dp%netscape.com 1999-02-18 22:37:35 +00:00
Родитель 8dcf8365b9
Коммит 1581c74987
2 изменённых файлов: 26 добавлений и 4 удалений

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

@ -138,8 +138,19 @@ PRBool nsDll::Load(void)
}
#else
m_instance = PR_LoadLibrary(m_fullpath);
#endif
#ifdef XP_UNIX
// On linux we seem to load multiple copies of the same dll but with different path
// like libraptorhtml.so and ./libraptorhtml.so
// Until this get fixed right, for now for ./libraptorhtml.so remove the "./"
if (m_fullpath[0] == '.' && m_fullpath[1] == '/')
m_instance = PR_LoadLibrary( &(m_fullpath[2]) );
else
#endif /* XP_UNIX */
{
// This is the only right way of doing this...
m_instance = PR_LoadLibrary(m_fullpath);
}
#endif /* XP_MAC */
return ((m_instance == NULL) ? PR_FALSE : PR_TRUE);
}

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

@ -138,8 +138,19 @@ PRBool nsDll::Load(void)
}
#else
m_instance = PR_LoadLibrary(m_fullpath);
#endif
#ifdef XP_UNIX
// On linux we seem to load multiple copies of the same dll but with different path
// like libraptorhtml.so and ./libraptorhtml.so
// Until this get fixed right, for now for ./libraptorhtml.so remove the "./"
if (m_fullpath[0] == '.' && m_fullpath[1] == '/')
m_instance = PR_LoadLibrary( &(m_fullpath[2]) );
else
#endif /* XP_UNIX */
{
// This is the only right way of doing this...
m_instance = PR_LoadLibrary(m_fullpath);
}
#endif /* XP_MAC */
return ((m_instance == NULL) ? PR_FALSE : PR_TRUE);
}