23 lines
433 B
C
23 lines
433 B
C
#ifdef HAVE_CONFIG_H
|
|
#include <config.h>
|
|
#endif
|
|
|
|
#include <dirent.h>
|
|
|
|
#include <string.h>
|
|
|
|
#if VLIBC_LEVEL_GE(2)
|
|
|
|
/*
|
|
* alphasort (todo 24, XSI): the scandir comparator that orders entries by
|
|
* strcmp on their names. Receives two pointers to the array's struct
|
|
* dirent pointers.
|
|
*/
|
|
int
|
|
alphasort(const struct dirent **a, const struct dirent **b)
|
|
{
|
|
return strcmp((*a)->d_name, (*b)->d_name);
|
|
}
|
|
|
|
#endif /* VLIBC_LEVEL_GE(2) */
|