]> git.ipfire.org Git - thirdparty/util-linux.git/blob - include/audit-arch.h
po: update tr.po (from translationproject.org)
[thirdparty/util-linux.git] / include / audit-arch.h
1 /*
2 * SPDX-License-Identifier: LGPL-2.1-or-later
3 *
4 * Copyright (C) 2023 Thomas Weißschuh <thomas@t-8ch.de>
5 *
6 * This file may be distributed under the terms of the
7 * GNU Lesser General Public License.
8 */
9 #ifndef UTIL_LINUX_AUDIT_ARCH_H
10 #define UTIL_LINUX_AUDIT_ARCH_H
11
12 #if __x86_64__
13 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_X86_64
14 #elif __i386__
15 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_I386
16 #elif __arm__
17 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARM
18 #elif __aarch64__
19 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_AARCH64
20 #elif __riscv
21 # if __riscv_xlen == 32
22 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_RISCV32
23 # elif __riscv_xlen == 64
24 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_RISCV64
25 # endif
26 #elif __s390x__
27 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_S390X
28 #elif __s390__
29 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_S390
30 #elif __PPC64__
31 # if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
32 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PPC64
33 # else
34 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PPC64LE
35 # endif
36 #elif __powerpc__
37 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PPC
38 #elif __mips__
39 # if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
40 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_MIPS
41 # else
42 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_MIPSEL
43 # endif
44 #elif __arc__
45 # if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
46 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2BE
47 # else
48 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2
49 # endif
50 #elif __sparc__
51 # if __SIZEOF_POINTER__ == 4
52 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_SPARC
53 # else
54 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_SPARC64
55 # endif
56 #elif __loongarch__
57 # if __SIZEOF_POINTER__ == 4
58 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_LOONGARCH32
59 # else
60 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_LOONGARCH64
61 # endif
62 #elif __hppa__
63 # if __SIZEOF_POINTER__ == 4
64 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PARISC
65 # else
66 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PARISC64
67 # endif
68 #elif __alpha__
69 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ALPHA
70 #else
71 # error Unknown target architecture
72 #endif
73
74 #endif /* UTIL_LINUX_AUDIT_ARCH_H */