Mac: Use strtod_l() only in Manager. Use strtod() in client, etc.

This commit is contained in:
Charlie Fenton 2023-06-21 02:51:24 -07:00
parent f425696bfc
commit e8c7fb91c9
3 changed files with 5 additions and 2 deletions

View File

@ -747,7 +747,7 @@ bool XML_PARSER::parse_double(const char* start_tag, double& x) {
}
}
errno = 0;
#ifdef __APPLE__
#if (defined(__APPLE__) && defined(BUILDING_MANAGER))
// MacOS 13.3.1 apparently broke per-thread locale uselocale()
double val = strtod_l(buf, &end, LC_C_LOCALE);
#else

View File

@ -312,7 +312,7 @@ inline bool parse_double(const char* buf, const char* tag, double& x) {
const char* p = strstr(buf, tag);
if (!p) return false;
errno = 0;
#ifdef __APPLE__
#if (defined(__APPLE__) && defined(BUILDING_MANAGER))
// MacOS 13.3.1 apparently broke per-thread locale uselocale()
y = strtod_l(p+strlen(tag), NULL, LC_C_LOCALE);
#else

View File

@ -4422,6 +4422,7 @@
"-D_THREAD_SAFE",
"-D__WXMAC__",
"-D_DEBUG",
"-DBUILDING_MANAGER",
"-DMAC_OS_X_VERSION_MAX_ALLOWED=101300",
"-DwxADJUST_MINSIZE=0",
);
@ -4434,6 +4435,7 @@
"-D_THREAD_SAFE",
"-D__WXMAC__",
"-D_DEBUG",
"-DBUILDING_MANAGER",
"-DMAC_OS_X_VERSION_MAX_ALLOWED=101300",
"-DwxADJUST_MINSIZE=0",
);
@ -4446,6 +4448,7 @@
"-D_THREAD_SAFE",
"-D__WXMAC__",
"-D_DEBUG",
"-DBUILDING_MANAGER",
"-DMAC_OS_X_VERSION_MAX_ALLOWED=101300",
"-DwxADJUST_MINSIZE=0",
);