fixing plugins extensions for HP & AIX

# 106806
r=serge@netscape.com,pkw@austin.ibm.com
This commit is contained in:
jdunn%netscape.com 2002-05-22 14:54:23 +00:00
Родитель d0f142fecc
Коммит bc9f30388e
1 изменённых файлов: 14 добавлений и 1 удалений

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

@ -61,10 +61,14 @@
static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID); static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID);
#define LOCAL_PLUGIN_DLL_SUFFIX ".so" #define LOCAL_PLUGIN_DLL_SUFFIX ".so"
#if defined(HPUX11) #if defined(__hpux)
#define DEFAULT_X11_PATH "/usr/lib/X11R6/" #define DEFAULT_X11_PATH "/usr/lib/X11R6/"
#undef LOCAL_PLUGIN_DLL_SUFFIX #undef LOCAL_PLUGIN_DLL_SUFFIX
#define LOCAL_PLUGIN_DLL_SUFFIX ".sl" #define LOCAL_PLUGIN_DLL_SUFFIX ".sl"
#define LOCAL_PLUGIN_DLL_ALT_SUFFIX ".so"
#elif defined(_AIX)
#define DEFAULT_X11_PATH "/usr/lib"
#define LOCAL_PLUGIN_DLL_ALT_SUFFIX ".a"
#elif defined(SOLARIS) #elif defined(SOLARIS)
#define DEFAULT_X11_PATH "/usr/openwin/lib/" #define DEFAULT_X11_PATH "/usr/openwin/lib/"
#elif defined(LINUX) #elif defined(LINUX)
@ -252,6 +256,15 @@ PRBool nsPluginsDir::IsPluginFile(const nsFileSpec& fileSpec)
if (n > 0 && !PL_strcmp(&pathname[n], LOCAL_PLUGIN_DLL_SUFFIX)) { if (n > 0 && !PL_strcmp(&pathname[n], LOCAL_PLUGIN_DLL_SUFFIX)) {
ret = PR_TRUE; // *.so or *.sl file ret = PR_TRUE; // *.so or *.sl file
} }
#ifdef LOCAL_PLUGIN_DLL_ALT_SUFFIX
if (PR_TRUE != ret) {
n = PL_strlen(pathname) - (sizeof(LOCAL_PLUGIN_DLL_ALT_SUFFIX) - 1);
if (n > 0 && !PL_strcmp(&pathname[n], LOCAL_PLUGIN_DLL_ALT_SUFFIX)) {
ret = PR_TRUE;
}
}
#endif
#ifdef NS_DEBUG #ifdef NS_DEBUG
printf("IsPluginFile(%s) == %s\n", pathname, ret?"TRUE":"FALSE"); printf("IsPluginFile(%s) == %s\n", pathname, ret?"TRUE":"FALSE");
#endif #endif