aboutsummaryrefslogtreecommitdiff
path: root/src/common/common_funcs.h
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2016-05-27 10:40:01 +0100
committerMerryMage <MerryMage@users.noreply.github.com>2016-05-27 10:42:06 +0100
commit8e1768cf1dc6aeb827018a652a218f6da2f4a3c3 (patch)
tree563440d7327e1ff58010929bd7d805d937e3c182 /src/common/common_funcs.h
parent5edff287b6da2821424e94d0ec48a00db2f7d944 (diff)
common_funcs: Provide rotr and rotl for MSVC
Diffstat (limited to 'src/common/common_funcs.h')
-rw-r--r--src/common/common_funcs.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h
index ab35156838..4633897ce6 100644
--- a/src/common/common_funcs.h
+++ b/src/common/common_funcs.h
@@ -72,18 +72,24 @@ inline u64 _rotr64(u64 x, unsigned int shift){
}
#else // _MSC_VER
- #if (_MSC_VER < 1900)
- // Function Cross-Compatibility
- #define snprintf _snprintf
- #endif
-
- // Locale Cross-Compatibility
- #define locale_t _locale_t
-
- extern "C" {
- __declspec(dllimport) void __stdcall DebugBreak(void);
- }
- #define Crash() {DebugBreak();}
+
+#if (_MSC_VER < 1900)
+ // Function Cross-Compatibility
+ #define snprintf _snprintf
+#endif
+
+// Locale Cross-Compatibility
+#define locale_t _locale_t
+
+extern "C" {
+ __declspec(dllimport) void __stdcall DebugBreak(void);
+}
+#define Crash() {DebugBreak();}
+
+// cstdlib provides these on MSVC
+#define rotr _rotr
+#define rotl _rotl
+
#endif // _MSC_VER ndef
// Generic function to get last error message.