diff --git a/js/public/Value.h b/js/public/Value.h index 7d0b2abd6d65..70fe02d10ac7 100644 --- a/js/public/Value.h +++ b/js/public/Value.h @@ -237,7 +237,7 @@ typedef enum JSWhyMagic JS_WHY_MAGIC_COUNT } JSWhyMagic; -#if defined(IS_LITTLE_ENDIAN) +#if defined(MOZ_LITTLE_ENDIAN) # if defined(JS_NUNBOX32) typedef union jsval_layout { @@ -285,7 +285,7 @@ typedef union jsval_layout uintptr_t asUIntPtr; } JSVAL_ALIGNMENT jsval_layout; # endif /* JS_PUNBOX64 */ -#else /* defined(IS_LITTLE_ENDIAN) */ +#else /* defined(MOZ_LITTLE_ENDIAN) */ # if defined(JS_NUNBOX32) typedef union jsval_layout { @@ -331,7 +331,7 @@ typedef union jsval_layout uintptr_t asUIntPtr; } JSVAL_ALIGNMENT jsval_layout; # endif /* JS_PUNBOX64 */ -#endif /* defined(IS_LITTLE_ENDIAN) */ +#endif /* defined(MOZ_LITTLE_ENDIAN) */ JS_STATIC_ASSERT(sizeof(jsval_layout) == 8); diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp index 2f48af4fa294..ec2f5b43ec17 100644 --- a/js/src/jit/Lowering.cpp +++ b/js/src/jit/Lowering.cpp @@ -66,7 +66,7 @@ LIRGenerator::visitParameter(MParameter* param) offset *= sizeof(Value); #if defined(JS_NUNBOX32) -# if defined(IS_BIG_ENDIAN) +# if defined(MOZ_BIG_ENDIAN) ins->getDef(0)->setOutput(LArgument(offset)); ins->getDef(1)->setOutput(LArgument(offset + 4)); # else diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h index 0761332d629e..cfb9788d88ac 100644 --- a/js/src/jit/MacroAssembler.h +++ b/js/src/jit/MacroAssembler.h @@ -179,7 +179,7 @@ using mozilla::FloatingPoint; # define PER_SHARED_ARCH DEFINED_ON(ALL_SHARED_ARCH) -#ifdef IS_LITTLE_ENDIAN +#ifdef MOZ_LITTLE_ENDIAN #define IMM32_16ADJ(X) X << 16 #else #define IMM32_16ADJ(X) X diff --git a/js/src/jsatom.cpp b/js/src/jsatom.cpp index 9ef03ddf904b..895b7d03ecbe 100644 --- a/js/src/jsatom.cpp +++ b/js/src/jsatom.cpp @@ -568,7 +568,7 @@ js::XDRAtom(XDRState* xdr, MutableHandleAtom atomp) const Latin1Char* chars = reinterpret_cast(xdr->buf.read(length)); atom = AtomizeChars(cx, chars, length); } else { -#if IS_LITTLE_ENDIAN +#if MOZ_LITTLE_ENDIAN /* Directly access the little endian chars in the XDR buffer. */ const char16_t* chars = reinterpret_cast(xdr->buf.read(length * sizeof(char16_t))); atom = AtomizeChars(cx, chars, length); @@ -596,7 +596,7 @@ js::XDRAtom(XDRState* xdr, MutableHandleAtom atomp) atom = AtomizeChars(cx, chars, length); if (chars != stackChars) js_free(chars); -#endif /* !IS_LITTLE_ENDIAN */ +#endif /* !MOZ_LITTLE_ENDIAN */ } if (!atom) diff --git a/js/src/jscpucfg.h b/js/src/jscpucfg.h index 660187ca60cf..80fdf6bb88b5 100644 --- a/js/src/jscpucfg.h +++ b/js/src/jscpucfg.h @@ -9,16 +9,6 @@ #include "mozilla/EndianUtils.h" -#if defined(MOZ_LITTLE_ENDIAN) -# define IS_LITTLE_ENDIAN 1 -# undef IS_BIG_ENDIAN -#elif defined(MOZ_BIG_ENDIAN) -# undef IS_LITTLE_ENDIAN -# define IS_BIG_ENDIAN 1 -#else -# error "Cannot determine endianness of your platform. Please add support to jscpucfg.h." -#endif - #ifndef JS_STACK_GROWTH_DIRECTION # ifdef __hppa # define JS_STACK_GROWTH_DIRECTION (1) diff --git a/js/src/jsdtoa.cpp b/js/src/jsdtoa.cpp index 6d0d950b474e..4d0a00621726 100644 --- a/js/src/jsdtoa.cpp +++ b/js/src/jsdtoa.cpp @@ -16,7 +16,7 @@ using namespace js; -#ifdef IS_LITTLE_ENDIAN +#ifdef MOZ_LITTLE_ENDIAN #define IEEE_8087 #else #define IEEE_MC68k diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp index 954b4081b15b..4f5dbf84d3ad 100644 --- a/js/src/vm/TypedArrayObject.cpp +++ b/js/src/vm/TypedArrayObject.cpp @@ -1784,7 +1784,7 @@ DataViewObject::getDataPointer(JSContext* cx, Handle obj, doubl static inline bool needToSwapBytes(bool littleEndian) { -#if IS_LITTLE_ENDIAN +#if MOZ_LITTLE_ENDIAN return !littleEndian; #else return littleEndian;