diff options
author | dzwdz | 2023-08-14 18:51:07 +0200 |
---|---|---|
committer | dzwdz | 2023-08-14 18:51:07 +0200 |
commit | 642b5fb0007b64c77d186fcb018d571152ee1d47 (patch) | |
tree | 1c466461f3602d306be309a053edae558ef2568e /src/libc/include/stdlib.h | |
parent | 8050069c57b729c18c19b1a03ab6e4bf63b4735e (diff) |
reorganization: first steps
Diffstat (limited to 'src/libc/include/stdlib.h')
-rw-r--r-- | src/libc/include/stdlib.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/libc/include/stdlib.h b/src/libc/include/stdlib.h new file mode 100644 index 0000000..ee9d179 --- /dev/null +++ b/src/libc/include/stdlib.h @@ -0,0 +1,34 @@ +#pragma once +#include <stddef.h> +#include <stdlib.h> + +#ifndef NO_MALLOC_H +#include <malloc.h> +#endif + +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 + +_Noreturn void abort(void); +_Noreturn void exit(int); + +const char *getprogname(void); +void setprogname(const char *progname); +void setproctitle(const char *fmt, ...); + +int mkstemp(char *template); +char *getenv(const char *name); +int system(const char *cmd); + +int abs(int i); + +int atoi(const char *s); +double atof(const char *s); + +long strtol(const char *restrict s, char **restrict end, int base); +long long strtoll(const char *restrict s, char **restrict end, int base); +unsigned long strtoul(const char *restrict s, char **restrict end, int base); +unsigned long long strtoull(const char *restrict s, char **restrict end, int base); +double strtod(const char *restrict s, char **restrict end); + +void qsort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *a, const void *b)); |