From ce9f0b12d06dd19f3fd04d08d2954be0a24ac35e Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 24 Jul 2017 13:10:27 +0200 Subject: [PATCH] mescc: Tinycc support: strtoul stub. * mlibc/include/stdlib.h (strtoul): Declare. * mlibc/libc-mes+tcc.c (strtoul): Add stub. --- mlibc/include/stdlib.h | 7 ++++--- mlibc/libc-mes+tcc.c | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/mlibc/include/stdlib.h b/mlibc/include/stdlib.h index b2d181bb..afa54892 100644 --- a/mlibc/include/stdlib.h +++ b/mlibc/include/stdlib.h @@ -33,11 +33,12 @@ typedef long size_t; #endif -char* getenv (char const* s); int atoi (char const *s); -void *malloc (size_t); -void *realloc (void *p, size_t size); void exit (int); +char* getenv (char const* s); +void *malloc (size_t); +unsigned long strtoul (char const *nptr, char **endptr, int base); +void *realloc (void *p, size_t size); #endif // !(__GNUC__ && POSIX) diff --git a/mlibc/libc-mes+tcc.c b/mlibc/libc-mes+tcc.c index 3cdfaa5a..d9310d02 100644 --- a/mlibc/libc-mes+tcc.c +++ b/mlibc/libc-mes+tcc.c @@ -53,3 +53,9 @@ memcmp (void const *s1, void const *s2, size_t n) { return 0; } + +unsigned long +strtoul (char const *nptr, char **endptr, int base) +{ + return 0; +}