mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 18:07:31 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
09a00ad3bd
116 changed files with 2480 additions and 146 deletions
|
|
@ -9,10 +9,14 @@
|
|||
#ifndef nsContentUtils_h___
|
||||
#define nsContentUtils_h___
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#ifdef XP_WIN
|
||||
#include <float.h>
|
||||
#endif
|
||||
|
||||
#ifdef XP_SOLARIS
|
||||
#include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
#include "js/TypeDecls.h"
|
||||
#include "js/Value.h"
|
||||
#include "js/RootingAPI.h"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@
|
|||
#include "mozilla/UniquePtr.h"
|
||||
#include "CubebUtils.h"
|
||||
#include "soundtouch/SoundTouchFactory.h"
|
||||
#ifdef XP_SOLARIS
|
||||
#include "soundtouch/SoundTouch.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
|||
|
|
@ -327,9 +327,12 @@ typedef enum {
|
|||
#define NP_ABI_GCC3_MASK 0x10000000
|
||||
/*
|
||||
* gcc 3.x generated vtables on UNIX and OSX are incompatible with
|
||||
* previous compilers.
|
||||
* previous compilers. Flash plugin binaries for Solaris were compiled
|
||||
* with Sun Studio, so this has to be false to make things work. This may
|
||||
* become a problem in the future when/if new plugins are compiled with
|
||||
* GCC, however.
|
||||
*/
|
||||
#if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
|
||||
#if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3) && !defined(XP_SOLARIS))
|
||||
#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
|
||||
#else
|
||||
#define _NP_ABI_MIXIN_FOR_GCC3 0
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@
|
|||
#include "nsIPrefService.h"
|
||||
|
||||
#define LOCAL_PLUGIN_DLL_SUFFIX ".so"
|
||||
#if defined(LINUX)
|
||||
#ifdef 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"
|
||||
#ifdef 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
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ MediateRace(const MessageChannel::MessageInfo& parent,
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#if defined(OS_LINUX) || defined(OS_SOLARIS)
|
||||
static string
|
||||
ReplaceAll(const string& haystack, const string& needle, const string& with)
|
||||
{
|
||||
|
|
@ -101,7 +101,7 @@ ReplaceAll(const string& haystack, const string& needle, const string& with)
|
|||
string
|
||||
MungePluginDsoPath(const string& path)
|
||||
{
|
||||
#if defined(OS_LINUX)
|
||||
#if defined(OS_LINUX) || defined(OS_SOLARIS)
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=519601
|
||||
return ReplaceAll(path, "netscape", "netsc@pe");
|
||||
#else
|
||||
|
|
@ -112,7 +112,7 @@ MungePluginDsoPath(const string& path)
|
|||
string
|
||||
UnmungePluginDsoPath(const string& munged)
|
||||
{
|
||||
#if defined(OS_LINUX)
|
||||
#if defined(OS_LINUX) || defined(OS_SOLARIS)
|
||||
return ReplaceAll(munged, "netsc@pe", "netscape");
|
||||
#else
|
||||
return munged;
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename,
|
|||
|
||||
// TODO: use PluginPRLibrary here
|
||||
|
||||
#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
|
||||
mShutdownFunc =
|
||||
(NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
|
||||
|
||||
|
|
@ -1821,7 +1821,7 @@ PluginModuleChild::AnswerNP_GetEntryPoints(NPError* _retval)
|
|||
AssertPluginThread();
|
||||
MOZ_ASSERT(mIsChrome);
|
||||
|
||||
#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
|
||||
return true;
|
||||
#elif defined(OS_WIN) || defined(OS_MACOSX)
|
||||
*_retval = mGetEntryPointsFunc(&mFunctions);
|
||||
|
|
@ -1866,7 +1866,7 @@ PluginModuleChild::DoNP_Initialize(const PluginSettings& aSettings)
|
|||
#endif
|
||||
|
||||
NPError result;
|
||||
#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
|
||||
result = mInitializeFunc(&sBrowserFuncs, &mFunctions);
|
||||
#elif defined(OS_WIN) || defined(OS_MACOSX)
|
||||
result = mInitializeFunc(&sBrowserFuncs);
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ private:
|
|||
|
||||
// we get this from the plugin
|
||||
NP_PLUGINSHUTDOWN mShutdownFunc;
|
||||
#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
|
||||
NP_PLUGINUNIXINIT mInitializeFunc;
|
||||
#elif defined(OS_WIN) || defined(OS_MACOSX)
|
||||
NP_PLUGININIT mInitializeFunc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue