public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] --enable-kernel and s390-32.
@ 2003-02-20 14:50 Martin Schwidefsky
  2003-02-20 20:06 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Schwidefsky @ 2003-02-20 14:50 UTC (permalink / raw)
  To: libc-hacker

Hi,
s390-32 doesn't compile if --enable-kernel=2.4.20 is used.
The s390-32 version of chown always includes the fallback
to the 16 bit lchown. Patch and ChangeLog are attached.

blue skies,
  Martin.

2003-02-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* sysdeps/unix/sysv/linux/s390/s390-32/chown.c (__real_chown): Test
	for __ASSUME_32BITUIDS.

diff -urN libc/sysdeps/unix/sysv/linux/s390/s390-32/chown.c libc-s390/sysdeps/unix/sysv/linux/s390/s390-32/chown.c
--- libc/sysdeps/unix/sysv/linux/s390/s390-32/chown.c	Sat Aug  3 08:57:52 2002
+++ libc-s390/sysdeps/unix/sysv/linux/s390/s390-32/chown.c	Thu Feb 20 14:20:25 2003
@@ -55,13 +55,16 @@
 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 @@
 	  __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 @@
     }
 
   return __lchown (file, owner, group);
+#endif
 }
 
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] --enable-kernel and s390-32.
  2003-02-20 14:50 [PATCH] --enable-kernel and s390-32 Martin Schwidefsky
@ 2003-02-20 20:06 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-02-20 20:06 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: libc-hacker

Martin Schwidefsky wrote:

> s390-32 doesn't compile if --enable-kernel=2.4.20 is used.
> The s390-32 version of chown always includes the fallback
> to the 16 bit lchown. Patch and ChangeLog are attached.

I've applied the patch, thanks.

-- 
--------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-20 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-20 14:50 [PATCH] --enable-kernel and s390-32 Martin Schwidefsky
2003-02-20 20:06 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).