• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/pkey_access.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(PKEY_DISABLE_ACCESS) || (defined(HAVE_DECL_PKEY_DISABLE_ACCESS) && HAVE_DECL_PKEY_DISABLE_ACCESS)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((PKEY_DISABLE_ACCESS) == (0x1), "PKEY_DISABLE_ACCESS != 0x1");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define PKEY_DISABLE_ACCESS 0x1
12 #endif
13 #if defined(PKEY_DISABLE_WRITE) || (defined(HAVE_DECL_PKEY_DISABLE_WRITE) && HAVE_DECL_PKEY_DISABLE_WRITE)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((PKEY_DISABLE_WRITE) == (0x2), "PKEY_DISABLE_WRITE != 0x2");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define PKEY_DISABLE_WRITE 0x2
19 #endif
20 #if defined(PKEY_DISABLE_EXECUTE) || (defined(HAVE_DECL_PKEY_DISABLE_EXECUTE) && HAVE_DECL_PKEY_DISABLE_EXECUTE)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((PKEY_DISABLE_EXECUTE) == (0x4), "PKEY_DISABLE_EXECUTE != 0x4");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define PKEY_DISABLE_EXECUTE 0x4
26 #endif
27 
28 #ifndef XLAT_MACROS_ONLY
29 
30 # ifdef IN_MPERS
31 
32 #  error static const struct xlat pkey_access in mpers mode
33 
34 # else
35 
36 static
37 const struct xlat pkey_access[] = {
38  XLAT(PKEY_DISABLE_ACCESS),
39  XLAT(PKEY_DISABLE_WRITE),
40  XLAT(PKEY_DISABLE_EXECUTE),
41  XLAT_END
42 };
43 
44 # endif /* !IN_MPERS */
45 
46 #endif /* !XLAT_MACROS_ONLY */
47