From 98f06a65ed9e269991029b2ff4330419c22e2fbf Mon Sep 17 00:00:00 2001 From: weidai Date: Wed, 20 Dec 2006 15:20:02 +0000 Subject: [PATCH] fix compile with Sun CC 64-bit --- trunk/c5/config.h | 11 +++++++++-- trunk/c5/integer.cpp | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/trunk/c5/config.h b/trunk/c5/config.h index 6112826e..4428c655 100644 --- a/trunk/c5/config.h +++ b/trunk/c5/config.h @@ -128,8 +128,15 @@ typedef unsigned int word32; // allow any way to access the 64-bit by 64-bit multiply instruction without using // assembly, so in order to use word64 as word, the assembly instruction must be defined // in Dword::Multiply(). - typedef word32 hword; - typedef word64 word; + #if defined(__SUNPRO_CC) // no Dword::Multiply() for these compilers yet + #define CRYPTOPP_NATIVE_DWORD_AVAILABLE + typedef word16 hword; + typedef word32 word; + typedef word64 dword; + #else + typedef word32 hword; + typedef word64 word; + #endif #else #define CRYPTOPP_NATIVE_DWORD_AVAILABLE #ifdef WORD64_AVAILABLE diff --git a/trunk/c5/integer.cpp b/trunk/c5/integer.cpp index f287d4a9..0c5018ee 100644 --- a/trunk/c5/integer.cpp +++ b/trunk/c5/integer.cpp @@ -3238,7 +3238,7 @@ public: return b; } - void GenerateBlock(byte *output, unsigned int size) + void GenerateBlock(byte *output, size_t size) { UnalignedPutWord(BIG_ENDIAN_ORDER, m_counterAndSeed, m_counter); ++m_counter;