about summary refs log tree commit diff
path: root/src/stdlib/strtoul.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-04-16 16:55:24 -0400
committerRich Felker <dalias@aerifal.cx>2012-04-16 16:55:24 -0400
commit96e9773eb764afa649b099a6e283dba4c69389a9 (patch)
tree52e2223324cce3db02ff6318ad3f8eb940bd8d5f /src/stdlib/strtoul.c
parent18efeb320b763e541a7dbf61a7da1cbe13ab2be9 (diff)
downloadmusl-96e9773eb764afa649b099a6e283dba4c69389a9.tar.gz
musl-96e9773eb764afa649b099a6e283dba4c69389a9.tar.xz
musl-96e9773eb764afa649b099a6e283dba4c69389a9.zip
use the new integer parser (FILE/shgetc based) for strtol, wcstol, etc.
Diffstat (limited to 'src/stdlib/strtoul.c')
-rw-r--r--src/stdlib/strtoul.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/stdlib/strtoul.c b/src/stdlib/strtoul.c
deleted file mode 100644
index 20d8bfb2..00000000
--- a/src/stdlib/strtoul.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <stdlib.h>
-#include <inttypes.h>
-#include <errno.h>
-#include <limits.h>
-
-unsigned long strtoul(const char *s, char **p, int base)
-{
-	intmax_t x;
-	if (sizeof(intmax_t) == sizeof(long))
-		return strtoumax(s, p, base);
-	x = strtoimax(s, p, base);
-	if (-x > ULONG_MAX || x > ULONG_MAX) {
-		errno = ERANGE;
-		return ULONG_MAX;
-	}
-	return x;
-}