aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-20 20:05:26 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-20 20:05:26 +0000
commitc3293cba95e62296f75004638ec75866fea07f9a (patch)
tree2bce3379f2f7e86306477f8dc0baa06113d9c7f3
parent4b2ed4190d1f725969a441cc34e93b45cf288e13 (diff)
downloadglibc-c3293cba95e62296f75004638ec75866fea07f9a.tar
glibc-c3293cba95e62296f75004638ec75866fea07f9a.tar.gz
glibc-c3293cba95e62296f75004638ec75866fea07f9a.tar.bz2
glibc-c3293cba95e62296f75004638ec75866fea07f9a.zip
(__real_chown): Test for __ASSUME_32BITUIDS.
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/chown.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/chown.c b/sysdeps/unix/sysv/linux/s390/s390-32/chown.c
index 9f721792d7..4f9a0c01a7 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/chown.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/chown.c
@@ -55,13 +55,16 @@ extern int __libc_missing_32bit_uids;
int
__real_chown (const char *file, uid_t owner, gid_t group)
{
+#if __ASSUME_32BITUIDS > 0
+ return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group);
+#else
static int __libc_old_chown;
int result;
if (!__libc_old_chown)
{
int saved_errno = errno;
-#ifdef __NR_chown32
+# ifdef __NR_chown32
if (__libc_missing_32bit_uids <= 0)
{
int result;
@@ -74,7 +77,7 @@ __real_chown (const char *file, uid_t owner, gid_t group)
__set_errno (saved_errno);
__libc_missing_32bit_uids = 1;
}
-#endif /* __NR_chown32 */
+# endif /* __NR_chown32 */
if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U))
|| ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
{
@@ -92,6 +95,7 @@ __real_chown (const char *file, uid_t owner, gid_t group)
}
return __lchown (file, owner, group);
+#endif
}