This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] add PowerPC64 kernel-features
- From: Steve Munroe <sjmunroe at vnet dot ibm dot com>
- To: drepper at redhat dot com
- Cc: aj at suse dot de, geoffk at geoffk dot org, libc-alpha at sources dot redhat dot com, roland at frob dot com
- Date: Thu, 5 Sep 2002 13:49:03 -0500
- Subject: [PATCH] add PowerPC64 kernel-features
Ulrich Drepper writes:
> I've applied the patch now. Almost. I haven't created the powerpc64
> subdirs and the patch for kernel-features.h isn't added either.
> For kernel-features.h get rid of the nesting. Instead add &6 !defined
> __powerpc64__ to all places where PPC32 is allowed but PPC64 needs
> something changed. Then collect all other definitions in one place.
I am not clear on the last part because eliminating the "nesting" tends
to spread things out. I hope this is what you are looking for:
2002-09-05 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/unix/sysv/linux/kernel-features.h [!__powerpc64__]
(__ASSUME_TRUNCATE64_SYSCALL, __ASSUME_STAT64_SYSCALL, __ASSUME_IPC64,
__ASSUME_FCNTL64, __ASSUME_MMAP2_SYSCALL): Powerpc64 does not have
separate 64-bit syscalls.
*** libc23-cvstip-20020828/sysdeps/unix/sysv/linux/kernel-features.h Thu Aug 15 07:58:40 2002
--- libc23/sysdeps/unix/sysv/linux/kernel-features.h Thu Sep 5 13:34:09 2002
***************
*** 104,128 ****
#endif
! /* I know for sure that these are in 2.3.35 on powerpc. */
#if __LINUX_KERNEL_VERSION >= 131875 && defined __powerpc__
# define __ASSUME_TRUNCATE64_SYSCALL 1
# define __ASSUME_STAT64_SYSCALL 1
- # define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
#endif
! /* Linux 2.3.39 introduced 32bit UID/GIDs and IPC64. Some platforms had 32
bit type all along. */
#if __LINUX_KERNEL_VERSION >= 131879 || defined __powerpc__ || defined __mips__
# define __ASSUME_32BITUIDS 1
- # ifndef __powerpc__
- # define __ASSUME_IPC64 1
- # endif
- # ifdef __sparc__
- # define __ASSUME_SETRESUID_SYSCALL 1
- # endif
#endif
! /* Linux 2.4.0 on PPC introduced a correct IPC64. */
! #if __LINUX_KERNEL_VERSION >= 132096 && defined __powerpc__
# define __ASSUME_IPC64 1
#endif
--- 104,145 ----
#endif
! /* I know for sure that getrlimit are in 2.3.35 on powerpc. */
#if __LINUX_KERNEL_VERSION >= 131875 && defined __powerpc__
+ # define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
+ #endif
+
+ /* I know for sure that these are in 2.3.35 on powerpc. But PowerPC64 does not
+ support separate 64-bit syscalls, already 64-bit */
+ #if __LINUX_KERNEL_VERSION >= 131875 && defined __powerpc__ \
+ && !defined __powerpc64__
# define __ASSUME_TRUNCATE64_SYSCALL 1
# define __ASSUME_STAT64_SYSCALL 1
#endif
! /* Linux 2.3.39 introduced 32bit UID/GIDs. Some platforms had 32
bit type all along. */
#if __LINUX_KERNEL_VERSION >= 131879 || defined __powerpc__ || defined __mips__
# define __ASSUME_32BITUIDS 1
#endif
! /* Linux 2.3.39 sparc added setresuid. */
! #if __LINUX_KERNEL_VERSION >= 131879 && defined __sparc__
! # define __ASSUME_SETRESUID_SYSCALL
! #endif
!
! /* Linux 2.3.39 introduced IPC64. Except for powerpc. */
! #if __LINUX_KERNEL_VERSION >= 131879 && !defined __powerpc__
! # define __ASSUME_IPC64 1
! #endif
!
! /* mips platforms had IPC64 all along. */
! #if defined __mips__
! # define __ASSUME_IPC64 1
! #endif
!
! /* Linux 2.4.0 on PPC introduced a correct IPC64. But PowerPC64 does not
! support a separate 64-bit sys call, already 64-bit */
! #if __LINUX_KERNEL_VERSION >= 132096 && defined __powerpc__ \
! && !defined __powerpc64__
# define __ASSUME_IPC64 1
#endif
***************
*** 148,154 ****
/* Arm got fcntl64 in 2.4.4, PowerPC and SH have it also in 2.4.4 (I
! don't know when it got introduced). */
#if __LINUX_KERNEL_VERSION >= 132100 \
! && (defined __arm__ || defined __powerpc__ || defined __sh__)
# define __ASSUME_FCNTL64 1
#endif
--- 165,173 ----
/* Arm got fcntl64 in 2.4.4, PowerPC and SH have it also in 2.4.4 (I
! don't know when it got introduced). But PowerPC64 does not support
! separate FCNTL64 call, FCNTL is already 64-bit */
#if __LINUX_KERNEL_VERSION >= 132100 \
! && (defined __arm__ || defined __powerpc__ || defined __sh__) \
! && !defined __powerpc64__
# define __ASSUME_FCNTL64 1
#endif
***************
*** 178,185 ****
#endif
! /* Starting with 2.4.5 kernels PPC passes the AUXV in the standard way
! and the mmap2 syscall made it into the official kernel. */
#if __LINUX_KERNEL_VERSION >= (132096+5) && defined __powerpc__
# define __ASSUME_STD_AUXV 1
# define __ASSUME_MMAP2_SYSCALL 1
#endif
--- 197,209 ----
#endif
! /* Starting with 2.4.5 kernels PPC passes the AUXV in the standard way. */
#if __LINUX_KERNEL_VERSION >= (132096+5) && defined __powerpc__
# define __ASSUME_STD_AUXV 1
+ #endif
+
+ /* Starting with 2.4.5 kernels the mmap2 syscall made it into the official
+ kernel. But PowerPC64 does not support a separate MMAP2 call. */
+ #if __LINUX_KERNEL_VERSION >= (132096+5) && defined __powerpc__ \
+ && !defined __powerpc64__
# define __ASSUME_MMAP2_SYSCALL 1
#endif