From 6eaa880b30ea86c867119a2e841f8e0cfc385392 Mon Sep 17 00:00:00 2001 From: weidai Date: Wed, 7 Jul 2010 22:20:58 +0000 Subject: [PATCH] fix compile on C++Builder 2010 --- trunk/c5/misc.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trunk/c5/misc.h b/trunk/c5/misc.h index 540c0e87..6b7a3de1 100644 --- a/trunk/c5/misc.h +++ b/trunk/c5/misc.h @@ -155,6 +155,12 @@ inline void memmove_s(void *dest, size_t sizeInBytes, const void *src, size_t co throw InvalidArgument("memmove_s: buffer overflow"); memmove(dest, src, count); } + +#if __BORLANDC__ >= 0x620 +// C++Builder 2010 workaround: can't use std::memcpy_s because it doesn't allow 0 lengths +#define memcpy_s CryptoPP::memcpy_s +#define memmove_s CryptoPP::memmove_s +#endif #endif inline void * memset_z(void *ptr, int value, size_t num)