Added define guards for _rotl and related bit rotation functions, which collided with function definitions in x86intrin.h

This commit is contained in:
Mario Reja 2014-06-13 14:25:28 +03:00
parent 9e14f5e164
commit 45f9a72975
1 changed files with 8 additions and 0 deletions

View File

@ -32,21 +32,29 @@
#ifndef _WIN32
#ifndef _rotl
static INLINE UINT32 _rotl(UINT32 value, int shift) {
return (value << shift) | (value >> (32 - shift));
}
#endif
#ifndef _rotl64
static INLINE UINT64 _rotl64(UINT64 value, int shift) {
return (value << shift) | (value >> (64 - shift));
}
#endif
#ifndef _rotr
static INLINE UINT32 _rotr(UINT32 value, int shift) {
return (value >> shift) | (value << (32 - shift));
}
#endif
#ifndef _rotr64
static INLINE UINT64 _rotr64(UINT64 value, int shift) {
return (value >> shift) | (value << (64 - shift));
}
#endif
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))