fix impl strtod_l
Some checks failed
rpcrypto-build / build (Release, host.toolchain.cmake) (push) Waiting to run
rpcrypto-build / build (Release, mips64el-linux-gnuabi64.toolchain.cmake) (push) Waiting to run
rpcrypto-build / build (Release, mipsel-openwrt-linux-musl.toolchain.cmake) (push) Waiting to run
rpcrypto-build / build (Release, mipsel-openwrt-linux.toolchain.cmake) (push) Waiting to run
rpcrypto-build / build (Debug, hisiv500.toolchain.cmake) (push) Successful in 42s
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Successful in 57s
rpcrypto-build / build (Debug, host-afl.toolchain.cmake) (push) Failing after 7s
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Successful in 56s
rpcrypto-build / build (Debug, host.toolchain.cmake) (push) Failing after 7s
rpcrypto-build / build (Debug, mipsel-openwrt-linux.toolchain.cmake) (push) Failing after 45s
rpcrypto-build / build (Debug, mips64el-linux-gnuabi64.toolchain.cmake) (push) Successful in 1m0s
rpcrypto-build / build (Debug, mipsel-openwrt-linux-musl.toolchain.cmake) (push) Failing after 59s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Successful in 48s
rpcrypto-build / build (Release, hisiv500.toolchain.cmake) (push) Has been cancelled
rpcrypto-build / build (Release, host-afl.toolchain.cmake) (push) Has been cancelled
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Has been cancelled

This commit is contained in:
tqcq 2023-12-05 14:28:25 +08:00
parent c7e9fdc3d7
commit 07348527c9
2 changed files with 5 additions and 0 deletions

View File

@ -93,6 +93,7 @@ if (WIN32)
else () else ()
check_symbol_exists(open fcntl.h HAVE_OPEN) check_symbol_exists(open fcntl.h HAVE_OPEN)
endif () endif ()
check_symbol_exists(strtod_l stdlib.h HAVE_STRTOD_L)
add_subdirectory(fmt) add_subdirectory(fmt)

View File

@ -327,6 +327,10 @@ class Locale {
static double strtod_l(const char *nptr, char **endptr, _locale_t locale) { static double strtod_l(const char *nptr, char **endptr, _locale_t locale) {
return _strtod_l(nptr, endptr, 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 # endif
locale_t locale_; locale_t locale_;