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

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

#if defined(F_OK) || (defined(HAVE_DECL_F_OK) && HAVE_DECL_F_OK)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((F_OK) == (0), "F_OK != 0");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define F_OK 0
#endif
#if defined(R_OK) || (defined(HAVE_DECL_R_OK) && HAVE_DECL_R_OK)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((R_OK) == (4), "R_OK != 4");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define R_OK 4
#endif
#if defined(W_OK) || (defined(HAVE_DECL_W_OK) && HAVE_DECL_W_OK)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((W_OK) == (2), "W_OK != 2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define W_OK 2
#endif
#if defined(X_OK) || (defined(HAVE_DECL_X_OK) && HAVE_DECL_X_OK)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((X_OK) == (1), "X_OK != 1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define X_OK 1
#endif
#undef XLAT_PREV_VAL

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat access_modes in mpers mode

# else

DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
static const struct xlat_data access_modes_xdata[] = {
 XLAT(F_OK),
 #define XLAT_VAL_0 ((unsigned) (F_OK))
 #define XLAT_STR_0 STRINGIFY(F_OK)
 XLAT(R_OK),
 #define XLAT_VAL_1 ((unsigned) (R_OK))
 #define XLAT_STR_1 STRINGIFY(R_OK)
 XLAT(W_OK),
 #define XLAT_VAL_2 ((unsigned) (W_OK))
 #define XLAT_STR_2 STRINGIFY(W_OK)
 XLAT(X_OK),
 #define XLAT_VAL_3 ((unsigned) (X_OK))
 #define XLAT_STR_3 STRINGIFY(X_OK)
};
static
const struct xlat access_modes[1] = { {
 .data = access_modes_xdata,
 .size = ARRAY_SIZE(access_modes_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
  ,
 .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
  ,
} };
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
# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */
