mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-12-27 20:30:39 +00:00
commit
c7ce866bf1
@ -257,7 +257,8 @@ PluginInstanceChild::DoNPP_New()
|
||||
|
||||
Initialize();
|
||||
|
||||
#if defined(XP_MACOSX) && defined(__i386__)
|
||||
#if 0
|
||||
//#if defined(XP_MACOSX) && defined(__i386__)
|
||||
// If an i386 Mac OS X plugin has selected the Carbon event model then
|
||||
// we have to fail. We do not support putting Carbon event model plugins
|
||||
// out of process. Note that Carbon is the default model so out of process
|
||||
|
@ -218,6 +218,12 @@ struct writeBuf
|
||||
int offset;
|
||||
};
|
||||
|
||||
#ifdef __ppc__
|
||||
#define TAG_CFF 0x43464620
|
||||
#else
|
||||
#define TAG_CFF 0x20464643
|
||||
#endif
|
||||
|
||||
bool
|
||||
ScaledFontMac::GetFontFileData(FontFileDataOutput aDataCallback, void *aBaton)
|
||||
{
|
||||
@ -233,7 +239,7 @@ ScaledFontMac::GetFontFileData(FontFileDataOutput aDataCallback, void *aBaton)
|
||||
bool CFF = false;
|
||||
for (CFIndex i = 0; i<count; i++) {
|
||||
uint32_t tag = (uint32_t)(uintptr_t)CFArrayGetValueAtIndex(tags, i);
|
||||
if (tag == 0x43464620) // 'CFF '
|
||||
if (tag == TAG_CFF) // 'CFF '
|
||||
CFF = true;
|
||||
CFDataRef data = CGFontCopyTableForTag(mFont, tag);
|
||||
records[i].tag = tag;
|
||||
@ -283,11 +289,8 @@ ScaledFontMac::GetFontFileData(FontFileDataOutput aDataCallback, void *aBaton)
|
||||
uint32_t *wtable = (reinterpret_cast<uint32_t *>(table.Elements()));
|
||||
TableRecord *records = new TableRecord[count];
|
||||
for (uint32_t i=3; i<(sizer/4); i+=4) { // Skip header
|
||||
#ifndef __ppc__
|
||||
#error need little-endian version
|
||||
#endif
|
||||
uint32_t tag = wtable[i];
|
||||
if (tag == 0x43464620) // 'CFF '
|
||||
if (tag == TAG_CFF)
|
||||
CFF = true;
|
||||
// We know the length from the directory, so we can simply import
|
||||
// the data. We assume the table exists, and OMG if it doesn't.
|
||||
|
@ -488,7 +488,7 @@ MacOSFontEntry::GetFontTable(uint32_t aTag)
|
||||
if (MOZ_LIKELY(mFontTableDirSize > 0)) {
|
||||
// XXX: This assumes big endian (warning Intel)
|
||||
#ifndef __ppc__
|
||||
#error needs GetFontTable fast path needs little endian version
|
||||
#warning needs GetFontTable fast path needs little endian version
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_X
|
||||
|
@ -72,8 +72,10 @@ inline int Log2Floor(uint32 n) {
|
||||
#endif /* endianness */
|
||||
#endif /* CPU whitelist */
|
||||
|
||||
#if !defined(__i386) && !defined(__x86_64__)
|
||||
#ifndef WOFF_BIG_ENDIAN
|
||||
#error unexpected endianness
|
||||
#endif
|
||||
#endif /* !defined(__i386) && !defined(__x86_64__) */
|
||||
|
||||
#endif // WOFF2_PORT_H_
|
||||
|
@ -37,6 +37,14 @@
|
||||
#include <ucontext.h>
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifndef __ppc__
|
||||
#include <sys/ucontext.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/thread_status.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static char _progname[1024] = "huh?";
|
||||
|
||||
// Note: some tests manipulate this value.
|
||||
@ -160,14 +168,14 @@ static void fpehandler(int signum, siginfo_t *si, void *context)
|
||||
ucontext_t *uc = (ucontext_t *)context;
|
||||
|
||||
#if defined(__i386__) || defined(__amd64__)
|
||||
_STRUCT_FP_CONTROL *ctrl = &uc->uc_mcontext->__fs.__fpu_fcw;
|
||||
ctrl->__invalid = ctrl->__denorm = ctrl->__zdiv = ctrl->__ovrfl = ctrl->__undfl = ctrl->__precis = 1;
|
||||
fp_control *ctrl = &uc->uc_mcontext->fs.fpu_fcw;
|
||||
ctrl->invalid = ctrl->denorm = ctrl->zdiv = ctrl->ovrfl = ctrl->undfl = ctrl->precis = 1;
|
||||
|
||||
_STRUCT_FP_STATUS *status = &uc->uc_mcontext->__fs.__fpu_fsw;
|
||||
status->__invalid = status->__denorm = status->__zdiv = status->__ovrfl = status->__undfl =
|
||||
status->__precis = status->__stkflt = status->__errsumm = 0;
|
||||
fp_status *status = &uc->uc_mcontext->fs.fpu_fsw;
|
||||
status->invalid = status->denorm = status->zdiv = status->ovrfl = status->undfl =
|
||||
status->precis = status->stkflt = status->errsumm = 0;
|
||||
|
||||
uint32_t *mxcsr = &uc->uc_mcontext->__fs.__fpu_mxcsr;
|
||||
uint32_t *mxcsr = &uc->uc_mcontext->fs.fpu_mxcsr;
|
||||
*mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */
|
||||
*mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
|
||||
#endif
|
||||
|
@ -12,7 +12,8 @@
|
||||
|
||||
#include "nscore.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#if MOZILLA_MAY_SUPPORT_SSE2
|
||||
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
#include "mozilla/SSE.h"
|
||||
#endif
|
||||
|
||||
|
@ -48,6 +48,7 @@ using namespace mozilla;
|
||||
#ifdef XP_MACOSX
|
||||
typedef int cpu_type_t; // we don't have cpu_type* on 10.4.
|
||||
#define CPU_TYPE_ANY ((cpu_type_t) -1)
|
||||
#define CPU_TYPE_X86 ((cpu_type_t) 7)
|
||||
#define CPU_TYPE_POWERPC ((cpu_type_t) 18)
|
||||
|
||||
cpu_type_t pref_cpu_types[2] = {
|
||||
|
Loading…
Reference in New Issue
Block a user