Warning: This file is not a C or C++ file. It does not have highlighting.

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.
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 <https://www.gnu.org/licenses/>. */
19
20#ifndef __KERNEL_FEATURES_SH__
21# define __KERNEL_FEATURES_SH__
22
23#include <endian.h>
24
25/* These syscalls were added for SH in 2.6.37. */
26#define __ASSUME_SOCKET_SYSCALL 1
27#define __ASSUME_BIND_SYSCALL 1
28#define __ASSUME_CONNECT_SYSCALL 1
29#define __ASSUME_LISTEN_SYSCALL 1
30#define __ASSUME_GETSOCKNAME_SYSCALL 1
31#define __ASSUME_GETPEERNAME_SYSCALL 1
32#define __ASSUME_SOCKETPAIR_SYSCALL 1
33#define __ASSUME_SEND_SYSCALL 1
34#define __ASSUME_RECV_SYSCALL 1
35#define __ASSUME_SHUTDOWN_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 before 5.1. */
45#if __LINUX_KERNEL_VERSION < 0x050100
46# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
47# undef __ASSUME_SYSVIPC_DEFAULT_IPC_64
48#endif
49#if __BYTE_ORDER == __BIG_ENDIAN
50# define __ASSUME_SYSVIPC_BROKEN_MODE_T
51#endif
52
53/* Support for several syscalls was added in 4.8. */
54#if __LINUX_KERNEL_VERSION < 0x040800
55# undef __ASSUME_RENAMEAT2
56# undef __ASSUME_EXECVEAT
57# undef __ASSUME_MLOCK2
58#endif
59
60/* sh does not support the statx system call before 5.1. */
61#if __LINUX_KERNEL_VERSION < 0x050100
62# undef __ASSUME_STATX
63#endif
64
65#endif
66

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of glibc/sysdeps/unix/sysv/linux/sh/kernel-features.h