# HG changeset patch
# User t_mrc-ct@users.sourceforge.jp
# Date 1384097907 -32400
# Branch GECKO2430_2014013115_RELBRANCH
# Node ID 23a5c78a1b3115d8907f79fc9d4fef0837e64e49
# Parent  31aeeb044bb0029d8dbcb19c3f7cebefda99db9c
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);
   }
 };
