From 93b7fedb31b6086d2b9fd966cb8bf17430a9a515 Mon Sep 17 00:00:00 2001 From: Michal Kazior Date: Sat, 25 Jul 2020 16:58:43 +0200 Subject: wchar: implement wcstod_l This is similar to strtoll_l() in a way it ignores the locale_t argument and uses the global locale settings. Signed-off-by: Michal Kazior --- libgcompat/wchar.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libgcompat/wchar.c b/libgcompat/wchar.c index 0d53e88..930cc7c 100644 --- a/libgcompat/wchar.c +++ b/libgcompat/wchar.c @@ -125,3 +125,13 @@ long int wcstol_l(const wchar_t *nptr, wchar_t **endptr, int base, { return wcstol(nptr, endptr, base); } + +/** + * Convert a wide-character string to a double. + * + * Some day, when musl supports LC_NUMERIC, we can probably remove this. + */ +double wcstod_l(const wchar_t *nptr, wchar_t **endptr, locale_t loc) +{ + return wcstod(nptr, endptr); +} -- cgit v1.2.3-60-g2f50