From patchwork Wed Apr 30 16:34:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 763 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id 76060360072 for ; Wed, 30 Apr 2014 09:35:17 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 303CE148C164; Wed, 30 Apr 2014 09:35:17 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 0113F148689D for ; Wed, 30 Apr 2014 09:35:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=m2JvOkoMBa7zMZk+fdl0pdIpa5w2h OO39PUkQtTNDgnltT3GEldr7FYzcyY4Q3mkBSuOrIKsoWHWRDmaupQ66sZkypEqu fbq/fiRhkR9yN2okwNWJITaUP+f/MAlS4ubkX0mDZox+GDHqOswokgj7t3U+omYc w0ZuA+UWBsNFUY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=h6eG+d16W9DG8lvfNNwwum7sxw4=; b=gej heOG93qbb2dQk0U5/6g5cEL/yHOMJ5ThXTKahcCZI1tIHkLY1ptXGKDSfu9DK2UO vsQUUSBeF7QKdUNtYJES+9lN4ZD8eGuAIQ+bUCH+BwX6thvY/yl+3M0dTZGbg93i lU1KRnj0AtkH45mKxZ5jhZPUKQSBwskCcr8ykHbg= Received: (qmail 15769 invoked by alias); 30 Apr 2014 16:35:05 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 15705 invoked by uid 89); 30 Apr 2014 16:35:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Wed, 30 Apr 2014 16:34:55 +0000 From: "Joseph S. Myers" To: Subject: Clean up kernel version conditionals for pre-2.6.32 kernels Message-ID: MIME-Version: 1.0 X-DH-Original-To: glibc@patchwork.siddhesh.in This patch does some initial cleanup, following the move to 2.6.32 minimum kernel version, by removing __LINUX_KERNEL_VERSION conditionals that are now always-true or always-false. In the case of __ASSUME_ARG_MAX_STACK_BASED, where the conditional used a kernel version that was itself in a macro, the associated sysconf.c code is also cleaned up and __ASSUME_ARG_MAX_STACK_BASED removed completely. Tested x86_64 that disassembly of installed shared libraries is unchanged by the patch. 2014-04-30 Joseph Myers * sysdeps/unix/sysv/linux/kernel-features.h [__s390__] (__ASSUME_UTIMES): Do not condition on kernel version. (__ASSUME_PSELECT): Define unconditionally. (__ASSUME_PPOLL): Likewise. (__ASSUME_ATFCTS): Likewise. (__ASSUME_SET_ROBUST_LIST): Do not condition on kernel version. (__ASSUME_COMPLETE_READV_WRITEV): Define unconditionally. (__ASSUME_FUTEX_LOCK_PI): Do not condition on kernel version. (__ASSUME_UTIMENSAT): Define unconditionally. (__ASSUME_PRIVATE_FUTEX): Likewise. (__ASSUME_FALLOCATE): Likewise. (__ASSUME_O_CLOEXEC): Likewise. (__LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL): Remove. (__ASSUME_ARG_MAX_STACK_BASED): Likewise. (__ASSUME_ADJ_OFFSET_SS_READ): Define unconditionally. (__ASSUME_SOCK_CLOEXEC): Do not condition on kernel version. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. [__x86_64__ || __sparc__] (__ASSUME_ACCEPT4_SYSCALL): Likewise. (__ASSUME_FUTEX_CLOCK_REALTIME): Define unconditionally. (__ASSUME_AT_RANDOM): Likewise. (__ASSUME_PREADV): Likewise. (__ASSUME_PWRITEV): Likewise. (__ASSUME_REQUEUE_PI): Do not condition on kernel version. (__ASSUME_F_GETOWN_EX): Define unconditionally. (__ASSUME_XFS_RESTRICTED_CHOWN): Likewise. * sysdeps/unix/sysv/linux/sysconf.c (__sysconf) [!__ASSUME_ARG_MAX_STACK_BASED]: Remove conditional code. * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_O_CLOEXEC): Define unconditionally. (__ASSUME_PSELECT): Do not undefine conditionally. (__ASSUME_PPOLL): Likewise. (__ASSUME_ATFCTS): Likewise. (__ASSUME_SET_ROBUST_LIST): Likewise. (__ASSUME_UTIMENSAT): Likewise. (__ASSUME_FDATASYNC): Define unconditionally. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_SIGFRAME_V2): Likewise. )__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_PSELECT): Do not undefine conditionally. (__ASSUME_PPOLL): Likewise. * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_PSELECT): Define unconditionally. (__ASSUME_PPOLL): Likewise. (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_O_CLOEXEC): Likewise. (__ASSUME_SOCK_CLOEXEC): Likewise. (__ASSUME_IN_NONBLOCK): Likewise. (__ASSUME_PIPE2): Likewise. (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_DUP3): Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_EVENTFD2): Likewise. (__ASSUME_SIGNALFD4): Likewise. (__ASSUME_ACCEPT4_SYSCALL): Likewise. diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h index f3a7a55..2e3fc7d 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -23,9 +23,7 @@ #define __ASSUME_UTIMES 1 /* Support for the O_CLOEXEC flag was added for alpha in 2.6.23. */ -#if __LINUX_KERNEL_VERSION >= 0x020617 -# define __ASSUME_O_CLOEXEC 1 -#endif +#define __ASSUME_O_CLOEXEC 1 /* Support for various CLOEXEC and NONBLOCK flags was added for alpha after 2.6.33-rc1. */ @@ -57,28 +55,6 @@ #undef __ASSUME_ST_INO_64_BIT -/* pselect/ppoll were introduced on alpha just after 2.6.22-rc1. */ -#if __LINUX_KERNEL_VERSION < 0x020617 -# undef __ASSUME_PSELECT -# undef __ASSUME_PPOLL -#endif - -/* The *at syscalls were introduced on alpha just after 2.6.22-rc1. */ -#if __LINUX_KERNEL_VERSION < 0x020617 -# undef __ASSUME_ATFCTS -#endif - -/* Support for inter-process robust mutexes was added on alpha just - after 2.6.22-rc1. */ -#if __LINUX_KERNEL_VERSION < 0x020617 -# undef __ASSUME_SET_ROBUST_LIST -#endif - -/* Support for utimensat was added on alpha after 2.6.22-rc1. */ -#if __LINUX_KERNEL_VERSION < 0x020617 -# undef __ASSUME_UTIMENSAT -#endif - /* Support for fallocate was added for alpha after 2.6.33-rc1. */ #if __LINUX_KERNEL_VERSION < 0x020621 # undef __ASSUME_FALLOCATE @@ -89,9 +65,7 @@ #define __ASSUME_STATFS64 0 /* Support for fsyncdata was added for alpha after 2.6.21. */ -#if __LINUX_KERNEL_VERSION >= 0x020616 -# define __ASSUME_FDATASYNC 1 -#endif +#define __ASSUME_FDATASYNC 1 /* Support for preadv and pwritev was added for alpha in 2.6.33. */ #if __LINUX_KERNEL_VERSION < 0x020621 diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 96b7350..ce0f03e 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -21,15 +21,11 @@ #define __ASSUME_UTIMES 1 /* The signal frame layout changed in 2.6.18. */ -#if __LINUX_KERNEL_VERSION >= 132626 -# define __ASSUME_SIGFRAME_V2 1 -#endif +#define __ASSUME_SIGFRAME_V2 1 /* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */ -#if __LINUX_KERNEL_VERSION >= 0x02061b -# define __ASSUME_EVENTFD2 1 -# define __ASSUME_SIGNALFD4 1 -#endif +#define __ASSUME_EVENTFD2 1 +#define __ASSUME_SIGNALFD4 1 /* Support for the recvmmsg syscall was added in 2.6.33. */ #if __LINUX_KERNEL_VERSION >= 0x020621 @@ -48,12 +44,6 @@ #include_next -/* Support for pselect6, ppoll and epoll_pwait was added in 2.6.32. */ -#if __LINUX_KERNEL_VERSION < 0x020620 -# undef __ASSUME_PSELECT -# undef __ASSUME_PPOLL -#endif - /* The ARM kernel may or may not support futex_atomic_cmpxchg_inatomic, depending on kernel configuration. */ diff --git a/sysdeps/unix/sysv/linux/ia64/kernel-features.h b/sysdeps/unix/sysv/linux/ia64/kernel-features.h index dd4de39..471fb88 100644 --- a/sysdeps/unix/sysv/linux/ia64/kernel-features.h +++ b/sysdeps/unix/sysv/linux/ia64/kernel-features.h @@ -24,28 +24,20 @@ forever. */ #define __ASSUME_UTIMES 1 -/* pselect/ppoll were introduced just after 2.6.16-rc1. Due to the way - the kernel versions are advertised we can only rely on 2.6.17 to have - the code. */ -#if __LINUX_KERNEL_VERSION >= 0x020616 -# define __ASSUME_PSELECT 1 -# define __ASSUME_PPOLL 1 -#endif +/* pselect/ppoll were introduced just after 2.6.16-rc1. */ +#define __ASSUME_PSELECT 1 +#define __ASSUME_PPOLL 1 /* Support for various CLOEXEC and NONBLOCK flags was added in 2.6.23. */ -#if __LINUX_KERNEL_VERSION >= 0x020617 -# define __ASSUME_O_CLOEXEC 1 -#endif +#define __ASSUME_O_CLOEXEC 1 /* Support for various CLOEXEC and NONBLOCK flags was added in 2.6.27. */ -#if __LINUX_KERNEL_VERSION >= 0x02061b -# define __ASSUME_SOCK_CLOEXEC 1 -# define __ASSUME_IN_NONBLOCK 1 -# define __ASSUME_PIPE2 1 -# define __ASSUME_EVENTFD2 1 -# define __ASSUME_SIGNALFD4 1 -# define __ASSUME_DUP3 1 -#endif +#define __ASSUME_SOCK_CLOEXEC 1 +#define __ASSUME_IN_NONBLOCK 1 +#define __ASSUME_PIPE2 1 +#define __ASSUME_EVENTFD2 1 +#define __ASSUME_SIGNALFD4 1 +#define __ASSUME_DUP3 1 /* Support for the recvmmsg syscall was added in 2.6.33. */ #if __LINUX_KERNEL_VERSION >= 0x020621 diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index db6af35..46e16f6 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -81,98 +81,62 @@ || defined __x86_64__ \ || defined __powerpc__ \ || defined __sh__ \ - || (defined __s390__ && __LINUX_KERNEL_VERSION >= 0x020616) + || defined __s390__ # define __ASSUME_UTIMES 1 #endif -/* pselect/ppoll were introduced just after 2.6.16-rc1. Due to the way - the kernel versions are advertised we can only rely on 2.6.17 to have - the code. On x86_64 and SH this appeared first in 2.6.19-rc1, - on ia64 in 2.6.22-rc1. */ -#if __LINUX_KERNEL_VERSION >= 0x020611 \ - && ((!defined __x86_64__ && !defined __sh__) \ - || (__LINUX_KERNEL_VERSION >= 0x020613 \ - && (defined __x86_64__ || defined __sh__))) -# define __ASSUME_PSELECT 1 -# define __ASSUME_PPOLL 1 -#endif +/* pselect/ppoll were introduced just after 2.6.16-rc1. On x86_64 and + SH this appeared first in 2.6.19-rc1, on ia64 in 2.6.22-rc1. */ +#define __ASSUME_PSELECT 1 +#define __ASSUME_PPOLL 1 -/* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the - kernel versions are advertised we can only rely on 2.6.17 to have - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ -#if __LINUX_KERNEL_VERSION >= 0x020611 \ - && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -# define __ASSUME_ATFCTS 1 -#endif +/* The *at syscalls were introduced just after 2.6.16-rc1. On PPC + they were introduced in 2.6.17-rc1, on SH in 2.6.19-rc1. */ +#define __ASSUME_ATFCTS 1 /* Support for inter-process robust mutexes was added in 2.6.17 (but some architectures lack futex_atomic_cmpxchg_inatomic in some configurations). */ -#if __LINUX_KERNEL_VERSION >= 0x020611 \ - && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ - && !(defined __sparc__ && !defined __arch64__ && !defined __sparc_v9__) +#if !(defined __sparc__ && !defined __arch64__ && !defined __sparc_v9__) # define __ASSUME_SET_ROBUST_LIST 1 #endif /* Pessimistically assume that 2.6.18 introduced real handling of large numbers of requests to readv and writev and that we don't need a fallback. It likely worked for much longer. */ -#if __LINUX_KERNEL_VERSION >= 0x020612 -# define __ASSUME_COMPLETE_READV_WRITEV 1 -#endif +#define __ASSUME_COMPLETE_READV_WRITEV 1 /* Support for PI futexes was added in 2.6.18 (but some architectures lack futex_atomic_cmpxchg_inatomic in some configurations). */ -#if __LINUX_KERNEL_VERSION >= 0x020612 \ - && !(defined __sparc__ && !defined __arch64__ && !defined __sparc_v9__) +#if !(defined __sparc__ && !defined __arch64__ && !defined __sparc_v9__) # define __ASSUME_FUTEX_LOCK_PI 1 #endif /* Support for utimensat syscall was added in 2.6.22, on SH only after 2.6.22-rc1. */ -#if __LINUX_KERNEL_VERSION >= 0x020616 \ - && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020617) -# define __ASSUME_UTIMENSAT 1 -#endif +#define __ASSUME_UTIMENSAT 1 /* Support for private futexes was added in 2.6.22. */ -#if __LINUX_KERNEL_VERSION >= 0x020616 -# define __ASSUME_PRIVATE_FUTEX 1 -#endif +#define __ASSUME_PRIVATE_FUTEX 1 /* Support for fallocate was added in 2.6.23, on s390 only after 2.6.23-rc1. */ -#if __LINUX_KERNEL_VERSION >= 0x020617 \ - && (!defined __s390__ || __LINUX_KERNEL_VERSION >= 0x020618) -# define __ASSUME_FALLOCATE 1 -#endif +#define __ASSUME_FALLOCATE 1 /* Support for various CLOEXEC and NONBLOCK flags was added for x86, x86-64, PPC, IA-64, SPARC< and S390 in 2.6.23. */ -#if __LINUX_KERNEL_VERSION >= 0x020617 \ - && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ - || defined __sparc__ || defined __s390__) +#if (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ + || defined __sparc__ || defined __s390__) # define __ASSUME_O_CLOEXEC 1 #endif -/* From 2.6.23 onwards the value of ARG_MAX depends on the stack - size. */ -#define __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL 0x020617 -#if __LINUX_KERNEL_VERSION >= __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL -# define __ASSUME_ARG_MAX_STACK_BASED 1 -#endif - /* Support for ADJ_OFFSET_SS_READ was added in 2.6.24. */ -#if __LINUX_KERNEL_VERSION >= 0x020618 -# define __ASSUME_ADJ_OFFSET_SS_READ 1 -#endif +#define __ASSUME_ADJ_OFFSET_SS_READ 1 /* Support for various CLOEXEC and NONBLOCK flags was added for x86, x86-64, PPC, IA-64, and SPARC in 2.6.27. */ -#if __LINUX_KERNEL_VERSION >= 0x02061b \ - && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ - || defined __sparc__ || defined __s390__) +#if (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ + || defined __sparc__ || defined __s390__) # define __ASSUME_SOCK_CLOEXEC 1 # define __ASSUME_IN_NONBLOCK 1 # define __ASSUME_PIPE2 1 @@ -192,14 +156,13 @@ available through a separate syscall at the same time as through socketcall, and __ASSUME_ACCEPT4 if the accept4 function is known to work. */ -#if __LINUX_KERNEL_VERSION >= 0x02061c && defined __ASSUME_SOCKETCALL +#ifdef __ASSUME_SOCKETCALL # define __ASSUME_ACCEPT4_SOCKETCALL 1 #endif /* The accept4 syscall was added for x86_64 and SPARC in 2.6.28, and for PowerPC and SH in 2.6.37. */ -#if (__LINUX_KERNEL_VERSION >= 0x02061c \ - && (defined __x86_64__ || defined __sparc__)) \ +#if (defined __x86_64__ || defined __sparc__) \ || (__LINUX_KERNEL_VERSION >= 0x020625 \ && (defined __powerpc__ || defined __sh__)) # define __ASSUME_ACCEPT4_SYSCALL 1 @@ -213,33 +176,24 @@ #endif /* Support for the FUTEX_CLOCK_REALTIME flag was added in 2.6.29. */ -#if __LINUX_KERNEL_VERSION >= 0x02061d -# define __ASSUME_FUTEX_CLOCK_REALTIME 1 -#endif +#define __ASSUME_FUTEX_CLOCK_REALTIME 1 /* Support for the AT_RANDOM auxiliary vector entry was added in 2.6.29. */ -#if __LINUX_KERNEL_VERSION >= 0x02061d -# define __ASSUME_AT_RANDOM 1 -#endif +#define __ASSUME_AT_RANDOM 1 /* Support for preadv and pwritev was added in 2.6.30. */ -#if __LINUX_KERNEL_VERSION >= 0x02061e -# define __ASSUME_PREADV 1 -# define __ASSUME_PWRITEV 1 -#endif +#define __ASSUME_PREADV 1 +#define __ASSUME_PWRITEV 1 /* Support for FUTEX_*_REQUEUE_PI was added in 2.6.31 (but some architectures lack futex_atomic_cmpxchg_inatomic in some configurations). */ -#if __LINUX_KERNEL_VERSION >= 0x02061f \ - && !(defined __sparc__ && !defined __arch64__ && !defined __sparc_v9__) +#if !(defined __sparc__ && !defined __arch64__ && !defined __sparc_v9__) # define __ASSUME_REQUEUE_PI 1 #endif /* Support for F_GETOWN_EX was introduced in 2.6.32. */ -#if __LINUX_KERNEL_VERSION >= 0x020620 -# define __ASSUME_F_GETOWN_EX 1 -#endif +#define __ASSUME_F_GETOWN_EX 1 /* Support for recvmmsg functionality was added in 2.6.33. The macros defined correspond to those for accept4. */ @@ -308,6 +262,4 @@ /* 2.6.29 removed the XFS restricted_chown sysctl, so it is pointless looking for it in newer kernels. */ -#if __LINUX_KERNEL_VERSION >= 0x02061d -# define __ASSUME_XFS_RESTRICTED_CHOWN 1 -#endif +#define __ASSUME_XFS_RESTRICTED_CHOWN 1 diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index bc340bd..e47fd3b 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -24,19 +24,15 @@ #define __ASSUME_UTIMES 1 /* Support for various CLOEXEC and NONBLOCK flags was added 2.6.23. */ -#if __LINUX_KERNEL_VERSION >= 0x020617 -# define __ASSUME_O_CLOEXEC 1 -#endif +#define __ASSUME_O_CLOEXEC 1 /* Support for various CLOEXEC and NONBLOCK flags was added in 2.6.27. */ -#if __LINUX_KERNEL_VERSION >= 0x02061b -# define __ASSUME_SOCK_CLOEXEC 1 -# define __ASSUME_IN_NONBLOCK 1 -# define __ASSUME_PIPE2 1 -# define __ASSUME_EVENTFD2 1 -# define __ASSUME_SIGNALFD4 1 -# define __ASSUME_DUP3 1 -#endif +#define __ASSUME_SOCK_CLOEXEC 1 +#define __ASSUME_IN_NONBLOCK 1 +#define __ASSUME_PIPE2 1 +#define __ASSUME_EVENTFD2 1 +#define __ASSUME_SIGNALFD4 1 +#define __ASSUME_DUP3 1 #include_next diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h index 19d3cba..a1ebf79 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -26,15 +26,11 @@ #define __ASSUME_UTIMES 1 /* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */ -#if __LINUX_KERNEL_VERSION >= 0x02061c -# define __ASSUME_EVENTFD2 1 -# define __ASSUME_SIGNALFD4 1 -#endif +#define __ASSUME_EVENTFD2 1 +#define __ASSUME_SIGNALFD4 1 /* Support for the accept4 syscall was added in 2.6.31. */ -#if __LINUX_KERNEL_VERSION >= 0x02061f -# define __ASSUME_ACCEPT4_SYSCALL 1 -#endif +#define __ASSUME_ACCEPT4_SYSCALL 1 /* Support for the recvmmsg syscall was added in 2.6.33. */ #if __LINUX_KERNEL_VERSION >= 0x020621 diff --git a/sysdeps/unix/sysv/linux/sysconf.c b/sysdeps/unix/sysv/linux/sysconf.c index e3e2fba..25208cd 100644 --- a/sysdeps/unix/sysv/linux/sysconf.c +++ b/sysdeps/unix/sysv/linux/sysconf.c @@ -88,15 +88,9 @@ __sysconf (int name) return HAS_CPUCLOCK (name); case _SC_ARG_MAX: -#if !__ASSUME_ARG_MAX_STACK_BASED - /* Determine whether this is a kernel with an argument limit - determined by the stack size. */ - if (GLRO(dl_discover_osversion) () - >= __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL) -#endif - /* Use getrlimit to get the stack limit. */ - if (__getrlimit (RLIMIT_STACK, &rlimit) == 0) - return MAX (legacy_ARG_MAX, rlimit.rlim_cur / 4); + /* Use getrlimit to get the stack limit. */ + if (__getrlimit (RLIMIT_STACK, &rlimit) == 0) + return MAX (legacy_ARG_MAX, rlimit.rlim_cur / 4); return legacy_ARG_MAX;