Browse Source

common_funcs: Provide rotr and rotl for MSVC

pull/15/merge
MerryMage 10 years ago
parent
commit
8e1768cf1d
  1. 6
      src/common/common_funcs.h

6
src/common/common_funcs.h

@ -72,6 +72,7 @@ inline u64 _rotr64(u64 x, unsigned int shift){
}
#else // _MSC_VER
#if (_MSC_VER < 1900)
// Function Cross-Compatibility
#define snprintf _snprintf
@ -84,6 +85,11 @@ inline u64 _rotr64(u64 x, unsigned int shift){
__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.

Loading…
Cancel
Save