stat.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Syscalls for uClibc
  3. *
  4. * Copyright (C) 2001-2003 by Erik Andersen
  5. * Extracted from ../common/syscalls.c by Erik Andersen <andersen@codpoet.org>
  6. * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU Library General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or (at your
  11. * option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful, but WITHOUT
  14. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
  16. * for more details.
  17. *
  18. * You should have received a copy of the GNU Library General Public License
  19. * along with this program; if not, write to the Free Software Foundation,
  20. * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. *
  22. */
  23. #define _GNU_SOURCE
  24. #define _LARGEFILE64_SOURCE
  25. #include <features.h>
  26. #undef __OPTIMIZE__
  27. /* We absolutely do _NOT_ want interfaces silently
  28. * * * renamed under us or very bad things will happen... */
  29. #ifdef __USE_FILE_OFFSET64
  30. # undef __USE_FILE_OFFSET64
  31. #endif
  32. #include <errno.h>
  33. #include <sys/types.h>
  34. #include <sys/syscall.h>
  35. #include <endian.h>
  36. #include <unistd.h>
  37. #define _SYS_STAT_H
  38. #include <bits/stat.h>
  39. #define __NR___syscall_stat __NR_stat
  40. _syscall2(int, __syscall_stat, const char *, file_name, struct stat *, buf);
  41. strong_alias(__syscall_stat, stat)