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.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h
index ddf3958cc..c2750a63c 100644
--- a/src/common/common_funcs.h
+++ b/src/common/common_funcs.h
@@ -1,9 +1,12 @@
1// Copyright 2013 Dolphin Emulator Project 1// Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project
2// Licensed under GPLv2 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#pragma once 5#pragma once
6 6
7#include "common_types.h"
8#include <cstdlib>
9
7#ifdef _WIN32 10#ifdef _WIN32
8#define SLEEP(x) Sleep(x) 11#define SLEEP(x) Sleep(x)
9#else 12#else
@@ -73,6 +76,8 @@ inline u64 _rotr64(u64 x, unsigned int shift){
73} 76}
74 77
75#else // _MSC_VER 78#else // _MSC_VER
79#include <locale.h>
80
76// Function Cross-Compatibility 81// Function Cross-Compatibility
77 #define strcasecmp _stricmp 82 #define strcasecmp _stricmp
78 #define strncasecmp _strnicmp 83 #define strncasecmp _strnicmp
@@ -106,7 +111,7 @@ inline u64 _rotr64(u64 x, unsigned int shift){
106 // Restore the global locale 111 // Restore the global locale
107 _configthreadlocale(_DISABLE_PER_THREAD_LOCALE); 112 _configthreadlocale(_DISABLE_PER_THREAD_LOCALE);
108 } 113 }
109 else if(new_locale != NULL) 114 else if(new_locale != nullptr)
110 { 115 {
111 // Configure the thread to set the locale only for this thread 116 // Configure the thread to set the locale only for this thread
112 _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); 117 _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);