add workaround for _interlockedbittestandset64 and _interlockedbittestandreset64

pull/2/head
weidai 2007-12-05 13:49:12 +00:00
parent ebc533c0e1
commit 6b4c38b887
1 changed files with 4 additions and 0 deletions

4
misc.h
View File

@ -11,9 +11,13 @@
// VC2005 workaround: disable declarations that conflict with winnt.h // VC2005 workaround: disable declarations that conflict with winnt.h
#define _interlockedbittestandset CRYPTOPP_DISABLED_INTRINSIC_1 #define _interlockedbittestandset CRYPTOPP_DISABLED_INTRINSIC_1
#define _interlockedbittestandreset CRYPTOPP_DISABLED_INTRINSIC_2 #define _interlockedbittestandreset CRYPTOPP_DISABLED_INTRINSIC_2
#define _interlockedbittestandset64 CRYPTOPP_DISABLED_INTRINSIC_3
#define _interlockedbittestandreset64 CRYPTOPP_DISABLED_INTRINSIC_4
#include <intrin.h> #include <intrin.h>
#undef _interlockedbittestandset #undef _interlockedbittestandset
#undef _interlockedbittestandreset #undef _interlockedbittestandreset
#undef _interlockedbittestandset64
#undef _interlockedbittestandreset64
#define CRYPTOPP_FAST_ROTATE(x) 1 #define CRYPTOPP_FAST_ROTATE(x) 1
#elif _MSC_VER >= 1300 #elif _MSC_VER >= 1300
#define CRYPTOPP_FAST_ROTATE(x) ((x) == 32 | (x) == 64) #define CRYPTOPP_FAST_ROTATE(x) ((x) == 32 | (x) == 64)