diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2009-04-05 19:58:48 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2009-04-05 19:58:48 +0000 |
commit | 78249d5ff4e87d2751c7f51e960d360124ed073a (patch) | |
tree | c9166df4f9ca8a1f7e608a26fcc5c68d07acf872 /rijndael.cpp | |
parent | fbba0d7c2165347cbab96bd5111c1732fb9f395b (diff) | |
download | cryptopp-78249d5ff4e87d2751c7f51e960d360124ed073a.tar.gz |
fix compile on MacOS X and MinGW
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@463 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'rijndael.cpp')
-rw-r--r-- | rijndael.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rijndael.cpp b/rijndael.cpp index a2c7be3..74893d1 100644 --- a/rijndael.cpp +++ b/rijndael.cpp @@ -73,6 +73,10 @@ being unloaded from L1 cache, until that round is finished. #include <alloca.h> #endif +#ifdef __MINGW32__ +#include <malloc.h> +#endif + NAMESPACE_BEGIN(CryptoPP) #ifdef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS @@ -909,7 +913,7 @@ void Rijndael_Enc_AdvancedProcessBlocks(void *locals, const word32 *k); } #endif -#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE) +#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X86 static inline bool AliasedWithTable(const byte *begin, const byte *end) { @@ -923,6 +927,7 @@ static inline bool AliasedWithTable(const byte *begin, const byte *end) size_t Rijndael::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const { +#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE) if (length < BLOCKSIZE) return length; @@ -976,6 +981,7 @@ size_t Rijndael::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo return length%16; } else +#endif return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags); } |