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

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

#if defined(SG_FLAG_DIRECT_IO) || (defined(HAVE_DECL_SG_FLAG_DIRECT_IO) && HAVE_DECL_SG_FLAG_DIRECT_IO)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((SG_FLAG_DIRECT_IO) == (1), "SG_FLAG_DIRECT_IO != 1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define SG_FLAG_DIRECT_IO 1
#endif
#if defined(SG_FLAG_UNUSED_LUN_INHIBIT) || (defined(HAVE_DECL_SG_FLAG_UNUSED_LUN_INHIBIT) && HAVE_DECL_SG_FLAG_UNUSED_LUN_INHIBIT)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((SG_FLAG_UNUSED_LUN_INHIBIT) == (2), "SG_FLAG_UNUSED_LUN_INHIBIT != 2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define SG_FLAG_UNUSED_LUN_INHIBIT 2
#endif
#if defined(SG_FLAG_MMAP_IO) || (defined(HAVE_DECL_SG_FLAG_MMAP_IO) && HAVE_DECL_SG_FLAG_MMAP_IO)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((SG_FLAG_MMAP_IO) == (4), "SG_FLAG_MMAP_IO != 4");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define SG_FLAG_MMAP_IO 4
#endif
#if defined(SG_FLAG_NO_DXFER) || (defined(HAVE_DECL_SG_FLAG_NO_DXFER) && HAVE_DECL_SG_FLAG_NO_DXFER)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((SG_FLAG_NO_DXFER) == (0x10000), "SG_FLAG_NO_DXFER != 0x10000");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define SG_FLAG_NO_DXFER 0x10000
#endif
#if defined(SG_FLAG_Q_AT_TAIL) || (defined(HAVE_DECL_SG_FLAG_Q_AT_TAIL) && HAVE_DECL_SG_FLAG_Q_AT_TAIL)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((SG_FLAG_Q_AT_TAIL) == (0x10), "SG_FLAG_Q_AT_TAIL != 0x10");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define SG_FLAG_Q_AT_TAIL 0x10
#endif
#if defined(SG_FLAG_Q_AT_HEAD) || (defined(HAVE_DECL_SG_FLAG_Q_AT_HEAD) && HAVE_DECL_SG_FLAG_Q_AT_HEAD)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((SG_FLAG_Q_AT_HEAD) == (0x20), "SG_FLAG_Q_AT_HEAD != 0x20");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define SG_FLAG_Q_AT_HEAD 0x20
#endif
#undef XLAT_PREV_VAL

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

extern const struct xlat sg_io_flags[];

# else

DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
static const struct xlat_data sg_io_flags_xdata[] = {
 XLAT(SG_FLAG_DIRECT_IO),
 #define XLAT_VAL_0 ((unsigned) (SG_FLAG_DIRECT_IO))
 #define XLAT_STR_0 STRINGIFY(SG_FLAG_DIRECT_IO)
 XLAT(SG_FLAG_UNUSED_LUN_INHIBIT),
 #define XLAT_VAL_1 ((unsigned) (SG_FLAG_UNUSED_LUN_INHIBIT))
 #define XLAT_STR_1 STRINGIFY(SG_FLAG_UNUSED_LUN_INHIBIT)
 XLAT(SG_FLAG_MMAP_IO),
 #define XLAT_VAL_2 ((unsigned) (SG_FLAG_MMAP_IO))
 #define XLAT_STR_2 STRINGIFY(SG_FLAG_MMAP_IO)
 XLAT(SG_FLAG_NO_DXFER),
 #define XLAT_VAL_3 ((unsigned) (SG_FLAG_NO_DXFER))
 #define XLAT_STR_3 STRINGIFY(SG_FLAG_NO_DXFER)
 XLAT(SG_FLAG_Q_AT_TAIL),
 #define XLAT_VAL_4 ((unsigned) (SG_FLAG_Q_AT_TAIL))
 #define XLAT_STR_4 STRINGIFY(SG_FLAG_Q_AT_TAIL)
 XLAT(SG_FLAG_Q_AT_HEAD),
 #define XLAT_VAL_5 ((unsigned) (SG_FLAG_Q_AT_HEAD))
 #define XLAT_STR_5 STRINGIFY(SG_FLAG_Q_AT_HEAD)
};
#  if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
static
#  endif
const struct xlat sg_io_flags[1] = { {
 .data = sg_io_flags_xdata,
 .size = ARRAY_SIZE(sg_io_flags_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
  ,
 .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
  ,
} };
DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE

#  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
# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */
