summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/dos/strtoul.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/dos/strtoul.c')
-rw-r--r--contrib/syslinux-4.02/dos/strtoul.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/dos/strtoul.c b/contrib/syslinux-4.02/dos/strtoul.c
new file mode 100644
index 0000000..3be9430
--- /dev/null
+++ b/contrib/syslinux-4.02/dos/strtoul.c
@@ -0,0 +1,15 @@
+/*
+ * strtoul.c
+ *
+ * strtoul() function
+ */
+
+#include <stddef.h>
+#include <inttypes.h>
+
+extern uintmax_t strntoumax(const char *nptr, char **endptr, int base, size_t n);
+
+unsigned long strtoul(const char *nptr, char **endptr, int base)
+{
+ return (unsigned long) strntoumax(nptr, endptr, base, ~(size_t) 0);
+}