C++程序  |  47行  |  1.33 KB

/* Generated by ./xlat/gen.sh from ./xlat/pkey_access.in; do not edit. */

#include "gcc_compat.h"
#include "static_assert.h"

#if defined(PKEY_DISABLE_ACCESS) || (defined(HAVE_DECL_PKEY_DISABLE_ACCESS) && HAVE_DECL_PKEY_DISABLE_ACCESS)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((PKEY_DISABLE_ACCESS) == (0x1), "PKEY_DISABLE_ACCESS != 0x1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define PKEY_DISABLE_ACCESS 0x1
#endif
#if defined(PKEY_DISABLE_WRITE) || (defined(HAVE_DECL_PKEY_DISABLE_WRITE) && HAVE_DECL_PKEY_DISABLE_WRITE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((PKEY_DISABLE_WRITE) == (0x2), "PKEY_DISABLE_WRITE != 0x2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define PKEY_DISABLE_WRITE 0x2
#endif
#if defined(PKEY_DISABLE_EXECUTE) || (defined(HAVE_DECL_PKEY_DISABLE_EXECUTE) && HAVE_DECL_PKEY_DISABLE_EXECUTE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((PKEY_DISABLE_EXECUTE) == (0x4), "PKEY_DISABLE_EXECUTE != 0x4");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define PKEY_DISABLE_EXECUTE 0x4
#endif

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat pkey_access in mpers mode

# else

static
const struct xlat pkey_access[] = {
 XLAT(PKEY_DISABLE_ACCESS),
 XLAT(PKEY_DISABLE_WRITE),
 XLAT(PKEY_DISABLE_EXECUTE),
 XLAT_END
};

# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */