diff options
author | weidai <weidai11@users.noreply.github.com> | 2010-07-05 01:15:14 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2010-07-05 01:15:14 +0000 |
commit | 1315a7bc9a32e86db2ae4aa7cefcfec5b2f4e3ab (patch) | |
tree | bdfe463fd8b180c37b65007e19a29aa915fff3b3 /tea.cpp | |
parent | 954fed3d5d6edb2639d5e093b0529b589ac31120 (diff) | |
download | cryptopp-git-1315a7bc9a32e86db2ae4aa7cefcfec5b2f4e3ab.tar.gz |
port to Sun Studio 12u1 Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21
change makefile to compile for both i386 and x86_64 on Darwin/Mac OS X
Diffstat (limited to 'tea.cpp')
-rw-r--r-- | tea.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -62,8 +62,14 @@ void XTEA::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, by word32 y, z; Block::Get(inBlock)(y)(z); +#ifdef __SUNPRO_CC + // workaround needed on Sun Studio 12u1 Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21 + size_t sum = 0; + while ((sum&0xffffffff) != m_limit) +#else word32 sum = 0; while (sum != m_limit) +#endif { y += (z<<4 ^ z>>5) + z ^ sum + m_k[sum&3]; sum += DELTA; @@ -78,8 +84,14 @@ void XTEA::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, by word32 y, z; Block::Get(inBlock)(y)(z); +#ifdef __SUNPRO_CC + // workaround needed on Sun Studio 12u1 Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21 + size_t sum = m_limit; + while ((sum&0xffffffff) != 0) +#else word32 sum = m_limit; while (sum != 0) +#endif { z -= (y<<4 ^ y>>5) + y ^ sum + m_k[sum>>11 & 3]; sum -= DELTA; |