1 /* Set flags signalling availability of kernel features based on given
3 Copyright (C) 2010-2014 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
20 #ifndef _KERNEL_FEATURES_H
21 #define _KERNEL_FEATURES_H 1
23 #define __ASSUME_UTIMES 1
25 /* Support for the O_CLOEXEC flag was added for alpha in 2.6.23. */
26 #if __LINUX_KERNEL_VERSION >= 0x020617
27 # define __ASSUME_O_CLOEXEC 1
30 /* Support for various CLOEXEC and NONBLOCK flags was added for alpha after
32 #if __LINUX_KERNEL_VERSION >= 0x020621
33 # define __ASSUME_SOCK_CLOEXEC 1
34 # define __ASSUME_IN_NONBLOCK 1
37 /* Support for the pipe2, eventfd2, signalfd4 syscalls was added for alpha
39 #if __LINUX_KERNEL_VERSION >= 0x020621
40 # define __ASSUME_PIPE2 1
41 # define __ASSUME_EVENTFD2 1
42 # define __ASSUME_SIGNALFD4 1
45 /* Support for accept4 was added for alpha after 2.6.33-rc1. */
46 #if __LINUX_KERNEL_VERSION >= 0x020621
47 # define __ASSUME_ACCEPT4 1
50 #include_next <kernel-features.h>
52 #undef __ASSUME_ST_INO_64_BIT
54 /* pselect/ppoll were introduced on alpha just after 2.6.22-rc1. */
55 #if __LINUX_KERNEL_VERSION < 0x020617
56 # undef __ASSUME_PSELECT
57 # undef __ASSUME_PPOLL
60 /* The *at syscalls were introduced on alpha just after 2.6.22-rc1. */
61 #if __LINUX_KERNEL_VERSION < 0x020617
62 # undef __ASSUME_ATFCTS
65 /* Support for inter-process robust mutexes was added on alpha just
67 #if __LINUX_KERNEL_VERSION < 0x020617
68 # undef __ASSUME_SET_ROBUST_LIST
71 /* Support for utimensat was added on alpha after 2.6.22-rc1. */
72 #if __LINUX_KERNEL_VERSION < 0x020617
73 # undef __ASSUME_UTIMENSAT
76 /* Support for fallocate was added for alpha after 2.6.33-rc1. */
77 #if __LINUX_KERNEL_VERSION < 0x020621
78 # undef __ASSUME_FALLOCATE
81 /* There never has been support for fstat64. */
82 #undef __ASSUME_STATFS64
83 #define __ASSUME_STATFS64 0
85 /* Support for fsyncdata was added for alpha after 2.6.21. */
86 #if __LINUX_KERNEL_VERSION >= 0x020616
87 # define __ASSUME_FDATASYNC 1
90 #endif /* _KERNEL_FEATURES_H */