Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: nss/mozilla/security/nss/lib/freebl/camellia.c

Issue 3135002: Update to NSS 3.12.7 and NSPR 4.8.6.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nss/mozilla/security/nss/lib/freebl/camellia.c
===================================================================
--- nss/mozilla/security/nss/lib/freebl/camellia.c (revision 55475)
+++ nss/mozilla/security/nss/lib/freebl/camellia.c (working copy)
@@ -36,7 +36,7 @@
* ***** END LICENSE BLOCK ***** */
/*
- * $Id: camellia.c,v 1.2 2008/11/18 19:48:22 rrelyea%redhat.com Exp $
+ * $Id: camellia.c,v 1.3 2010/04/30 00:10:53 wtc%google.com Exp $
*/
#ifdef FREEBL_NO_DEPEND
@@ -72,13 +72,15 @@
*/
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && defined(NSS_X86_OR_X64)
+/* require a little-endian CPU that allows unaligned access */
+
# define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00)
# define GETU32(p) SWAP(*((PRUint32 *)(p)))
# define PUTU32(ct, st) {*((PRUint32 *)(ct)) = SWAP((st));}
-#else /* not MS-VC */
+#else /* not MSVC or not x86/x64 */
# define GETU32(pt) \
(((PRUint32)(pt)[0] << 24) \

Powered by Google App Engine
This is Rietveld 408576698