summaryrefslogtreecommitdiff
path: root/src/common/common_funcs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/common_funcs.h')
-rw-r--r--src/common/common_funcs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h
index d84ec4c42..db041780a 100644
--- a/src/common/common_funcs.h
+++ b/src/common/common_funcs.h
@@ -4,6 +4,8 @@
4 4
5#pragma once 5#pragma once
6 6
7#include "common_types.h"
8
7#ifdef _WIN32 9#ifdef _WIN32
8#define SLEEP(x) Sleep(x) 10#define SLEEP(x) Sleep(x)
9#else 11#else
@@ -37,6 +39,8 @@ template<> struct CompileTimeAssert<true> {};
37#include <sys/endian.h> 39#include <sys/endian.h>
38#endif 40#endif
39 41
42#include "common_types.h"
43
40// go to debugger mode 44// go to debugger mode
41 #ifdef GEKKO 45 #ifdef GEKKO
42 #define Crash() 46 #define Crash()
@@ -73,6 +77,8 @@ inline u64 _rotr64(u64 x, unsigned int shift){
73} 77}
74 78
75#else // WIN32 79#else // WIN32
80#include <locale.h>
81
76// Function Cross-Compatibility 82// Function Cross-Compatibility
77 #define strcasecmp _stricmp 83 #define strcasecmp _stricmp
78 #define strncasecmp _strnicmp 84 #define strncasecmp _strnicmp
@@ -106,7 +112,7 @@ inline u64 _rotr64(u64 x, unsigned int shift){
106 // Restore the global locale 112 // Restore the global locale
107 _configthreadlocale(_DISABLE_PER_THREAD_LOCALE); 113 _configthreadlocale(_DISABLE_PER_THREAD_LOCALE);
108 } 114 }
109 else if(new_locale != NULL) 115 else if(new_locale != nullptr)
110 { 116 {
111 // Configure the thread to set the locale only for this thread 117 // Configure the thread to set the locale only for this thread
112 _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); 118 _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);