From e9e08def23bbc84a7bd473ad041d9a86915e56d4 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Mon, 2 Dec 2013 16:24:13 +0100 Subject: [PATCH] remove special handling of rename() Change-Id: I69694e155250dc5f527dacbaf3f0ecbdc4873989 --- include/stdio.h | 2 +- lib/libc/sys-minix/Makefile.inc | 2 +- lib/libc/sys-minix/rename.c | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/stdio.h b/include/stdio.h index a33ba4c5c..e78a4d05d 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -276,7 +276,7 @@ int vsprintf(char * __restrict, const char * __restrict, __printflike(2, 0); #endif -#if !defined(__minix) && (defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)) +#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) int rename (const char *, const char *) __RENAME(__posix_rename); #else int rename (const char *, const char *); diff --git a/lib/libc/sys-minix/Makefile.inc b/lib/libc/sys-minix/Makefile.inc index 26c48bbff..c4194b635 100644 --- a/lib/libc/sys-minix/Makefile.inc +++ b/lib/libc/sys-minix/Makefile.inc @@ -13,7 +13,7 @@ SRCS+= accept.c access.c adjtime.c bind.c brk.c sbrk.c m_closefrom.c getsid.c \ ioctl.c issetugid.c kill.c link.c listen.c loadname.c lseek.c \ minix_rs.c mkdir.c mkfifo.c mknod.c mmap.c mount.c nanosleep.c \ open.c pathconf.c pipe.c poll.c pread.c ptrace.c pwrite.c \ - read.c readlink.c reboot.c recvfrom.c recvmsg.c rename.c\ + read.c readlink.c reboot.c recvfrom.c recvmsg.c rename.c \ rmdir.c select.c sem.c sendmsg.c sendto.c setgroups.c setsid.c \ setgid.c settimeofday.c setuid.c shmat.c shmctl.c shmget.c stime.c \ vectorio.c shutdown.c sigaction.c sigpending.c sigreturn.c sigsuspend.c\ diff --git a/lib/libc/sys-minix/rename.c b/lib/libc/sys-minix/rename.c index d8ec5419a..49847684c 100644 --- a/lib/libc/sys-minix/rename.c +++ b/lib/libc/sys-minix/rename.c @@ -5,6 +5,10 @@ #include #include +#ifdef __weak_alias +__weak_alias(__posix_rename, rename) +#endif + int rename(const char *name, const char *name2) { message m; -- 2.44.0