# HG changeset patch
# User t_mrc-ct@users.sourceforge.jp
# Date 1384097907 -32400
# Branch GECKO2460_2014060612_RELBRANCH
# Node ID e41246d202071d8898f25ba63a9047d36f32df1e
# Parent  b8ef3ca8be0609e4d79ff9073d1a61ef52c649f5
M572983 patch for PPC_OSX

diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -1398,20 +1398,20 @@
     return d > 0x7fffffffffffffffui64 ?
            uint64_t(d - 0x8000000000000000ui64) + 0x8000000000000000ui64 :
            uint64_t(d);
   }
 };
 #endif
 
 // C++ doesn't guarantee that exact values are the only ones that will
-// round-trip. In fact, on some platforms, including SPARC, there are pairs of
+// round-trip. In fact, on some platforms, including SPARC and PPC_OSX, there are pairs of
 // values, a uint64_t and a double, such that neither value is exactly
 // representable in the other type, but they cast to each other.
-#ifdef SPARC
+#if defined(SPARC) || defined(JS_CPU_PPC_OSX)
 // Simulate x86 overflow behavior
 template<>
 struct ConvertImpl<uint64_t, double> {
   static JS_ALWAYS_INLINE uint64_t Convert(double d) {
     return d >= 0xffffffffffffffff ?
            0x8000000000000000 : uint64_t(d);
   }
 };
