diff options
author | Michal Kazior <kazikcz@gmail.com> | 2020-07-25 16:58:12 +0200 |
---|---|---|
committer | Michal Kazior <kazikcz@gmail.com> | 2020-07-25 19:19:16 +0200 |
commit | 86d4db218e92bcf82e63698f214c0c628ebd982b (patch) | |
tree | 8722c173efbd8ca1a7faee9d9f39a8107f3bff62 | |
parent | 338ea5e946324040954d5917a919c8285f956e1d (diff) | |
download | gcompat-86d4db218e92bcf82e63698f214c0c628ebd982b.tar.gz gcompat-86d4db218e92bcf82e63698f214c0c628ebd982b.tar.bz2 gcompat-86d4db218e92bcf82e63698f214c0c628ebd982b.tar.xz gcompat-86d4db218e92bcf82e63698f214c0c628ebd982b.zip |
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 <kazikcz@gmail.com>
-rw-r--r-- | libgcompat/wchar.c | 11 |
1 files changed, 11 insertions, 0 deletions
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); +} |