glob64.c 767 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include <features.h>
  2. #ifdef __UCLIBC_HAVE_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. #include "glob.c"
  28. #endif