From fa5a15eeb283a27ea4f03ee581856930e60a7ca0 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 24 Aug 2001 21:05:39 +0000 Subject: atoi, atol, atoll, and atof are supposed to be functions, not macros. -Erik --- libc/stdlib/strto_l.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libc/stdlib/strto_l.c') diff --git a/libc/stdlib/strto_l.c b/libc/stdlib/strto_l.c index aed6ef346..666433927 100644 --- a/libc/stdlib/strto_l.c +++ b/libc/stdlib/strto_l.c @@ -183,10 +183,25 @@ unsigned long strtoul(const char *str, char **endptr, int base) #endif #if L_strtol - long strtol(const char *str, char **endptr, int base) { return _strto_l(str, endptr, base, 0); } #endif + +#ifdef L_atoi +int atoi(const char *str) +{ + return((int)_strto_l((str),(char**)0,10, 0)); + +} +#endif + +#ifdef L_atol +long atol(const char *str) +{ + return(_strto_l((str),(char**)0,10, 0)); +} +#endif + -- cgit v1.2.3