diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-08-24 21:05:39 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-08-24 21:05:39 +0000 |
commit | fa5a15eeb283a27ea4f03ee581856930e60a7ca0 (patch) | |
tree | fcbc3b65c4653105ebc54f2c756851379add0237 /libc/stdlib/strto_l.c | |
parent | fb35042521e6e4b0dcee32ca7e0ce33b18f9523d (diff) |
atoi, atol, atoll, and atof are supposed to be functions, not macros.
-Erik
Diffstat (limited to 'libc/stdlib/strto_l.c')
-rw-r--r-- | libc/stdlib/strto_l.c | 17 |
1 files changed, 16 insertions, 1 deletions
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 + |