Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Crypto/Hash/RotateDefs.h')
-rwxr-xr-xCPP/7zip/Crypto/Hash/RotateDefs.h19
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