libc: Add qsort()
This commit is contained in:
parent
dcd93cce3a
commit
d1801d484c
@ -115,7 +115,9 @@ extern "C"
|
||||
/* Clear all environment variables. */
|
||||
int clearenv(void);
|
||||
|
||||
void qsort(void*, size_t, size_t, int (*)(const void*, const void*));
|
||||
/* Sort an array of arbitrary elements using a comparison function. */
|
||||
void qsort(void* base, size_t nmemb, size_t size, int (*compar)(const void*, const void*));
|
||||
|
||||
void* bsearch(const void*, const void*, size_t, size_t, int (*)(const void*, const void*));
|
||||
|
||||
/* Convert a multibyte character string to a wide character string. */
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <limits.h>
|
||||
#include <luna/Heap.h>
|
||||
#include <luna/NumberParsing.h>
|
||||
#include <luna/Sort.h>
|
||||
#include <luna/Utf8.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/syscall.h>
|
||||
@ -199,4 +200,9 @@ extern "C"
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void qsort(void* base, size_t nmemb, size_t size, int (*compar)(const void*, const void*))
|
||||
{
|
||||
c_quicksort(base, nmemb, size, compar);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user