diff options
author | Joseph Myers <joseph@codesourcery.com> | 2014-10-06 22:30:54 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2014-10-06 22:30:54 +0000 |
commit | abb280f799c47f76463b27d60f271208cbbf0c49 (patch) | |
tree | 265a31f12957977bf1c1504d6d5dce62deb2b29c /sysdeps/unix/sysv/linux/powerpc/chown.c | |
parent | 47d4623785559a031ce33b266d1f9b5a2fd24d47 (diff) | |
download | glibc-abb280f799c47f76463b27d60f271208cbbf0c49.tar.gz glibc-abb280f799c47f76463b27d60f271208cbbf0c49.tar.xz glibc-abb280f799c47f76463b27d60f271208cbbf0c49.zip |
Move some chown / lchown / fchown definitions to syscalls.list (bug 14138).
Continuing the move of syscall definitions to syscalls.list, where the removal of support for old kernel versions has made this possible, this patch moves various definitions of chown, lchown and fchown. In most cases the need for special syscalls.list entries (rather than existing generic ones) is because these architectures use chown32, lchown32 and fchown32 as syscall names. Some architectures also have symbol versioning compatibility for older versions of chown having been equivalent to lchown. In the case of powerpc, chown.c (providing the chown@@GLIBC_2.1 default version) is replaced by a syscalls.list entry (for powerpc32; powerpc64 has no need for this because of its more recent minimum symbol version, so can just use the entry in sysdeps/unix/syscalls.list), but lchown.S is left as-is because it provides the compat version of chown as an actual alias for __lchown, which is not yet supported by syscalls.list. This file can be removed once such aliases are supported in syscalls.list. [BZ #14138] * sysdeps/unix/sysv/linux/arm/fchown.c: Remove file. * sysdeps/unix/sysv/linux/arm/lchown.c: Likewise. * sysdeps/unix/sysv/linux/m68k/fchown.c: Likewise. * sysdeps/unix/sysv/linux/m68k/lchown.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/chown.c: Likewise. * sysdeps/unix/sysv/linux/arm/syscalls.list (lchown): Add syscall. (fchown): Likewise. * sysdeps/unix/sysv/linux/m68k/syscalls.list (lchown): Likewise. (fchown): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (chown): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/chown.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/chown.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/chown.c b/sysdeps/unix/sysv/linux/powerpc/chown.c deleted file mode 100644 index 59c6147c25..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/chown.c +++ /dev/null @@ -1,43 +0,0 @@ -/* chown() compatibility. - Copyright (C) 1998-2014 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <string.h> -#include <unistd.h> -#include <limits.h> -#include <sysdep.h> -#include <stdlib.h> - -/* Consider moving to syscalls.list. */ - -/* - In Linux 2.1.x the chown functions have been changed. A new function lchown - was introduced. The new chown now follows symlinks - the old chown and the - new lchown do not follow symlinks. - This file emulates chown() under the old kernels. -*/ - -int -__chown (const char *file, uid_t owner, gid_t group) -{ - return INLINE_SYSCALL (chown, 3, file, owner, group); -} -libc_hidden_def (__chown) - -#include <shlib-compat.h> -versioned_symbol (libc, __chown, chown, GLIBC_2_1); |