diff options
Diffstat (limited to 'src/libc/stdlib.c')
-rw-r--r-- | src/libc/stdlib.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/libc/stdlib.c b/src/libc/stdlib.c index 1739230..16c8f70 100644 --- a/src/libc/stdlib.c +++ b/src/libc/stdlib.c @@ -33,9 +33,13 @@ void setproctitle(const char *fmt, ...) { va_end(argp); } -int mkstemp(char *template) { - // TODO randomize template - hid_t h = camellia_open(template, OPEN_CREATE | OPEN_RW); +char *mktemp(char *tmpl) { + // TODO mktemp mkstemp + return tmpl; +} + +int mkstemp(char *tmpl) { + hid_t h = camellia_open(tmpl, OPEN_CREATE | OPEN_RW); if (h < 0) { errno = -h; return -1; @@ -65,6 +69,10 @@ int atoi(const char *s) { return strtol(s, NULL, 10); } +long atol(const char *s) { + return strtol(s, NULL, 10); +} + double atof(const char *s) { (void)s; __libc_panic("unimplemented"); @@ -141,8 +149,3 @@ 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"); -} |