From cbd621ef2c4d5698493b45995f19eea62c2e4de1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 31 May 2013 14:44:52 +0200 Subject: [PATCH] software/stdlib: fix atoi --- software/include/base/stdlib.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/software/include/base/stdlib.h b/software/include/base/stdlib.h index 64ddabfd..790e4eb0 100644 --- a/software/include/base/stdlib.h +++ b/software/include/base/stdlib.h @@ -47,16 +47,17 @@ static inline long int labs(long int x) } unsigned long strtoul(const char *nptr, char **endptr, int base); +long strtol(const char *nptr, char **endptr, int base); +double strtod(const char *str, char **endptr); + int skip_atoi(const char **s); static inline int atoi(const char *nptr) { - return strtoul(nptr, NULL, 0); + return strtol(nptr, NULL, 10); } static inline long atol(const char *nptr) { return (long)atoi(nptr); } char *number(char *buf, char *end, unsigned long num, int base, int size, int precision, int type); -long strtol(const char *nptr, char **endptr, int base); -double strtod(const char *str, char **endptr); #define RAND_MAX 2147483647 -- 2.30.2