1 /* Set flags signalling availability of kernel features based on given
2 kernel version number. SH version.
3 Copyright (C) 1999-2024 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 <https://www.gnu.org/licenses/>. */
20 #ifndef __KERNEL_FEATURES_SH__
21 # define __KERNEL_FEATURES_SH__
25 /* These syscalls were added for SH in 2.6.37. */
26 #define __ASSUME_CONNECT_SYSCALL 1
27 #define __ASSUME_SEND_SYSCALL 1
28 #define __ASSUME_RECV_SYSCALL 1
30 #include_next <kernel-features.h>
32 /* SH4 ABI does not really require argument alignment for 64-bits, but
33 the kernel interface for p{read,write}64 adds a dummy long argument
35 #define __ASSUME_PRW_DUMMY_ARG 1
37 /* sh only supports ipc syscall before 5.1. */
38 #if __LINUX_KERNEL_VERSION < 0x050100
39 # undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
40 # undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
42 #if __BYTE_ORDER == __BIG_ENDIAN
43 # define __ASSUME_SYSVIPC_BROKEN_MODE_T
46 /* Support for several syscalls was added in 4.8. */
47 #if __LINUX_KERNEL_VERSION < 0x040800
48 # undef __ASSUME_RENAMEAT2
49 # undef __ASSUME_EXECVEAT
50 # undef __ASSUME_MLOCK2
53 /* sh does not support the statx system call before 5.1. */
54 #if __LINUX_KERNEL_VERSION < 0x050100
55 # undef __ASSUME_STATX
58 /* sh does not provide clone3. */
59 #undef __ASSUME_CLONE3
60 #define __ASSUME_CLONE3 0