C++程序  |  47行  |  1.27 KB

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

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

#if defined(FIEMAP_FLAG_SYNC) || (defined(HAVE_DECL_FIEMAP_FLAG_SYNC) && HAVE_DECL_FIEMAP_FLAG_SYNC)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((FIEMAP_FLAG_SYNC) == (1), "FIEMAP_FLAG_SYNC != 1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define FIEMAP_FLAG_SYNC 1
#endif
#if defined(FIEMAP_FLAG_XATTR) || (defined(HAVE_DECL_FIEMAP_FLAG_XATTR) && HAVE_DECL_FIEMAP_FLAG_XATTR)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((FIEMAP_FLAG_XATTR) == (2), "FIEMAP_FLAG_XATTR != 2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define FIEMAP_FLAG_XATTR 2
#endif
#if defined(FIEMAP_FLAG_CACHE) || (defined(HAVE_DECL_FIEMAP_FLAG_CACHE) && HAVE_DECL_FIEMAP_FLAG_CACHE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((FIEMAP_FLAG_CACHE) == (4), "FIEMAP_FLAG_CACHE != 4");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define FIEMAP_FLAG_CACHE 4
#endif

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat fiemap_flags in mpers mode

# else

static
const struct xlat fiemap_flags[] = {
 XLAT(FIEMAP_FLAG_SYNC),
 XLAT(FIEMAP_FLAG_XATTR),
 XLAT(FIEMAP_FLAG_CACHE),
 XLAT_END
};

# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */