From 86d4db218e92bcf82e63698f214c0c628ebd982b Mon Sep 17 00:00:00 2001 From: Michal Kazior Date: Sat, 25 Jul 2020 16:58:12 +0200 Subject: wchar: implement wcstoul_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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libgcompat/wchar.c b/libgcompat/wchar.c index 7ac36f6..c017582 100644 --- a/libgcompat/wchar.c +++ b/libgcompat/wchar.c @@ -103,3 +103,14 @@ long int __wcstol_internal(const wchar_t *nptr, wchar_t **endptr, int base, assert(group == 0); return wcstol(nptr, endptr, base); } + +/** + * Convert a wide-character string to an unsigned long int. + * + * Some day, when musl supports LC_NUMERIC, we can probably remove this. + */ +unsigned long int wcstoul_l(const wchar_t *nptr, wchar_t **endptr, + int base, locale_t loc) +{ + return wcstoul(nptr, endptr, base); +} -- cgit v1.2.3-60-g2f50