diff options
Diffstat (limited to 'CPP/7zip/Crypto/Hash/RotateDefs.h')
-rwxr-xr-x | CPP/7zip/Crypto/Hash/RotateDefs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/CPP/7zip/Crypto/Hash/RotateDefs.h b/CPP/7zip/Crypto/Hash/RotateDefs.h new file mode 100755 index 00000000..832e7357 --- /dev/null +++ b/CPP/7zip/Crypto/Hash/RotateDefs.h @@ -0,0 +1,19 @@ +// RotateDefs.h + +#ifndef __ROTATEDEFS_H +#define __ROTATEDEFS_H + +#ifdef _MSC_VER + +#include <stddef.h> +#define rotlFixed(x, n) _rotl((x), (n)) +#define rotrFixed(x, n) _rotr((x), (n)) + +#else + +#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) +#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) + +#endif + +#endif |