diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2003-11-27 20:15:47 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2003-11-27 20:15:47 +0000 |
commit | 83bf7d2f89d008a8d6c958f2020f78e26c525a4d (patch) | |
tree | 86438a54fdc28d391f79392261823bfbcfe6e0d0 /newlib/libc/stdlib/atol.c | |
parent | 6bbb700c348150b7f16b185ec63eb0c1fcc92584 (diff) | |
download | cygnal-83bf7d2f89d008a8d6c958f2020f78e26c525a4d.tar.gz cygnal-83bf7d2f89d008a8d6c958f2020f78e26c525a4d.tar.bz2 cygnal-83bf7d2f89d008a8d6c958f2020f78e26c525a4d.zip |
2003-11-27 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdlib.h (_atoll_r, _atol_r): New prototypes.
* libc/stdlib/atol.c (_atol_r): New reentrant function.
* libc/stdlib/atoll.c (_atoll_r): Ditto.
Diffstat (limited to 'newlib/libc/stdlib/atol.c')
-rw-r--r-- | newlib/libc/stdlib/atol.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/atol.c b/newlib/libc/stdlib/atol.c index 6b059a8d2..8d0e5cd0b 100644 --- a/newlib/libc/stdlib/atol.c +++ b/newlib/libc/stdlib/atol.c @@ -5,8 +5,17 @@ #include <stdlib.h> #include <_ansi.h> +#ifndef _REENT_ONLY long _DEFUN (atol, (s), _CONST char *s) { return strtol (s, NULL, 10); } +#endif /* !_REENT_ONLY */ + +long +_DEFUN (_atol_r, (ptr, s), struct _reent *ptr _AND _CONST char *s) +{ + return _strtol_r (ptr, s, NULL, 10); +} + |