Linux: Assume and consolidate socket wire-up syscall
[glibc.git] / sysdeps / unix / sysv / linux / sh / kernel-features.h
blob3b57eb7f27e7b5f0a420ecd39545eed7f15aff03
1 /* Set flags signalling availability of kernel features based on given
2 kernel version number. SH version.
3 Copyright (C) 1999-2022 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__
23 #include <endian.h>
25 /* These syscalls were added for SH in 2.6.37. */
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
35 #include_next <kernel-features.h>
37 /* SH4 ABI does not really require argument alignment for 64-bits, but
38 the kernel interface for p{read,write}64 adds a dummy long argument
39 before the offset. */
40 #define __ASSUME_PRW_DUMMY_ARG 1
42 /* sh only supports ipc syscall before 5.1. */
43 #if __LINUX_KERNEL_VERSION < 0x050100
44 # undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
45 # undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
46 #endif
47 #if __BYTE_ORDER == __BIG_ENDIAN
48 # define __ASSUME_SYSVIPC_BROKEN_MODE_T
49 #endif
51 /* Support for several syscalls was added in 4.8. */
52 #if __LINUX_KERNEL_VERSION < 0x040800
53 # undef __ASSUME_RENAMEAT2
54 # undef __ASSUME_EXECVEAT
55 # undef __ASSUME_MLOCK2
56 #endif
58 /* sh does not support the statx system call before 5.1. */
59 #if __LINUX_KERNEL_VERSION < 0x050100
60 # undef __ASSUME_STATX
61 #endif
63 #endif