summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
Diffstat (limited to 'dom')
-rw-r--r--dom/base/nsContentUtils.h4
-rw-r--r--dom/plugins/base/nptypes.h13
-rw-r--r--dom/plugins/base/nsPluginsDirUnix.cpp16
3 files changed, 30 insertions, 3 deletions
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h
index 299a8e859..26635acd6 100644
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -13,6 +13,10 @@
#include <float.h>
#endif
+#if defined(XP_SOLARIS)
+#include <ieeefp.h>
+#endif
+
#include "js/TypeDecls.h"
#include "js/Value.h"
#include "js/RootingAPI.h"
diff --git a/dom/plugins/base/nptypes.h b/dom/plugins/base/nptypes.h
index c36532472..d0cef6540 100644
--- a/dom/plugins/base/nptypes.h
+++ b/dom/plugins/base/nptypes.h
@@ -22,6 +22,19 @@
typedef unsigned int uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
+#elif defined(__sun)
+ /*
+ * SunOS ships an inttypes.h header that defines [u]int32_t,
+ * but not bool for C.
+ */
+ #include <inttypes.h>
+
+
+ #ifndef __cplusplus
+ typedef int bool;
+ #define true 1
+ #define false 0
+ #endif
#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
/*
* BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
diff --git a/dom/plugins/base/nsPluginsDirUnix.cpp b/dom/plugins/base/nsPluginsDirUnix.cpp
index e6956c34c..22d6bd44b 100644
--- a/dom/plugins/base/nsPluginsDirUnix.cpp
+++ b/dom/plugins/base/nsPluginsDirUnix.cpp
@@ -19,7 +19,9 @@
#include "nsIPrefService.h"
#define LOCAL_PLUGIN_DLL_SUFFIX ".so"
-#if defined(LINUX)
+#if defined(XP_SOLARIS)
+#define DEFAULT_X11_PATH "/usr/openwin/lib"
+#elif defined(LINUX)
#define DEFAULT_X11_PATH "/usr/X11R6/lib/"
#elif defined(__APPLE__)
#define DEFAULT_X11_PATH "/usr/X11R6/lib"
@@ -92,7 +94,11 @@ static bool LoadExtraSharedLib(const char *name, char **soname, bool tryToGetSon
#define PLUGIN_MAX_NUMBER_OF_EXTRA_LIBS 32
#define PREF_PLUGINS_SONAME "plugin.soname.list"
+#if defined (XP_SOLARIS)
+#define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX ":libXm" LOCAL_PLUGIN_DLL_SUFFIX
+#else
#define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX
+#endif
/*
this function looks for
user_pref("plugin.soname.list", "/usr/X11R6/lib/libXt.so.6:libXext.so");
@@ -264,11 +270,15 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary **outLibrary)
// at runtime. Explicitly opening Xt/Xext into the global
// namespace before attempting to load the plug-in seems to
// work fine.
-
-
+#if defined(XP_SOLARIS)
+ // Acrobat/libXm: Lazy resolving might cause crash later (bug 211587)
+ *outLibrary = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW);
+ pLibrary = *outLibrary;
+#else
// Some dlopen() doesn't recover from a failed PR_LD_NOW (bug 223744)
*outLibrary = PR_LoadLibraryWithFlags(libSpec, 0);
pLibrary = *outLibrary;
+#endif
if (!pLibrary) {
LoadExtraSharedLibs();
// try reload plugin once more