alphasort64.c 556 B

123456789101112131415161718192021222324
  1. #include <features.h>
  2. #ifdef __UCLIBC_HAVE_LFS__
  3. #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64
  4. #undef _FILE_OFFSET_BITS
  5. #define _FILE_OFFSET_BITS 64
  6. #endif
  7. #ifndef __USE_FILE_OFFSET64
  8. # define __USE_FILE_OFFSET64 1
  9. #endif
  10. #ifndef __USE_LARGEFILE64
  11. # define __USE_LARGEFILE64 1
  12. #endif
  13. #include <dirent.h>
  14. #include <string.h>
  15. #include "dirstream.h"
  16. int alphasort64(const void * a, const void * b)
  17. {
  18. return strcmp ((*(const struct dirent64 **) a)->d_name,
  19. (*(const struct dirent64 **) b)->d_name);
  20. }
  21. #endif /* __UCLIBC_HAVE_LFS__ */