stat.c 945 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Syscalls for uClibc
  3. *
  4. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. */
  8. /* Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
  9. * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
  10. */
  11. #define _GNU_SOURCE
  12. #define _LARGEFILE64_SOURCE
  13. #include <features.h>
  14. #undef __OPTIMIZE__
  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 <errno.h>
  21. #include <sys/types.h>
  22. #include <sys/syscall.h>
  23. #include <endian.h>
  24. #include <unistd.h>
  25. #define _SYS_STAT_H
  26. #include <bits/stat.h>
  27. #define __NR___syscall_stat __NR_stat
  28. static inline _syscall2(int, __syscall_stat, const char *, file_name, struct stat *, buf);
  29. libc_hidden_proto(stat)
  30. strong_alias(__syscall_stat,stat)
  31. libc_hidden_def(stat)