1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

hurd: Add renameat2 support for RENAME_NOREPLACE

* include/stdio.h (__renameat2): New hidden prototype.
	* stdio-common/renameat2.c (__renameat2): Add hidden definition.
	* sysdeps/mach/hurd/renameat.c (__renameat): Move implementation to...
	* sysdeps/mach/hurd/renameat2.c (__renameat2): ... new function, and
	add support for RENAME_NOREPLACE.
	* sysdeps/unix/sysv/linux/renameat2.c (__renameat2): Add hidden definition.
This commit is contained in:
Samuel Thibault
2019-02-27 07:53:13 -08:00
parent f627dd4da8
commit 1b21841775
6 changed files with 73 additions and 22 deletions

View File

@ -20,7 +20,7 @@
#include <stdio.h>
int
renameat2 (int oldfd, const char *old, int newfd, const char *new,
__renameat2 (int oldfd, const char *old, int newfd, const char *new,
unsigned int flags)
{
if (flags == 0)
@ -28,3 +28,5 @@ renameat2 (int oldfd, const char *old, int newfd, const char *new,
__set_errno (EINVAL);
return -1;
}
libc_hidden_def (__renameat2)
weak_alias (__renameat2, renameat2)