fix compile with Sun CC 64-bit

pull/2/head
weidai 2006-12-20 15:20:02 +00:00
parent 43b41c1042
commit 826889105d
2 changed files with 10 additions and 3 deletions

View File

@ -128,8 +128,15 @@ typedef unsigned int word32;
// allow any way to access the 64-bit by 64-bit multiply instruction without using // 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 // assembly, so in order to use word64 as word, the assembly instruction must be defined
// in Dword::Multiply(). // in Dword::Multiply().
typedef word32 hword; #if defined(__SUNPRO_CC) // no Dword::Multiply() for these compilers yet
typedef word64 word; #define CRYPTOPP_NATIVE_DWORD_AVAILABLE
typedef word16 hword;
typedef word32 word;
typedef word64 dword;
#else
typedef word32 hword;
typedef word64 word;
#endif
#else #else
#define CRYPTOPP_NATIVE_DWORD_AVAILABLE #define CRYPTOPP_NATIVE_DWORD_AVAILABLE
#ifdef WORD64_AVAILABLE #ifdef WORD64_AVAILABLE

View File

@ -3238,7 +3238,7 @@ public:
return b; return b;
} }
void GenerateBlock(byte *output, unsigned int size) void GenerateBlock(byte *output, size_t size)
{ {
UnalignedPutWord(BIG_ENDIAN_ORDER, m_counterAndSeed, m_counter); UnalignedPutWord(BIG_ENDIAN_ORDER, m_counterAndSeed, m_counter);
++m_counter; ++m_counter;