Fix __ASSUME_PREADV and __ASSUME_PWRITEV for Alpha and MicroBlaze (bug 16649).
[glibc.git] / sysdeps / unix / sysv / linux / alpha / kernel-features.h
blobf3a7a555c0b73cd5ed0ff17a760a9ffded7bd107
1 /* Set flags signalling availability of kernel features based on given
2 kernel version number.
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
28 #endif
30 /* Support for various CLOEXEC and NONBLOCK flags was added for alpha after
31 2.6.33-rc1. */
32 #if __LINUX_KERNEL_VERSION >= 0x020621
33 # define __ASSUME_SOCK_CLOEXEC 1
34 # define __ASSUME_IN_NONBLOCK 1
35 #endif
37 /* Support for the pipe2, eventfd2, signalfd4 syscalls was added for alpha
38 after 2.6.33-rc1. */
39 #if __LINUX_KERNEL_VERSION >= 0x020621
40 # define __ASSUME_PIPE2 1
41 # define __ASSUME_EVENTFD2 1
42 # define __ASSUME_SIGNALFD4 1
43 #endif
45 /* Support for recvmmsg was added for alpha in 2.6.33. */
46 #if __LINUX_KERNEL_VERSION >= 0x020621
47 # define __ASSUME_RECVMMSG_SYSCALL 1
48 #endif
50 /* Support for accept4 and sendmmsg was added for alpha in 3.2. */
51 #if __LINUX_KERNEL_VERSION >= 0x030200
52 # define __ASSUME_ACCEPT4_SYSCALL 1
53 # define __ASSUME_SENDMMSG_SYSCALL 1
54 #endif
56 #include_next <kernel-features.h>
58 #undef __ASSUME_ST_INO_64_BIT
60 /* pselect/ppoll were introduced on alpha just after 2.6.22-rc1. */
61 #if __LINUX_KERNEL_VERSION < 0x020617
62 # undef __ASSUME_PSELECT
63 # undef __ASSUME_PPOLL
64 #endif
66 /* The *at syscalls were introduced on alpha just after 2.6.22-rc1. */
67 #if __LINUX_KERNEL_VERSION < 0x020617
68 # undef __ASSUME_ATFCTS
69 #endif
71 /* Support for inter-process robust mutexes was added on alpha just
72 after 2.6.22-rc1. */
73 #if __LINUX_KERNEL_VERSION < 0x020617
74 # undef __ASSUME_SET_ROBUST_LIST
75 #endif
77 /* Support for utimensat was added on alpha after 2.6.22-rc1. */
78 #if __LINUX_KERNEL_VERSION < 0x020617
79 # undef __ASSUME_UTIMENSAT
80 #endif
82 /* Support for fallocate was added for alpha after 2.6.33-rc1. */
83 #if __LINUX_KERNEL_VERSION < 0x020621
84 # undef __ASSUME_FALLOCATE
85 #endif
87 /* There never has been support for fstat64. */
88 #undef __ASSUME_STATFS64
89 #define __ASSUME_STATFS64 0
91 /* Support for fsyncdata was added for alpha after 2.6.21. */
92 #if __LINUX_KERNEL_VERSION >= 0x020616
93 # define __ASSUME_FDATASYNC 1
94 #endif
96 /* Support for preadv and pwritev was added for alpha in 2.6.33. */
97 #if __LINUX_KERNEL_VERSION < 0x020621
98 # undef __ASSUME_PREADV
99 # undef __ASSUME_PWRITEV
100 #endif
102 #endif /* _KERNEL_FEATURES_H */