glob64.c 793 B

12345678910111213141516171819202122232425262728293031323334353637
  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 <glob.h>
  17. #include <sys/stat.h>
  18. #define dirent dirent64
  19. #define readdir(dirp) readdir64 (dirp)
  20. #define glob_t glob64_t
  21. #define glob(pattern, flags, errfunc, pglob) \
  22. glob64 (pattern, flags, errfunc, pglob)
  23. #define globfree(pglob) globfree64 (pglob)
  24. #undef stat
  25. #define stat stat64
  26. #define lstat lstat64
  27. #define __GLOB64 1
  28. #include "glob.c"
  29. #endif