From 83f153eb4ca991d79e512cb5e15d1be43eb40e02 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 27 Nov 2019 18:49:46 +0100 Subject: [PATCH] Revert "builtin_printf: Use proper functions" This reverts commit 1102b83b2d5bdf7018705c8a882edf6d3f133149. wcstold_l is not available on musl and we don't currently have our "own" implementation. Revert for now until we do. --- src/builtin_printf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builtin_printf.cpp b/src/builtin_printf.cpp index a50b05321..e8a208b12 100644 --- a/src/builtin_printf.cpp +++ b/src/builtin_printf.cpp @@ -288,13 +288,13 @@ uintmax_t raw_string_to_scalar_type(const wchar_t *s, wchar_t **end) { template <> long double raw_string_to_scalar_type(const wchar_t *s, wchar_t **end) { - auto val = std::wcstold(s, end); + double val = std::wcstod(s, end); if (**end == L'\0') return val; // The conversion using the user's locale failed. That may be due to the string not being a // valid floating point value. It could also be due to the locale using different separator // characters than the normal english convention. So try again by forcing the use of a locale // that employs the english convention for writing floating point numbers. - return wcstold_l(s, end, fish_c_locale()); + return wcstod_l(s, end, fish_c_locale()); } template