|
@@ -29,6 +29,10 @@ |
|
|
# define CARLA_USE_NEWLOCALE |
|
|
# define CARLA_USE_NEWLOCALE |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if defined(CARLA_OS_WIN) && __MINGW64_VERSION_MAJOR >= 5 |
|
|
|
|
|
# define CARLA_USE_CONFIGTHREADLOCALE |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------- |
|
|
// CarlaScopedEnvVar class |
|
|
// CarlaScopedEnvVar class |
|
|
|
|
|
|
|
@@ -103,7 +107,7 @@ public: |
|
|
: newloc(::newlocale(LC_NUMERIC_MASK, "C", kNullLocale)), |
|
|
: newloc(::newlocale(LC_NUMERIC_MASK, "C", kNullLocale)), |
|
|
oldloc(newloc != kNullLocale ? ::uselocale(newloc) : kNullLocale) {} |
|
|
oldloc(newloc != kNullLocale ? ::uselocale(newloc) : kNullLocale) {} |
|
|
#else |
|
|
#else |
|
|
# ifdef CARLA_OS_WIN |
|
|
|
|
|
|
|
|
# ifdef CARLA_USE_CONFIGTHREADLOCALE |
|
|
: oldthreadloc(_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)), |
|
|
: oldthreadloc(_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)), |
|
|
# else |
|
|
# else |
|
|
: oldthreadloc(-1), |
|
|
: oldthreadloc(-1), |
|
@@ -128,7 +132,7 @@ public: |
|
|
delete[] oldloc; |
|
|
delete[] oldloc; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# ifdef CARLA_OS_WIN |
|
|
|
|
|
|
|
|
# ifdef CARLA_USE_CONFIGTHREADLOCALE |
|
|
if (oldthreadloc != -1) |
|
|
if (oldthreadloc != -1) |
|
|
_configthreadlocale(oldthreadloc); |
|
|
_configthreadlocale(oldthreadloc); |
|
|
# endif |
|
|
# endif |
|
|