summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdlib/atol.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/atol.c')
-rw-r--r--newlib/libc/stdlib/atol.c9
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);
+}
+