diff --git a/3party/fmt/CMakeLists.txt b/3party/fmt/CMakeLists.txt index d99babd..887f7bd 100644 --- a/3party/fmt/CMakeLists.txt +++ b/3party/fmt/CMakeLists.txt @@ -93,6 +93,7 @@ if (WIN32) else () check_symbol_exists(open fcntl.h HAVE_OPEN) endif () +check_symbol_exists(strtod_l stdlib.h HAVE_STRTOD_L) add_subdirectory(fmt) diff --git a/3party/fmt/fmt/posix.h b/3party/fmt/fmt/posix.h index 88512de..f829799 100644 --- a/3party/fmt/fmt/posix.h +++ b/3party/fmt/fmt/posix.h @@ -327,6 +327,10 @@ class Locale { static double strtod_l(const char *nptr, char **endptr, _locale_t locale) { return _strtod_l(nptr, endptr, locale); } +# elif !defined(HAVE_STRTOD_L) + static double strtod_l(const char *nptr, char **endptr, locale_t) { + return atof(nptr); + } # endif locale_t locale_;