]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Reduce kernel-features.h duplication.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 14 May 2014 00:45:19 +0000 (00:45 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 14 May 2014 00:45:19 +0000 (00:45 +0000)
This patch reduces duplication between different architectures'
kernel-features.h files by making the architecture-independent file
define various macros unconditionally (instead of only for a
particular list of architectures), with the architecture-specific
files then undefining the macros if necessary.

Specifically, __ASSUME_O_CLOEXEC (O_CLOEXEC flag to open) and
__ASSUME_SOCK_CLOEXEC (SOCK_NONBLOCK and SOCK_CLOEXEC flags to socket)
are supported on all architectures as of 2.6.32 or the minimum kernel
version for the architecture if later.  For __ASSUME_IN_NONBLOCK,
__ASSUME_PIPE2, __ASSUME_EVENTFD2, __ASSUME_SIGNALFD4 and
__ASSUME_DUP3, the relevant syscalls were added for alpha in 2.6.33
but otherwise the features are available as of 2.6.32.  For
__ASSUME_UTIMES, support is everywhere in 2.6.32 except for
asm-generic architectures and hppa.

Although those were the main cases of duplication among
kernel-features.h files, some other cases of unnecessary definitions
were also cleaned up: the hppa file defined various macros that were
either no longer used at all, or defined by the main file by default
anyway, the ia64 file had duplicative definitions of __ASSUME_PSELECT
and __ASSUME_PPOLL, while mips had such a definition of
__ASSUME_IPC64.

Really, rather than being defined in the main file then undefined for
asm-generic architectures, __ASSUME_UTIMES should become an
hppa-specific macro.  Given that __ASSUME_ATFCTS and
__ASSUME_UTIMENSAT are now always true, the only live __ASSUME_UTIMES
conditional is in sysdeps/unix/sysv/linux/utimes.c, which is not used
for asm-generic architectures.  I think the desired state would be an
hppa-specific file (that includes sysdeps/unix/sysv/linux/utimes.c if
__ASSUME_UTIMES, and otherwise has fallback code), with the fallback
code being removed from the main utimes.c.  But I think that's most
reasonably a separate cleanup once __ASSUME_ATFCTS and
__ASSUME_UTIMESAT have both had conditional code cleaned up.

Given this patch, I think it's straightforward to move non-ex-ports
architectures to having their own kernel-features.h files, like
ex-ports architectures, rather than conditionals in the main file
(i.e., such a move won't require the architecture-specific file to
contain anything that isn't genuinely architecture-specific), and
would encourage architecture maintainers to do so.

Tested x86_64 that the installed shared libraries are unchanged by
this patch.  Note that on some architectures this *will* cause
__ASSUME_* macros to be defined in cases where they weren't previously
but should have been (but this is just optimization, not a fix to a
user-visible bug, so doesn't need a bug report in Bugzilla).

* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES):
Define unconditionally.
(__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/aarch64/kernel-features.h
(__ASSUME_DUP3): Do not define.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_UTIMES): Undefine.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_UTIMES): Do not define.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Undefine if [__LINUX_KERNEL_VERSION <
0x020621] instead of defining if [__LINUX_KERNEL_VERSION >=
0x020621].
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
[__LINUX_KERNEL_VERSION < 0x020621] (__ASSUME_DUP3): Undefine.
* sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_UTIMES):
Do not define.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
(__ASSUME_32BITUIDS): Likewise.
(__ASSUME_TRUNCATE64_SYSCALL): Likewise.
(__ASSUME_IPC64): Likewise.
(__ASSUME_ST_INO_64_BIT): Likewise.
(__ASSUME_GETDENTS64_SYSCALL): Likewise.
[__LINUX_KERNEL_VERSION < 0x030e00] (__ASSUME_UTIMES): Undefine.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
(__ASSUME_UTIMES): Do not define.
(__ASSUME_PSELECT): Likewise.
(__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_UTIMES): 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/microblaze/kernel-features.h
(__ASSUME_UTIMES): 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/mips/kernel-features.h (__ASSUME_IPC64):
Likewise.
(__ASSUME_UTIMES): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
* sysdeps/unix/sysv/linux/tile/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.
(__ASSUME_UTIMES): Undefine.

ChangeLog
sysdeps/unix/sysv/linux/aarch64/kernel-features.h
sysdeps/unix/sysv/linux/alpha/kernel-features.h
sysdeps/unix/sysv/linux/arm/kernel-features.h
sysdeps/unix/sysv/linux/hppa/kernel-features.h
sysdeps/unix/sysv/linux/ia64/kernel-features.h
sysdeps/unix/sysv/linux/kernel-features.h
sysdeps/unix/sysv/linux/m68k/kernel-features.h
sysdeps/unix/sysv/linux/microblaze/kernel-features.h
sysdeps/unix/sysv/linux/mips/kernel-features.h
sysdeps/unix/sysv/linux/tile/kernel-features.h

index d419edc3d73a76e978d687983bb75cdb5a7be3b8..e66dafc40decca528a1e89a6ab2c7e4ba87ca9ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,89 @@
 2014-05-14  Joseph Myers  <joseph@codesourcery.com>
 
+       * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES):
+       Define unconditionally.
+       (__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/aarch64/kernel-features.h
+       (__ASSUME_DUP3): Do not define.
+       (__ASSUME_EVENTFD2): Likewise.
+       (__ASSUME_IN_NONBLOCK): Likewise.
+       (__ASSUME_O_CLOEXEC): Likewise.
+       (__ASSUME_PIPE2): Likewise.
+       (__ASSUME_SIGNALFD4): Likewise.
+       (__ASSUME_SOCK_CLOEXEC): Likewise.
+       (__ASSUME_UTIMES): Undefine.
+       * sysdeps/unix/sysv/linux/alpha/kernel-features.h
+       (__ASSUME_UTIMES): Do not define.
+       (__ASSUME_O_CLOEXEC): Likewise.
+       (__ASSUME_SOCK_CLOEXEC): Likewise.
+       (__ASSUME_IN_NONBLOCK): Undefine if [__LINUX_KERNEL_VERSION <
+       0x020621] instead of defining if [__LINUX_KERNEL_VERSION >=
+       0x020621].
+       (__ASSUME_PIPE2): Likewise.
+       (__ASSUME_EVENTFD2): Likewise.
+       (__ASSUME_SIGNALFD4): Likewise.
+       [__LINUX_KERNEL_VERSION < 0x020621] (__ASSUME_DUP3): Undefine.
+       * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_UTIMES):
+       Do not define.
+       (__ASSUME_EVENTFD2): Likewise.
+       (__ASSUME_SIGNALFD4): Likewise.
+       * sysdeps/unix/sysv/linux/hppa/kernel-features.h
+       (__ASSUME_32BITUIDS): Likewise.
+       (__ASSUME_TRUNCATE64_SYSCALL): Likewise.
+       (__ASSUME_IPC64): Likewise.
+       (__ASSUME_ST_INO_64_BIT): Likewise.
+       (__ASSUME_GETDENTS64_SYSCALL): Likewise.
+       [__LINUX_KERNEL_VERSION < 0x030e00] (__ASSUME_UTIMES): Undefine.
+       * sysdeps/unix/sysv/linux/ia64/kernel-features.h
+       (__ASSUME_UTIMES): Do not define.
+       (__ASSUME_PSELECT): Likewise.
+       (__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_UTIMES): 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/microblaze/kernel-features.h
+       (__ASSUME_UTIMES): 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/mips/kernel-features.h (__ASSUME_IPC64):
+       Likewise.
+       (__ASSUME_UTIMES): Likewise.
+       (__ASSUME_EVENTFD2): Likewise.
+       (__ASSUME_SIGNALFD4): Likewise.
+       * sysdeps/unix/sysv/linux/tile/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.
+       (__ASSUME_UTIMES): Undefine.
+
        * sysdeps/arm/fclrexcpt.c (__feclearexcept): Rename to
        feclearexcept.  Remove symbol versioning code.
        * sysdeps/arm/fegetenv.c (__fegetenv): Rename to fegetenv.  Remove
index 53039f93166e96c3ea6b65010930d1ea04515369..bd94fe1c796d440ee75bab99fedffa03d889bdef 100644 (file)
    features.  */
 
 #define __ASSUME_ACCEPT4_SYSCALL        1
-#define __ASSUME_DUP3                   1
-#define __ASSUME_EVENTFD2              1
-#define __ASSUME_IN_NONBLOCK            1
-#define __ASSUME_O_CLOEXEC              1
-#define __ASSUME_PIPE2                  1
 #define __ASSUME_RECVMMSG_SYSCALL       1
 #define __ASSUME_SENDMMSG_SYSCALL       1
-#define __ASSUME_SIGNALFD4             1
-#define __ASSUME_SOCK_CLOEXEC           1
 
 #include_next <kernel-features.h>
+
+/* asm-generic architectures do not have the utimes syscall.  */
+#undef __ASSUME_UTIMES
index 2e3fc7da39f2bc66fc82714105caa16622e119c5..bea70577f4ad587dcb09583c23234befc0b8bad2 100644 (file)
 #ifndef _KERNEL_FEATURES_H
 #define _KERNEL_FEATURES_H 1
 
-#define __ASSUME_UTIMES        1
-
-/* Support for the O_CLOEXEC flag was added for alpha in 2.6.23.  */
-#define __ASSUME_O_CLOEXEC    1
-
-/* Support for various CLOEXEC and NONBLOCK flags was added for alpha after
-   2.6.33-rc1.  */
-#if __LINUX_KERNEL_VERSION >= 0x020621
-# define __ASSUME_SOCK_CLOEXEC  1
-# define __ASSUME_IN_NONBLOCK   1
-#endif
-
-/* Support for the pipe2, eventfd2, signalfd4 syscalls was added for alpha
-   after 2.6.33-rc1.  */
-#if __LINUX_KERNEL_VERSION >= 0x020621
-# define __ASSUME_PIPE2     1
-# define __ASSUME_EVENTFD2  1
-# define __ASSUME_SIGNALFD4 1
-#endif
-
 /* Support for recvmmsg was added for alpha in 2.6.33.  */
 #if __LINUX_KERNEL_VERSION >= 0x020621
 # define __ASSUME_RECVMMSG_SYSCALL       1
 /* Support for fsyncdata was added for alpha after 2.6.21.  */
 #define __ASSUME_FDATASYNC     1
 
-/* Support for preadv and pwritev was added for alpha in 2.6.33.  */
+/* Support for various syscalls was added for alpha in 2.6.33.  */
 #if __LINUX_KERNEL_VERSION < 0x020621
 # undef __ASSUME_PREADV
 # undef __ASSUME_PWRITEV
+# undef __ASSUME_IN_NONBLOCK
+# undef __ASSUME_PIPE2
+# undef __ASSUME_EVENTFD2
+# undef __ASSUME_SIGNALFD4
+# undef __ASSUME_DUP3
 #endif
 
 #endif /* _KERNEL_FEATURES_H */
index ce0f03ed89cf849db5c6c0bb5982e607fdbf764d..354f2ca2d2e856dc91e1c6a4d37676c694b2783d 100644 (file)
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* The utimes syscall was added before 2.6.1.  */
-#define __ASSUME_UTIMES        1
-
 /* The signal frame layout changed in 2.6.18.  */
 #define __ASSUME_SIGFRAME_V2   1
 
-/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27.  */
-#define __ASSUME_EVENTFD2      1
-#define __ASSUME_SIGNALFD4     1
-
 /* Support for the recvmmsg syscall was added in 2.6.33.  */
 #if __LINUX_KERNEL_VERSION >= 0x020621
 # define __ASSUME_RECVMMSG_SYSCALL     1
index e869c14bddfb2c50905c27631ef9c23af0030cba..25c3e3660066abbc64f2cd0d0dd3d399c0e5ab1e 100644 (file)
    <http://www.gnu.org/licenses/>.  */
 
 
-/* There are an infinite number of PA-RISC kernel versions numbered
-   2.4.0.  But they've not really been released as such.  We require
-   and expect the final version here.  */
-#define __ASSUME_32BITUIDS             1
-#define __ASSUME_TRUNCATE64_SYSCALL    1
-#define __ASSUME_IPC64                 1
-#define __ASSUME_ST_INO_64_BIT         1
-#define __ASSUME_GETDENTS64_SYSCALL    1
-
 /* PA-RISC 2.6.9 kernels had the first LWS CAS support */
 #define __ASSUME_LWS_CAS               1
 
@@ -42,3 +33,8 @@
 #endif
 
 #include_next <kernel-features.h>
+
+/* hppa did not get the utimes syscall until 3.14.  */
+#if __LINUX_KERNEL_VERSION < 0x030e00
+# undef __ASSUME_UTIMES
+#endif
index 471fb88a71be8db5d9d82687a44ff3d5604732f3..c32789bcc6ff713db51eb1ab3d6713af5c1c8113 100644 (file)
 #ifndef _KERNEL_FEATURES_H
 #define _KERNEL_FEATURES_H 1
 
-/* The utimes syscall has been available for some architectures
-   forever.  */
-#define __ASSUME_UTIMES        1
-
-/* 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.  */
-#define __ASSUME_O_CLOEXEC     1
-
-/* Support for various CLOEXEC and NONBLOCK flags was added in 2.6.27.  */
-#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
 # define __ASSUME_RECVMMSG_SYSCALL     1
index 46e16f6e8287c5ff25480a7d08987bdccbd16b30..026f89fbc569334aaa5968a11652ae0821a0732b 100644 (file)
    forever.  For x86 it was introduced after 2.5.75, for x86-64,
    ppc, and ppc64 it was introduced in 2.6.0-test3, for s390 it was
    introduced in 2.6.21-rc5.  */
-#if defined __sparc__ \
-    || defined __i386__ \
-    || defined __x86_64__ \
-    || defined __powerpc__ \
-    || defined __sh__ \
-    || defined __s390__
-# define __ASSUME_UTIMES       1
-#endif
+#define __ASSUME_UTIMES        1
 
 /* 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.  */
    only after 2.6.23-rc1.  */
 #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 (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
-     || defined __sparc__ || defined __s390__)
-# define __ASSUME_O_CLOEXEC    1
-#endif
+/* Support for various CLOEXEC and NONBLOCK flags was added in
+   2.6.23.  */
+#define __ASSUME_O_CLOEXEC     1
 
 /* Support for ADJ_OFFSET_SS_READ was added in 2.6.24.  */
 #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 (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
-# define __ASSUME_EVENTFD2     1
-# define __ASSUME_SIGNALFD4    1
-# define __ASSUME_DUP3         1
-#endif
+/* Support for various CLOEXEC and NONBLOCK flags was added in
+   2.6.27.  */
+#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 accept4 functionality was added in 2.6.28, but for some
    architectures using a separate syscall rather than socketcall that
index e47fd3b22ec90449121a7479bf4ab8f675e0df0d..03bcadb285be7f973b45410502d611fd87563380 100644 (file)
 /* m68k uses socketcall.  */
 #define __ASSUME_SOCKETCALL    1
 
-/* Many syscalls were added in 2.6.10 for m68k.  */
-#define __ASSUME_UTIMES        1
-
-/* Support for various CLOEXEC and NONBLOCK flags was added 2.6.23.  */
-#define __ASSUME_O_CLOEXEC     1
-
-/* Support for various CLOEXEC and NONBLOCK flags was added in 2.6.27.  */
-#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 <kernel-features.h>
 
 /* These syscalls were added only in 3.0 for m68k.  */
index c7c8c030bd560f6c991ebbb812e8c93d8b3eb468..066c12dd4a4bc18760abfeb66b8cb175bc55e55c 100644 (file)
 /* MicroBlaze uses socketcall.  */
 #define __ASSUME_SOCKETCALL    1
 
-/* MicroBlaze glibc support starts with 2.6.30, guaranteeing many kernel features.  */
-#define __ASSUME_UTIMES         1
-#define __ASSUME_O_CLOEXEC      1
-#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 accept4 and recvmmsg syscalls was added in 2.6.33.  */
 #if __LINUX_KERNEL_VERSION >= 0x020621
 # define __ASSUME_ACCEPT4_SYSCALL        1
index a1ebf792f91cc03c0b1f7464942044cc21743c5b..b53118d7c6b7a7b6df288f1b4c3b796074eb2d00 100644 (file)
 
 #include <sgidefs.h>
 
-/* MIPS platforms had IPC64 all along.  */
-#define __ASSUME_IPC64         1
-
-/* MIPS had the utimes syscall by 2.6.0.  */
-#define __ASSUME_UTIMES                1
-
-/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27.  */
-#define __ASSUME_EVENTFD2      1
-#define __ASSUME_SIGNALFD4     1
-
 /* Support for the accept4 syscall was added in 2.6.31.  */
 #define __ASSUME_ACCEPT4_SYSCALL       1
 
index b028152d43c9f22bc777bf5b72db0b3c4c6b11dd..78aacac8cc4994f4fd9f98bb36c5dc0e7e5d6feb 100644 (file)
 
 
 /* TILE glibc support starts with 2.6.36, guaranteeing many kernel features. */
-#define __ASSUME_O_CLOEXEC             1
-#define __ASSUME_SOCK_CLOEXEC          1
-#define __ASSUME_IN_NONBLOCK           1
-#define __ASSUME_PIPE2                 1
-#define __ASSUME_EVENTFD2              1
-#define __ASSUME_SIGNALFD4             1
 #define __ASSUME_ACCEPT4_SYSCALL       1
-#define __ASSUME_DUP3                  1
 #define __ASSUME_RECVMMSG_SYSCALL      1
 
 /* Support for the sendmmsg syscall was added in 3.0.  */
@@ -35,6 +28,9 @@
 
 #include_next <kernel-features.h>
 
+/* asm-generic architectures do not have the utimes syscall.  */
+#undef __ASSUME_UTIMES
+
 /* Define this if your 32-bit syscall API requires 64-bit register
    pairs to start with an even-number register.  */
 #define __ASSUME_ALIGNED_REGISTER_PAIRS        1