diff options
Diffstat (limited to 'libgcompat')
-rw-r--r-- | libgcompat/string.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libgcompat/string.c b/libgcompat/string.c index 9a1cb60..9045d5d 100644 --- a/libgcompat/string.c +++ b/libgcompat/string.c @@ -1,5 +1,6 @@ #include <assert.h> /* assert */ #include <string.h> /* memcpy, strcpy, strncat, strndup */ +#include <stdlib.h> /* strto[u?]ll */ /* "Checked" memcpy */ void *__memcpy_chk(void *dest, const void *src, size_t len, size_t destlen) @@ -82,3 +83,14 @@ char *__strsep_g(char **stringp, const char *delim) { return strsep(stringp, delim); } + +/* Some day, when musl supports LC_NUMERIC, we can probably remove these */ +long long int strtoll_l(const char *nptr, char **endptr, int base, locale_t locale) +{ + return strtoll(nptr, endptr, base); +} + +unsigned long long int strtoull_l(const char *nptr, char **endptr, int base, locale_t locale) +{ + return strtoull(nptr, endptr, base); +} |