summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
Diffstat (limited to 'missing')
-rw-r--r--missing/strtol.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/missing/strtol.c b/missing/strtol.c
deleted file mode 100644
index 87bd73124c..0000000000
--- a/missing/strtol.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* public domain rewrite of strtol(3) */
-
-#include "ruby/missing.h"
-#include <ctype.h>
-
-long
-strtol(const char *nptr, char **endptr, int base)
-{
- long result;
- const char *p = nptr;
-
- while (isspace(*p)) {
- p++;
- }
- if (*p == '-') {
- p++;
- result = -strtoul(p, endptr, base);
- }
- else {
- if (*p == '+') p++;
- result = strtoul(p, endptr, base);
- }
- if (endptr != 0 && *endptr == p) {
- *endptr = (char *)nptr;
- }
- return result;
-}