alphasort64.c 602 B

123456789101112131415161718192021222324
  1. #include <features.h>
  2. #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64
  3. #undef _FILE_OFFSET_BITS
  4. #define _FILE_OFFSET_BITS 64
  5. #endif
  6. #ifndef __USE_LARGEFILE64
  7. # define __USE_LARGEFILE64 1
  8. #endif
  9. /* We absolutely do _NOT_ want interfaces silently
  10. * renamed under us or very bad things will happen... */
  11. #ifdef __USE_FILE_OFFSET64
  12. # undef __USE_FILE_OFFSET64
  13. #endif
  14. #include <dirent.h>
  15. #include <string.h>
  16. #include "dirstream.h"
  17. int alphasort64(const void * a, const void * b)
  18. {
  19. return __strcmp ((*(const struct dirent64 **) a)->d_name,
  20. (*(const struct dirent64 **) b)->d_name);
  21. }