stat64.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Syscalls for uClibc
  3. *
  4. * Copyright (C) 2001-2003 by Erik Andersen
  5. * Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.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. #if defined __UCLIBC_HAS_LFS__
  40. #define __NR___syscall_stat64 __NR_stat64
  41. _syscall2(int, __syscall_stat64, const char *, file_name, struct stat64 *, buf);
  42. strong_alias(__syscall_stat64, stat64)
  43. #endif