C++程序  |  55行  |  1.71 KB

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

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

#if defined(SWAP_FLAG_PREFER) || (defined(HAVE_DECL_SWAP_FLAG_PREFER) && HAVE_DECL_SWAP_FLAG_PREFER)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((SWAP_FLAG_PREFER) == (0x8000), "SWAP_FLAG_PREFER != 0x8000");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define SWAP_FLAG_PREFER 0x8000
#endif
#if defined(SWAP_FLAG_DISCARD) || (defined(HAVE_DECL_SWAP_FLAG_DISCARD) && HAVE_DECL_SWAP_FLAG_DISCARD)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((SWAP_FLAG_DISCARD) == (0x10000), "SWAP_FLAG_DISCARD != 0x10000");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define SWAP_FLAG_DISCARD 0x10000
#endif
#if defined(SWAP_FLAG_DISCARD_ONCE) || (defined(HAVE_DECL_SWAP_FLAG_DISCARD_ONCE) && HAVE_DECL_SWAP_FLAG_DISCARD_ONCE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((SWAP_FLAG_DISCARD_ONCE) == (0x20000), "SWAP_FLAG_DISCARD_ONCE != 0x20000");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define SWAP_FLAG_DISCARD_ONCE 0x20000
#endif
#if defined(SWAP_FLAG_DISCARD_PAGES) || (defined(HAVE_DECL_SWAP_FLAG_DISCARD_PAGES) && HAVE_DECL_SWAP_FLAG_DISCARD_PAGES)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((SWAP_FLAG_DISCARD_PAGES) == (0x40000), "SWAP_FLAG_DISCARD_PAGES != 0x40000");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define SWAP_FLAG_DISCARD_PAGES 0x40000
#endif

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat swap_flags in mpers mode

# else

static
const struct xlat swap_flags[] = {
 XLAT(SWAP_FLAG_PREFER),
 XLAT(SWAP_FLAG_DISCARD),
 XLAT(SWAP_FLAG_DISCARD_ONCE),
 XLAT(SWAP_FLAG_DISCARD_PAGES),
 XLAT_END
};

# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */