userspace/libc: implement qsort, realloc and reallocarray functions in stdlib

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-02-14 02:19:14 +02:00
parent afa87ec5f3
commit d9235c6f90
2 changed files with 58 additions and 4 deletions

View File

@ -86,11 +86,12 @@ extern "C"
long int nrand48(unsigned short int[3]);
char *ptsname(int);
int putenv(char *);
void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
void qsort(void *base, size_t nel, size_t width, int (*compar)(const void *, const void *));
int rand(void);
int rand_r(unsigned int *);
long random(void);
void *realloc(void *, size_t);
void *realloc(void *ptr, size_t size);
void *reallocarray(void *ptr, size_t nelem, size_t elsize);
char *realpath(const char *, char *);
unsigned short int seed48(unsigned short int[3]);
void setkey(const char *);