alphasort64.c 626 B

12345678910111213141516171819202122232425
  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. libc_hidden_proto(strcmp)
  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. }