From 9fd6707af70bb05398271f9e68bfcf1ad4f62a7a Mon Sep 17 00:00:00 2001 From: weidai Date: Mon, 13 Aug 2007 23:46:55 +0000 Subject: [PATCH] patch from Jody Hagins to fix gcc 3.2 compile --- trunk/c5/vmac.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trunk/c5/vmac.cpp b/trunk/c5/vmac.cpp index 2e7a4f57..c503d987 100755 --- a/trunk/c5/vmac.cpp +++ b/trunk/c5/vmac.cpp @@ -513,14 +513,14 @@ void VMAC_Base::VHASH_Update_Template(const word64 *data, size_t blocksRemaining } #define a0 (((word32 *)(polyS+i*4))[2+NativeByteOrder::ToEnum()]) - #define a1 (((word32 *)(polyS+i*4))[3-NativeByteOrder::ToEnum()]) + #define a1 (*(((word32 *)(polyS+i*4))+3-NativeByteOrder::ToEnum())) // workaround for GCC 3.2 #define a2 (((word32 *)(polyS+i*4))[0+NativeByteOrder::ToEnum()]) - #define a3 (((word32 *)(polyS+i*4))[1-NativeByteOrder::ToEnum()]) + #define a3 (*(((word32 *)(polyS+i*4))+1-NativeByteOrder::ToEnum())) #define aHi ((polyS+i*4)[0]) #define k0 (((word32 *)(polyS+i*4+2))[2+NativeByteOrder::ToEnum()]) - #define k1 (((word32 *)(polyS+i*4+2))[3-NativeByteOrder::ToEnum()]) + #define k1 (*(((word32 *)(polyS+i*4+2))+3-NativeByteOrder::ToEnum())) #define k2 (((word32 *)(polyS+i*4+2))[0+NativeByteOrder::ToEnum()]) - #define k3 (((word32 *)(polyS+i*4+2))[1-NativeByteOrder::ToEnum()]) + #define k3 (*(((word32 *)(polyS+i*4+2))+1-NativeByteOrder::ToEnum())) #define kHi ((polyS+i*4+2)[0]) if (isFirstBlock)