summaryrefslogtreecommitdiff
path: root/userland/libc/stdlib/atol.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-04-17 16:55:16 +0200
committerAnton Kling <anton@kling.gg>2024-04-17 16:55:16 +0200
commitd0cca44913356f8ce15e15216b0e26c2e74b4d06 (patch)
treef85f5360e528da9914cd4c45f4719d454711f012 /userland/libc/stdlib/atol.c
parentd3f8196eb2cd57fec5f6e2691fdbc802c4d92fc8 (diff)
LibC: Add more functions that support "long long" integers
Diffstat (limited to 'userland/libc/stdlib/atol.c')
-rw-r--r--userland/libc/stdlib/atol.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/userland/libc/stdlib/atol.c b/userland/libc/stdlib/atol.c
new file mode 100644
index 0000000..7669457
--- /dev/null
+++ b/userland/libc/stdlib/atol.c
@@ -0,0 +1,5 @@
+#include <stdlib.h>
+
+long atol(const char *nptr) {
+ return strtol(nptr, (char **)NULL, 10);
+}