alpha: fix *xstat.c build failure for Linux headers < 2.6.4
[glibc.git] / sysdeps / unix / sysv / linux / alpha / kernel-features.h
blob9c640f9849a443dce12ae4b887073784dbd83570
1 /* Set flags signalling availability of kernel features based on given
2 kernel version number.
3 Copyright (C) 2010 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, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
21 /* alpha switched to a 64-bit timeval sometime before 2.2.0. */
22 #if __LINUX_KERNEL_VERSION >= 131584
23 # define __ASSUME_TIMEVAL64 1
24 #endif
26 /* The tgkill syscall was introduced for alpha 2.6.0-test1 which unfortunately
27 cannot be distinguished from 2.6.0. */
28 #if __LINUX_KERNEL_VERSION >= 132609
29 # define __ASSUME_TGKILL 1
30 #endif
32 /* Starting with version 2.6.4, the stat64 syscalls are available. */
33 #if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__
34 # define __ASSUME_STAT64_SYSCALL 1
35 #endif
37 #define __ASSUME_UTIMES 1
39 /* Starting with version 2.6.9, SSI_IEEE_RAISE_EXCEPTION exists. */
40 #if __LINUX_KERNEL_VERSION >= 0x020609
41 # define __ASSUME_IEEE_RAISE_EXCEPTION 1
42 #endif
44 /* Support for the O_CLOEXEC flag was added for alpha in 2.6.23. */
45 #if __LINUX_KERNEL_VERSION >= 0x020617
46 # define __ASSUME_O_CLOEXEC 1
47 #endif
49 /* Support for various CLOEXEC and NONBLOCK flags was added for alpha after
50 2.6.33-rc1. */
51 #if __LINUX_KERNEL_VERSION >= 0x020621
52 # define __ASSUME_SOCK_CLOEXEC 1
53 # define __ASSUME_IN_NONBLOCK 1
54 #endif
56 /* Support for the pipe2, eventfd2, signalfd4 syscalls was added for alpha
57 after 2.6.33-rc1. */
58 #if __LINUX_KERNEL_VERSION >= 0x020621
59 # define __ASSUME_PIPE2 1
60 # define __ASSUME_EVENTFD2 1
61 # define __ASSUME_SIGNALFD4 1
62 #endif
64 /* Support for accept4 was added for alpha after 2.6.33-rc1. */
65 #if __LINUX_KERNEL_VERSION >= 0x020621
66 # define __ASSUME_ACCEPT4 1
67 #endif
69 #include_next <kernel-features.h>
71 #undef __ASSUME_ST_INO_64_BIT
73 /* pselect/ppoll were introduced on alpha just after 2.6.22-rc1. */
74 #if __LINUX_KERNEL_VERSION < 0x020617
75 # undef __ASSUME_PSELECT
76 # undef __ASSUME_PPOLL
77 #endif
79 /* The *at syscalls were introduced on alpha just after 2.6.22-rc1. */
80 #if __LINUX_KERNEL_VERSION < 0x020617
81 # undef __ASSUME_ATFCTS
82 #endif
84 /* Support for inter-process robust mutexes was added on alpha just
85 after 2.6.22-rc1. */
86 #if __LINUX_KERNEL_VERSION < 0x020617
87 # undef __ASSUME_SET_ROBUST_LIST
88 #endif
90 /* Support for utimensat was added on alpha after 2.6.22-rc1. */
91 #if __LINUX_KERNEL_VERSION < 0x020617
92 # undef __ASSUME_UTIMENSAT
93 #endif
95 /* Support for fallocate was added for alpha after 2.6.33-rc1. */
96 #if __LINUX_KERNEL_VERSION < 0x020621
97 # undef __ASSUME_FALLOCATE
98 #endif