diff options
| author | Matthew Parlane <parlane@gmail.com> | 2016-07-18 16:12:06 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-18 16:12:06 +1200 |
| commit | a51c992e6168fa7e10e2ada6168d7f1b38aad961 (patch) | |
| tree | f0e73c953491c9e4aea18d9a2aa3ff679c2cf31f /Source/Core/Common/StringUtil.cpp | |
| parent | 7139b6bae6301f667a9ebff2ec7f7dc1820bbf2c (diff) | |
| parent | cdf62dece39634367e9608db635c4f84c7a3b88c (diff) | |
Merge pull request #4018 from bentley/openbsd-ifdefs
Openbsd ifdefs
Diffstat (limited to 'Source/Core/Common/StringUtil.cpp')
| -rw-r--r-- | Source/Core/Common/StringUtil.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index ff6c6074cf..5048446682 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -28,7 +28,7 @@ #include <locale.h> #endif -#if !defined(_WIN32) && !defined(ANDROID) +#if !defined(_WIN32) && !defined(ANDROID) && !defined(__OpenBSD__) static locale_t GetCLocale() { static locale_t c_locale = newlocale(LC_ALL_MASK, "C", nullptr); @@ -121,11 +121,11 @@ bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list ar c_locale = _create_locale(LC_ALL, "C"); writtenCount = _vsnprintf_l(out, outsize, format, c_locale, args); #else -#if !defined(ANDROID) +#if !defined(ANDROID) && !defined(__OpenBSD__) locale_t previousLocale = uselocale(GetCLocale()); #endif writtenCount = vsnprintf(out, outsize, format, args); -#if !defined(ANDROID) +#if !defined(ANDROID) && !defined(__OpenBSD__) uselocale(previousLocale); #endif #endif @@ -162,12 +162,12 @@ std::string StringFromFormatV(const char* format, va_list args) std::string temp = buf; delete[] buf; #else -#if !defined(ANDROID) +#if !defined(ANDROID) && !defined(__OpenBSD__) locale_t previousLocale = uselocale(GetCLocale()); #endif if (vasprintf(&buf, format, args) < 0) ERROR_LOG(COMMON, "Unable to allocate memory for string"); -#if !defined(ANDROID) +#if !defined(ANDROID) && !defined(__OpenBSD__) uselocale(previousLocale); #endif |
