summaryrefslogtreecommitdiff
path: root/src/user/lib/stdlib.c
diff options
context:
space:
mode:
authordzwdz2023-06-09 17:22:31 +0200
committerdzwdz2023-06-09 17:22:31 +0200
commit112eafe13c3628cad6e692179c064dbbc3be2d8b (patch)
tree04bdb3df2d2e6fd7042dbefa117ff0e5a5447476 /src/user/lib/stdlib.c
parent668655053911072741883fd258c23e9d0668a853 (diff)
ports/dash: stub out everything needed for dash to compile
Diffstat (limited to 'src/user/lib/stdlib.c')
-rw-r--r--src/user/lib/stdlib.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/user/lib/stdlib.c b/src/user/lib/stdlib.c
index 994521f..13745d1 100644
--- a/src/user/lib/stdlib.c
+++ b/src/user/lib/stdlib.c
@@ -121,6 +121,12 @@ long strtol(const char *restrict s, char **restrict end, int base) {
return n * sign;
}
+long long strtoll(const char *restrict s, char **restrict end, int base) {
+ int sign;
+ long long n = strton(s, end, base, &sign);
+ return n * sign;
+}
+
unsigned long strtoul(const char *restrict s, char **restrict end, int base) {
return strton(s, end, base, NULL);
}
@@ -133,3 +139,8 @@ double strtod(const char *restrict s, char **restrict end) {
(void)s; (void)end;
__libc_panic("unimplemented");
}
+
+void qsort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *a, const void *b)) {
+ (void)base; (void)nmemb; (void)size; (void)cmp;
+ __libc_panic("unimplemented");
+}