]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/sh/kernel-features.h
0f287fbf85de153613ca08fd1fb6e0a979ea216a
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / sh / kernel-features.h
1 /* Set flags signalling availability of kernel features based on given
2 kernel version number. SH version.
3 Copyright (C) 1999-2019 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
5
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.
10
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.
15
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/>. */
19
20 #ifndef __KERNEL_FEATURES_SH__
21 # define __KERNEL_FEATURES_SH__
22
23 /* These syscalls were added for SH in 2.6.37. */
24 #define __ASSUME_SOCKET_SYSCALL 1
25 #define __ASSUME_BIND_SYSCALL 1
26 #define __ASSUME_CONNECT_SYSCALL 1
27 #define __ASSUME_LISTEN_SYSCALL 1
28 #define __ASSUME_GETSOCKNAME_SYSCALL 1
29 #define __ASSUME_GETPEERNAME_SYSCALL 1
30 #define __ASSUME_SOCKETPAIR_SYSCALL 1
31 #define __ASSUME_SEND_SYSCALL 1
32 #define __ASSUME_RECV_SYSCALL 1
33 #define __ASSUME_SHUTDOWN_SYSCALL 1
34 #define __ASSUME_GETSOCKOPT_SYSCALL 1
35 #define __ASSUME_SETSOCKOPT_SYSCALL 1
36
37 #include_next <kernel-features.h>
38
39 /* SH4 ABI does not really require argument alignment for 64-bits, but
40 the kernel interface for p{read,write}64 adds a dummy long argument
41 before the offset. */
42 #define __ASSUME_PRW_DUMMY_ARG 1
43
44 /* sh only supports ipc syscall. */
45 #undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
46
47 /* Support for several syscalls was added in 4.8. */
48 #if __LINUX_KERNEL_VERSION < 0x040800
49 # undef __ASSUME_RENAMEAT2
50 # undef __ASSUME_EXECVEAT
51 # undef __ASSUME_MLOCK2
52 #endif
53
54 /* sh does not support the statx system call before 5.1. */
55 #if __LINUX_KERNEL_VERSION < 0x050100
56 # undef __ASSUME_STATX
57 #endif
58
59 #endif