diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp index a36ff9bf7..c634b986c 100644 --- a/dom/plugins/ipc/PluginInstanceChild.cpp +++ b/dom/plugins/ipc/PluginInstanceChild.cpp @@ -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 diff --git a/gfx/2d/ScaledFontMac.cpp b/gfx/2d/ScaledFontMac.cpp index 45343d6ec..1d8378aae 100644 --- a/gfx/2d/ScaledFontMac.cpp +++ b/gfx/2d/ScaledFontMac.cpp @@ -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(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. diff --git a/gfx/thebes/gfxMacPlatformFontList.mm b/gfx/thebes/gfxMacPlatformFontList.mm index d38ded97c..75abc38af 100644 --- a/gfx/thebes/gfxMacPlatformFontList.mm +++ b/gfx/thebes/gfxMacPlatformFontList.mm @@ -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 diff --git a/modules/woff2/src/port.h b/modules/woff2/src/port.h index fcecbe775..4e3a87270 100644 --- a/modules/woff2/src/port.h +++ b/modules/woff2/src/port.h @@ -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_ diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp index 000129004..73674d406 100644 --- a/toolkit/xre/nsSigHandlers.cpp +++ b/toolkit/xre/nsSigHandlers.cpp @@ -37,6 +37,14 @@ #include #endif +#ifdef XP_MACOSX +#ifndef __ppc__ +#include +#include +#include +#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 diff --git a/xpcom/string/nsUTF8Utils.h b/xpcom/string/nsUTF8Utils.h index 41747f0d4..f121c514b 100644 --- a/xpcom/string/nsUTF8Utils.h +++ b/xpcom/string/nsUTF8Utils.h @@ -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 diff --git a/xpcom/threads/nsProcessCommon.cpp b/xpcom/threads/nsProcessCommon.cpp index 82170b247..ed4390e45 100644 --- a/xpcom/threads/nsProcessCommon.cpp +++ b/xpcom/threads/nsProcessCommon.cpp @@ -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] = {