glob64.c 923 B

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