From b1f2f177cdd21c22791e34b4e529be9bc3703702 Mon Sep 17 00:00:00 2001 From: Christian Hawley Date: Fri, 18 Jan 2019 10:32:21 -0500 Subject: [PATCH] Remove hacky fix for missing codecvt on linux --- src/xenia/base/string.cc | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/xenia/base/string.cc b/src/xenia/base/string.cc index feff3a21b..2e19ac856 100644 --- a/src/xenia/base/string.cc +++ b/src/xenia/base/string.cc @@ -9,12 +9,28 @@ #include "xenia/base/string.h" -// TODO(benvanik): when GCC finally gets codecvt, use that. -#if XE_PLATFORM_LINUX +// codecvt existence check +#ifdef __clang__ +// using clang +#if (__clang_major__ < 4) // 3.3 has it but I think we need at least 4 anyway +// insufficient clang version #define NO_CODECVT 1 #else #include -#endif // XE_PLATFORM_LINUX +#endif +#elif defined(__GNUC__) || defined(__GNUG__) +// using gcc +#if (__GNUC__ < 5) +// insufficient clang version +#define NO_CODECVT 1 +#else +#include +#endif +#elif defined( \ + _MSC_VER) // since the windows 10 sdk is required, this shouldn't be an +// issue +#include +#endif #include #include