xstat64.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* xstat64 using Linux stat64 system call.
  2. Copyright (C) 1991-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 <errno.h>
  16. #include <stddef.h>
  17. #include <sys/stat.h>
  18. #include <kernel_stat.h>
  19. #include <sysdep.h>
  20. #include <sys/syscall.h>
  21. /* Get information about the file NAME in BUF. */
  22. int
  23. ___xstat64 (int vers, const char *name, struct stat64 *buf)
  24. {
  25. int result;
  26. result = INLINE_SYSCALL (stat64, 2, name, buf);
  27. return result;
  28. }
  29. #include <shlib-compat.h>
  30. #if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
  31. versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
  32. strong_alias (___xstat64, __old__xstat64)
  33. compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1);
  34. hidden_ver (___xstat64, __xstat64)
  35. #else
  36. strong_alias (___xstat64, __xstat64)
  37. hidden_def (__xstat64)
  38. #endif