From c749bb5aa36f14a84b3cf353bb30ad5dd0bd5756 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 24 Jul 2017 17:38:25 +0200 Subject: [PATCH] mescc: Tinycc support: strtol stub. * mlibc/include/stdlib.h (strtol): Declare. * mlibc/libc-mes+tcc.c (strtol): Add stub. --- mlibc/include/stdlib.h | 1 + mlibc/libc-mes+tcc.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/mlibc/include/stdlib.h b/mlibc/include/stdlib.h index caeb192a..43ed3215 100644 --- a/mlibc/include/stdlib.h +++ b/mlibc/include/stdlib.h @@ -39,6 +39,7 @@ char* getenv (char const* s); void *malloc (size_t); void qsort (void *base, size_t nmemb, size_t size, int (*compar)(void const *, void const *)); void *realloc (void *p, size_t size); +long strtol (char const *nptr, char **endptr, int base); unsigned long strtoul (char const *nptr, char **endptr, int base); #endif // !(__GNUC__ && POSIX) diff --git a/mlibc/libc-mes+tcc.c b/mlibc/libc-mes+tcc.c index 5857d7de..0bc5c704 100644 --- a/mlibc/libc-mes+tcc.c +++ b/mlibc/libc-mes+tcc.c @@ -136,6 +136,12 @@ strchr (char const *s, int c) return 0; } +long +strtol (char const *nptr, char **endptr, int base) +{ + return 0; +} + unsigned long strtoul (char const *nptr, char **endptr, int base) {