glob64.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Find pathnames matching a pattern. Linux version.
  2. Copyright (C) 2017-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #include <sys/stat.h>
  16. #include <kernel_stat.h>
  17. #if !XSTAT_IS_XSTAT64
  18. # include <glob.h>
  19. # include <dirent.h>
  20. # include <sys/stat.h>
  21. # define dirent dirent64
  22. # define __readdir(dirp) __readdir64 (dirp)
  23. # define glob_t glob64_t
  24. # define __glob __glob64
  25. # define globfree(pglob) globfree64 (pglob)
  26. # undef stat
  27. # define stat stat64
  28. # define COMPILE_GLOB64 1
  29. # include <posix/glob.c>
  30. # include <shlib-compat.h>
  31. # ifdef GLOB_NO_OLD_VERSION
  32. strong_alias (__glob64, glob64)
  33. libc_hidden_def (glob64)
  34. # else
  35. libc_hidden_def (__glob64)
  36. versioned_symbol (libc, __glob64, glob64, GLIBC_2_27);
  37. libc_hidden_ver (__glob64, glob64)
  38. # endif
  39. #endif /* XSTAT_IS_XSTAT64 */