• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/policies.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(MPOL_DEFAULT) || (defined(HAVE_DECL_MPOL_DEFAULT) && HAVE_DECL_MPOL_DEFAULT)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((MPOL_DEFAULT) == (0), "MPOL_DEFAULT != 0");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define MPOL_DEFAULT 0
12 #endif
13 #if defined(MPOL_PREFERRED) || (defined(HAVE_DECL_MPOL_PREFERRED) && HAVE_DECL_MPOL_PREFERRED)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((MPOL_PREFERRED) == (1), "MPOL_PREFERRED != 1");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define MPOL_PREFERRED 1
19 #endif
20 #if defined(MPOL_BIND) || (defined(HAVE_DECL_MPOL_BIND) && HAVE_DECL_MPOL_BIND)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((MPOL_BIND) == (2), "MPOL_BIND != 2");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define MPOL_BIND 2
26 #endif
27 #if defined(MPOL_INTERLEAVE) || (defined(HAVE_DECL_MPOL_INTERLEAVE) && HAVE_DECL_MPOL_INTERLEAVE)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((MPOL_INTERLEAVE) == (3), "MPOL_INTERLEAVE != 3");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define MPOL_INTERLEAVE 3
33 #endif
34 
35 #ifndef XLAT_MACROS_ONLY
36 
37 # ifdef IN_MPERS
38 
39 #  error static const struct xlat policies in mpers mode
40 
41 # else
42 
43 static
44 const struct xlat policies[] = {
45  XLAT(MPOL_DEFAULT),
46  XLAT(MPOL_PREFERRED),
47  XLAT(MPOL_BIND),
48  XLAT(MPOL_INTERLEAVE),
49  XLAT_END
50 };
51 
52 # endif /* !IN_MPERS */
53 
54 #endif /* !XLAT_MACROS_ONLY */
55