This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] --enable-kernel and s390-32.


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 at de dot ibm dot 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
 }
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]