components/desktop/firefox/patches/firefox29-45-snappy.patch
author Stacy Yeh <stacy.yeh@oracle.com>
Mon, 11 Jan 2016 09:27:45 -0800
changeset 5255 cea0e462549a
permissions -rw-r--r--
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland

Solaris studio doesn't use __i386__ and __x86_64__ defined, instead uses 
alternate definitions. 
If we use GCC, we may not need this part of the patch. 
The second part of the patch defined Endians. 
Needs to go upstream. 

--- mozilla-esr31/other-licenses/snappy/src/snappy-stubs-internal.h.orig	2015-06-04 17:42:51.512176985 -0700
+++ mozilla-esr31/other-licenses/snappy/src/snappy-stubs-internal.h	2015-06-04 17:42:51.521372882 -0700
@@ -178,7 +178,7 @@
 
 // Potentially unaligned loads and stores.
 
-#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__i386) || defined(__x86_64)
 
 #define UNALIGNED_LOAD16(_p) (*reinterpret_cast<const uint16 *>(_p))
 #define UNALIGNED_LOAD32(_p) (*reinterpret_cast<const uint32 *>(_p))
--- mozilla-esr31//configure.orig	2015-06-04 17:42:51.515409215 -0700
+++ mozilla-esr31//configure	2015-06-04 17:42:51.524041156 -0700
@@ -9660,6 +9660,18 @@
 #define SOLARIS 1
 EOF
 
+    if test "$CPU_ARCH" = "sparc"; then
+ cat >> confdefs.pytmp <<\EOF
+  (''' WORDS_BIGENDIAN ''', ' 1 ')
+  (''' IS_BIG_ENDIAN ''', ' 1 ')
+EOF
+cat >> confdefs.h <<\EOF
+#define WORDS_BIGENDIAN 1
+#define IS_BIG_ENDIAN 1
+EOF
+
+    fi
+
     TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"'
     MOZ_FIX_LINK_PATHS=
     # $ORIGIN/.. is for shared libraries under components/ to locate shared