glob64.c 903 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. #ifdef __UCLIBC_HAS_LFS__
  8. #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64
  9. #undef _FILE_OFFSET_BITS
  10. #define _FILE_OFFSET_BITS 64
  11. #endif
  12. #ifndef __USE_LARGEFILE64
  13. # define __USE_LARGEFILE64 1
  14. #endif
  15. /* We absolutely do _NOT_ want interfaces silently
  16. * renamed under us or very bad things will happen... */
  17. #ifdef __USE_FILE_OFFSET64
  18. # undef __USE_FILE_OFFSET64
  19. #endif
  20. #include <dirent.h>
  21. #include <glob.h>
  22. #include <sys/stat.h>
  23. #define dirent dirent64
  24. #define glob_t glob64_t
  25. #define glob(pattern, flags, errfunc, pglob) \
  26. glob64 (pattern, flags, errfunc, pglob)
  27. #define globfree(pglob) globfree64 (pglob)
  28. #undef stat
  29. #define stat stat64
  30. #define lstat lstat64
  31. #define __GLOB64 1
  32. #include "glob.c"
  33. #endif