diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-03-08 18:18:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-03-08 18:18:43 +0000 |
commit | d916515874fcd82d76ddace10b64d7ec9d523ce7 (patch) | |
tree | 3fe7eebccfe963a29c215801a69eb35cd2f3553f | |
parent | 1581459f2e26e2a6af42790cd7a488806154a294 (diff) | |
download | glibc-d916515874fcd82d76ddace10b64d7ec9d523ce7.tar glibc-d916515874fcd82d76ddace10b64d7ec9d523ce7.tar.gz glibc-d916515874fcd82d76ddace10b64d7ec9d523ce7.tar.bz2 glibc-d916515874fcd82d76ddace10b64d7ec9d523ce7.zip |
Update.
1998-03-08 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/chown.c: Add versioning stuff.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/chown.c | 35 |
2 files changed, 33 insertions, 6 deletions
@@ -1,3 +1,7 @@ +1998-03-08 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/unix/sysv/linux/chown.c: Add versioning stuff. + 1998-03-07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/unix/sysv/linux/chown.c: New file for compatibility of diff --git a/sysdeps/unix/sysv/linux/chown.c b/sysdeps/unix/sysv/linux/chown.c index f380d93736..578dfc7e3f 100644 --- a/sysdeps/unix/sysv/linux/chown.c +++ b/sysdeps/unix/sysv/linux/chown.c @@ -38,7 +38,7 @@ static int __libc_old_chown; int -__chown (const char *file, uid_t owner, gid_t group) +__real_chown (const char *file, uid_t owner, gid_t group) { int result; @@ -56,13 +56,36 @@ __chown (const char *file, uid_t owner, gid_t group) return __lchown (file, owner, group); } -#else -/* compiling under older kernels */ +#endif + + +#if !defined __NR_lchown || \ + (defined HAVE_ELF && defined PIC && defined DO_VERSIONING) +/* compiling under older kernels or for compatibiity */ int -__chown (const char *file, uid_t owner, gid_t group) +__chown_is_lchown (const char *file, uid_t owner, gid_t group) { - return __syscall_chown (file, owner, group); + return __lchown (file, owner, group); } #endif -weak_alias (__chown, chown) +#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING +symbol_version (__chown_is_lchown, __chown, GLIBC_2.0) +symbol_version (__chown_is_lchown, chown, GLIBC_2.0) + +# ifdef __NR_lchown +default_symbol_version (__real_chown, __chown, GLIBC_2.1) +default_symbol_version (__real_chown, chown, GLIBC_2.1) +# else +default_symbol_version (__chown_is_lchown, __chown, GLIBC_2.1) +default_symbol_version (__chown_is_lchown, chown, GLIBC_2.1) +# endif +#else +# ifdef __NR_lchown +strong_alias (__real_chown, __chown) +weak_alias (__real_chown, chown) +# else +strong_alias (__chown_is_lchown, __chown) +weak_alias (__chown_is_lchown, chown) +# endif +#endif |