alphasort64.c 775 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  3. *
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. #include <features.h>
  7. #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64
  8. #undef _FILE_OFFSET_BITS
  9. #define _FILE_OFFSET_BITS 64
  10. #endif
  11. #ifndef __USE_LARGEFILE64
  12. # define __USE_LARGEFILE64 1
  13. #endif
  14. /* We absolutely do _NOT_ want interfaces silently
  15. * renamed under us or very bad things will happen... */
  16. #ifdef __USE_FILE_OFFSET64
  17. # undef __USE_FILE_OFFSET64
  18. #endif
  19. #include <dirent.h>
  20. #include <string.h>
  21. #include "dirstream.h"
  22. libc_hidden_proto(strcmp)
  23. int alphasort64(const void * a, const void * b)
  24. {
  25. return strcmp ((*(const struct dirent64 **) a)->d_name,
  26. (*(const struct dirent64 **) b)->d_name);
  27. }