alphasort64.c 658 B

1234567891011121314151617181920212223242526
  1. #include <features.h>
  2. #ifdef __UCLIBC_HAS_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_LARGEFILE64
  8. # define __USE_LARGEFILE64 1
  9. #endif
  10. /* We absolutely do _NOT_ want interfaces silently
  11. * renamed under us or very bad things will happen... */
  12. #ifdef __USE_FILE_OFFSET64
  13. # undef __USE_FILE_OFFSET64
  14. #endif
  15. #include <dirent.h>
  16. #include <string.h>
  17. #include "dirstream.h"
  18. int alphasort64(const void * a, const void * b)
  19. {
  20. return strcmp ((*(const struct dirent64 **) a)->d_name,
  21. (*(const struct dirent64 **) b)->d_name);
  22. }
  23. #endif /* __UCLIBC_HAS_LFS__ */