diff options
author | Kevin Buettner <kevinb@redhat.com> | 2011-03-21 22:11:14 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2011-03-21 22:11:14 +0000 |
commit | 3b60b701b1e3ee239cacb1aafa71bb721c812ccd (patch) | |
tree | 546a7eb203a6cc8a40e8b8aeabdc8c93d7179ddd /newlib/libc/sys/sysnecv850/rename.c | |
parent | 5e5b7f35ace686ee5aa5ef8138412433a696fef7 (diff) | |
download | cygnal-3b60b701b1e3ee239cacb1aafa71bb721c812ccd.tar.gz cygnal-3b60b701b1e3ee239cacb1aafa71bb721c812ccd.tar.bz2 cygnal-3b60b701b1e3ee239cacb1aafa71bb721c812ccd.zip |
* libc/sys/sysnecv850/trap.S (___trap0): Fix errno handling.
* libc/sys/sysnecv850/rename.c: New file.
* libc/sys/sysnecv850/Makefile.am (lib_a_SOURCES): Add rename.c
* libc/sys/sysnecv850/Makefile.in: Regenerate.
* libc/sys/sysnecv850/fstat.c (_fstat): Invoke trap for SYS_fstat.
* libc/sys/sysnecv850/unlink.c (_unlink): Invoke trap for SYS_unlink.
Diffstat (limited to 'newlib/libc/sys/sysnecv850/rename.c')
-rw-r--r-- | newlib/libc/sys/sysnecv850/rename.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/newlib/libc/sys/sysnecv850/rename.c b/newlib/libc/sys/sysnecv850/rename.c new file mode 100644 index 000000000..9d9f7dbf9 --- /dev/null +++ b/newlib/libc/sys/sysnecv850/rename.c @@ -0,0 +1,17 @@ +#include <_ansi.h> +#include <sys/types.h> +#include <sys/stat.h> +#include "sys/syscall.h" + +int errno; + +int __trap0 (int function, int p1, int p2, int p3); + +#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3)) + +int +rename (const char *oldpath, + const char *newpath) +{ + return TRAP0 (SYS_rename, oldpath, newpath, 0); +} |