1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Add fifth parameter to linkat.

This commit is contained in:
Ulrich Drepper
2006-02-27 00:52:57 +00:00
parent d900bcba1e
commit 4baf9081f8
2 changed files with 13 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2005 Free Software Foundation, Inc. /* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -24,11 +24,12 @@
/* Make a link to FROM relative to FROMFD called TO relative to TOFD. */ /* Make a link to FROM relative to FROMFD called TO relative to TOFD. */
int int
linkat (fromfd, from, tofd, to) linkat (fromfd, from, tofd, to, flags)
int fromfd; int fromfd;
const char *from; const char *from;
int tofd; int tofd;
const char *to; const char *to;
int flags;
{ {
if (from == NULL || to == NULL) if (from == NULL || to == NULL)
{ {

View File

@ -28,20 +28,28 @@
/* Make a link to FROM named TO but relative paths in TO and FROM are /* Make a link to FROM named TO but relative paths in TO and FROM are
interpreted relative to FROMFD and TOFD respectively. */ interpreted relative to FROMFD and TOFD respectively. */
int int
linkat (fromfd, from, tofd, to) linkat (fromfd, from, tofd, to, flags)
int fromfd; int fromfd;
const char *from; const char *from;
int tofd; int tofd;
const char *to; const char *to;
int flags;
{ {
int result; int result;
// XXX Will be removed once the kernel support is in place.
if (flags != 0)
{
__set_errno (EINVAL);
return -1;
}
#ifdef __NR_linkat #ifdef __NR_linkat
# ifndef __ASSUME_ATFCTS # ifndef __ASSUME_ATFCTS
if (__have_atfcts >= 0) if (__have_atfcts >= 0)
# endif # endif
{ {
result = INLINE_SYSCALL (linkat, 4, fromfd, from, tofd, to); result = INLINE_SYSCALL (linkat, 5, fromfd, from, tofd, to, flags);
# ifndef __ASSUME_ATFCTS # ifndef __ASSUME_ATFCTS
if (result == -1 && errno == ENOSYS) if (result == -1 && errno == ENOSYS)
__have_atfcts = -1; __have_atfcts = -1;