You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.4 KiB
55 lines
1.4 KiB
/* Generated by ./xlat/gen.sh from ./xlat/policies.in; do not edit. */
|
|
|
|
#include "gcc_compat.h"
|
|
#include "static_assert.h"
|
|
|
|
#if defined(MPOL_DEFAULT) || (defined(HAVE_DECL_MPOL_DEFAULT) && HAVE_DECL_MPOL_DEFAULT)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((MPOL_DEFAULT) == (0), "MPOL_DEFAULT != 0");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define MPOL_DEFAULT 0
|
|
#endif
|
|
#if defined(MPOL_PREFERRED) || (defined(HAVE_DECL_MPOL_PREFERRED) && HAVE_DECL_MPOL_PREFERRED)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((MPOL_PREFERRED) == (1), "MPOL_PREFERRED != 1");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define MPOL_PREFERRED 1
|
|
#endif
|
|
#if defined(MPOL_BIND) || (defined(HAVE_DECL_MPOL_BIND) && HAVE_DECL_MPOL_BIND)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((MPOL_BIND) == (2), "MPOL_BIND != 2");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define MPOL_BIND 2
|
|
#endif
|
|
#if defined(MPOL_INTERLEAVE) || (defined(HAVE_DECL_MPOL_INTERLEAVE) && HAVE_DECL_MPOL_INTERLEAVE)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((MPOL_INTERLEAVE) == (3), "MPOL_INTERLEAVE != 3");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define MPOL_INTERLEAVE 3
|
|
#endif
|
|
|
|
#ifndef XLAT_MACROS_ONLY
|
|
|
|
# ifdef IN_MPERS
|
|
|
|
# error static const struct xlat policies in mpers mode
|
|
|
|
# else
|
|
|
|
static
|
|
const struct xlat policies[] = {
|
|
XLAT(MPOL_DEFAULT),
|
|
XLAT(MPOL_PREFERRED),
|
|
XLAT(MPOL_BIND),
|
|
XLAT(MPOL_INTERLEAVE),
|
|
XLAT_END
|
|
};
|
|
|
|
# endif /* !IN_MPERS */
|
|
|
|
#endif /* !XLAT_MACROS_ONLY */
|