From d0cca44913356f8ce15e15216b0e26c2e74b4d06 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Wed, 17 Apr 2024 16:55:16 +0200 Subject: LibC: Add more functions that support "long long" integers --- userland/libc/include/limits.h | 1 + userland/libc/include/stdlib.h | 3 +++ 2 files changed, 4 insertions(+) (limited to 'userland/libc/include') diff --git a/userland/libc/include/limits.h b/userland/libc/include/limits.h index 6d0abe0..ad9e40c 100644 --- a/userland/libc/include/limits.h +++ b/userland/libc/include/limits.h @@ -2,3 +2,4 @@ #define FILENAME_MAX PATH_MAX #define ULONG_MAX 0xFFFFFFFFUL #define LONG_MAX 2147483647 +#define LLONG_MAX 9223372036854775807 diff --git a/userland/libc/include/stdlib.h b/userland/libc/include/stdlib.h index 0c3d0f4..7e23035 100644 --- a/userland/libc/include/stdlib.h +++ b/userland/libc/include/stdlib.h @@ -18,6 +18,7 @@ void srand(unsigned int seed); unsigned long strtoul(const char *restrict str, char **restrict endptr, int base); long strtol(const char *str, char **restrict endptr, int base); +long long strtoll(const char *str, char **restrict endptr, int base); void abort(void); int abs(int i); void qsort(void *base, size_t nel, size_t width, @@ -30,4 +31,6 @@ double atof(const char *str); double strtod(const char *restrict nptr, char **restrict endptr); int atoi(const char *str); char *realpath(const char *filename, char *resolvedname); +long atol(const char *nptr); +long long atoll(const char *nptr); #endif -- cgit v1.2.3