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

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

#if defined(UFFD_FEATURE_PAGEFAULT_FLAG_WP) || (defined(HAVE_DECL_UFFD_FEATURE_PAGEFAULT_FLAG_WP) && HAVE_DECL_UFFD_FEATURE_PAGEFAULT_FLAG_WP)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((UFFD_FEATURE_PAGEFAULT_FLAG_WP) == ((1<<0)), "UFFD_FEATURE_PAGEFAULT_FLAG_WP != (1<<0)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0)
#endif
#if defined(UFFD_FEATURE_EVENT_FORK) || (defined(HAVE_DECL_UFFD_FEATURE_EVENT_FORK) && HAVE_DECL_UFFD_FEATURE_EVENT_FORK)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((UFFD_FEATURE_EVENT_FORK) == ((1<<1)), "UFFD_FEATURE_EVENT_FORK != (1<<1)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define UFFD_FEATURE_EVENT_FORK (1<<1)
#endif
#if defined(UFFD_FEATURE_EVENT_REMAP) || (defined(HAVE_DECL_UFFD_FEATURE_EVENT_REMAP) && HAVE_DECL_UFFD_FEATURE_EVENT_REMAP)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((UFFD_FEATURE_EVENT_REMAP) == ((1<<2)), "UFFD_FEATURE_EVENT_REMAP != (1<<2)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define UFFD_FEATURE_EVENT_REMAP (1<<2)
#endif
#if defined(UFFD_FEATURE_EVENT_REMOVE) || (defined(HAVE_DECL_UFFD_FEATURE_EVENT_REMOVE) && HAVE_DECL_UFFD_FEATURE_EVENT_REMOVE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((UFFD_FEATURE_EVENT_REMOVE) == ((1<<3)), "UFFD_FEATURE_EVENT_REMOVE != (1<<3)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define UFFD_FEATURE_EVENT_REMOVE (1<<3)
#endif
#if defined(UFFD_FEATURE_MISSING_HUGETLBFS) || (defined(HAVE_DECL_UFFD_FEATURE_MISSING_HUGETLBFS) && HAVE_DECL_UFFD_FEATURE_MISSING_HUGETLBFS)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((UFFD_FEATURE_MISSING_HUGETLBFS) == ((1<<4)), "UFFD_FEATURE_MISSING_HUGETLBFS != (1<<4)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define UFFD_FEATURE_MISSING_HUGETLBFS (1<<4)
#endif
#if defined(UFFD_FEATURE_MISSING_SHMEM) || (defined(HAVE_DECL_UFFD_FEATURE_MISSING_SHMEM) && HAVE_DECL_UFFD_FEATURE_MISSING_SHMEM)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((UFFD_FEATURE_MISSING_SHMEM) == ((1<<5)), "UFFD_FEATURE_MISSING_SHMEM != (1<<5)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define UFFD_FEATURE_MISSING_SHMEM (1<<5)
#endif
#if defined(UFFD_FEATURE_EVENT_UNMAP) || (defined(HAVE_DECL_UFFD_FEATURE_EVENT_UNMAP) && HAVE_DECL_UFFD_FEATURE_EVENT_UNMAP)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((UFFD_FEATURE_EVENT_UNMAP) == ((1<<6)), "UFFD_FEATURE_EVENT_UNMAP != (1<<6)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define UFFD_FEATURE_EVENT_UNMAP (1<<6)
#endif
#if defined(UFFD_FEATURE_SIGBUS) || (defined(HAVE_DECL_UFFD_FEATURE_SIGBUS) && HAVE_DECL_UFFD_FEATURE_SIGBUS)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((UFFD_FEATURE_SIGBUS) == ((1<<7)), "UFFD_FEATURE_SIGBUS != (1<<7)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define UFFD_FEATURE_SIGBUS (1<<7)
#endif
#if defined(UFFD_FEATURE_THREAD_ID) || (defined(HAVE_DECL_UFFD_FEATURE_THREAD_ID) && HAVE_DECL_UFFD_FEATURE_THREAD_ID)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((UFFD_FEATURE_THREAD_ID) == ((1<<8)), "UFFD_FEATURE_THREAD_ID != (1<<8)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define UFFD_FEATURE_THREAD_ID (1<<8)
#endif

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat uffd_api_features in mpers mode

# else

static const struct xlat_data uffd_api_features_xdata[] = {
 XLAT_TYPE(uint64_t, UFFD_FEATURE_PAGEFAULT_FLAG_WP),
 #define XLAT_VAL_0 ((uint64_t) (UFFD_FEATURE_PAGEFAULT_FLAG_WP))
 #define XLAT_STR_0 STRINGIFY(UFFD_FEATURE_PAGEFAULT_FLAG_WP)
 XLAT_TYPE(uint64_t, UFFD_FEATURE_EVENT_FORK),
 #define XLAT_VAL_1 ((uint64_t) (UFFD_FEATURE_EVENT_FORK))
 #define XLAT_STR_1 STRINGIFY(UFFD_FEATURE_EVENT_FORK)
 XLAT_TYPE(uint64_t, UFFD_FEATURE_EVENT_REMAP),
 #define XLAT_VAL_2 ((uint64_t) (UFFD_FEATURE_EVENT_REMAP))
 #define XLAT_STR_2 STRINGIFY(UFFD_FEATURE_EVENT_REMAP)
 XLAT_TYPE(uint64_t, UFFD_FEATURE_EVENT_REMOVE),
 #define XLAT_VAL_3 ((uint64_t) (UFFD_FEATURE_EVENT_REMOVE))
 #define XLAT_STR_3 STRINGIFY(UFFD_FEATURE_EVENT_REMOVE)
 XLAT_TYPE(uint64_t, UFFD_FEATURE_MISSING_HUGETLBFS),
 #define XLAT_VAL_4 ((uint64_t) (UFFD_FEATURE_MISSING_HUGETLBFS))
 #define XLAT_STR_4 STRINGIFY(UFFD_FEATURE_MISSING_HUGETLBFS)
 XLAT_TYPE(uint64_t, UFFD_FEATURE_MISSING_SHMEM),
 #define XLAT_VAL_5 ((uint64_t) (UFFD_FEATURE_MISSING_SHMEM))
 #define XLAT_STR_5 STRINGIFY(UFFD_FEATURE_MISSING_SHMEM)
 XLAT_TYPE(uint64_t, UFFD_FEATURE_EVENT_UNMAP),
 #define XLAT_VAL_6 ((uint64_t) (UFFD_FEATURE_EVENT_UNMAP))
 #define XLAT_STR_6 STRINGIFY(UFFD_FEATURE_EVENT_UNMAP)
 XLAT_TYPE(uint64_t, UFFD_FEATURE_SIGBUS),
 #define XLAT_VAL_7 ((uint64_t) (UFFD_FEATURE_SIGBUS))
 #define XLAT_STR_7 STRINGIFY(UFFD_FEATURE_SIGBUS)
 XLAT_TYPE(uint64_t, UFFD_FEATURE_THREAD_ID),
 #define XLAT_VAL_8 ((uint64_t) (UFFD_FEATURE_THREAD_ID))
 #define XLAT_STR_8 STRINGIFY(UFFD_FEATURE_THREAD_ID)
};
static
const struct xlat uffd_api_features[1] = { {
 .data = uffd_api_features_xdata,
 .size = ARRAY_SIZE(uffd_api_features_xdata),
 .type = XT_NORMAL,
 .flags_mask = 0
#  ifdef XLAT_VAL_0
  | XLAT_VAL_0
#  endif
#  ifdef XLAT_VAL_1
  | XLAT_VAL_1
#  endif
#  ifdef XLAT_VAL_2
  | XLAT_VAL_2
#  endif
#  ifdef XLAT_VAL_3
  | XLAT_VAL_3
#  endif
#  ifdef XLAT_VAL_4
  | XLAT_VAL_4
#  endif
#  ifdef XLAT_VAL_5
  | XLAT_VAL_5
#  endif
#  ifdef XLAT_VAL_6
  | XLAT_VAL_6
#  endif
#  ifdef XLAT_VAL_7
  | XLAT_VAL_7
#  endif
#  ifdef XLAT_VAL_8
  | XLAT_VAL_8
#  endif
  ,
 .flags_strsz = 0
#  ifdef XLAT_STR_0
  + sizeof(XLAT_STR_0)
#  endif
#  ifdef XLAT_STR_1
  + sizeof(XLAT_STR_1)
#  endif
#  ifdef XLAT_STR_2
  + sizeof(XLAT_STR_2)
#  endif
#  ifdef XLAT_STR_3
  + sizeof(XLAT_STR_3)
#  endif
#  ifdef XLAT_STR_4
  + sizeof(XLAT_STR_4)
#  endif
#  ifdef XLAT_STR_5
  + sizeof(XLAT_STR_5)
#  endif
#  ifdef XLAT_STR_6
  + sizeof(XLAT_STR_6)
#  endif
#  ifdef XLAT_STR_7
  + sizeof(XLAT_STR_7)
#  endif
#  ifdef XLAT_STR_8
  + sizeof(XLAT_STR_8)
#  endif
  ,
} };

#  undef XLAT_STR_0
#  undef XLAT_VAL_0
#  undef XLAT_STR_1
#  undef XLAT_VAL_1
#  undef XLAT_STR_2
#  undef XLAT_VAL_2
#  undef XLAT_STR_3
#  undef XLAT_VAL_3
#  undef XLAT_STR_4
#  undef XLAT_VAL_4
#  undef XLAT_STR_5
#  undef XLAT_VAL_5
#  undef XLAT_STR_6
#  undef XLAT_VAL_6
#  undef XLAT_STR_7
#  undef XLAT_VAL_7
#  undef XLAT_STR_8
#  undef XLAT_VAL_8
# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */
