You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
2.3 KiB
87 lines
2.3 KiB
/* Generated by ./xlat/gen.sh from ./xlat/flockcmds.in; do not edit. */
|
|
|
|
#include "gcc_compat.h"
|
|
#include "static_assert.h"
|
|
|
|
#if defined(LOCK_SH) || (defined(HAVE_DECL_LOCK_SH) && HAVE_DECL_LOCK_SH)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((LOCK_SH) == (1), "LOCK_SH != 1");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define LOCK_SH 1
|
|
#endif
|
|
#if defined(LOCK_EX) || (defined(HAVE_DECL_LOCK_EX) && HAVE_DECL_LOCK_EX)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((LOCK_EX) == (2), "LOCK_EX != 2");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define LOCK_EX 2
|
|
#endif
|
|
#if defined(LOCK_NB) || (defined(HAVE_DECL_LOCK_NB) && HAVE_DECL_LOCK_NB)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((LOCK_NB) == (4), "LOCK_NB != 4");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define LOCK_NB 4
|
|
#endif
|
|
#if defined(LOCK_UN) || (defined(HAVE_DECL_LOCK_UN) && HAVE_DECL_LOCK_UN)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((LOCK_UN) == (8), "LOCK_UN != 8");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define LOCK_UN 8
|
|
#endif
|
|
#if defined(LOCK_MAND) || (defined(HAVE_DECL_LOCK_MAND) && HAVE_DECL_LOCK_MAND)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((LOCK_MAND) == (32), "LOCK_MAND != 32");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define LOCK_MAND 32
|
|
#endif
|
|
#if defined(LOCK_RW) || (defined(HAVE_DECL_LOCK_RW) && HAVE_DECL_LOCK_RW)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((LOCK_RW) == (192), "LOCK_RW != 192");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define LOCK_RW 192
|
|
#endif
|
|
#if defined(LOCK_READ) || (defined(HAVE_DECL_LOCK_READ) && HAVE_DECL_LOCK_READ)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((LOCK_READ) == (64), "LOCK_READ != 64");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define LOCK_READ 64
|
|
#endif
|
|
#if defined(LOCK_WRITE) || (defined(HAVE_DECL_LOCK_WRITE) && HAVE_DECL_LOCK_WRITE)
|
|
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
static_assert((LOCK_WRITE) == (128), "LOCK_WRITE != 128");
|
|
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
#else
|
|
# define LOCK_WRITE 128
|
|
#endif
|
|
|
|
#ifndef XLAT_MACROS_ONLY
|
|
|
|
# ifdef IN_MPERS
|
|
|
|
# error static const struct xlat flockcmds in mpers mode
|
|
|
|
# else
|
|
|
|
static
|
|
const struct xlat flockcmds[] = {
|
|
XLAT(LOCK_SH),
|
|
XLAT(LOCK_EX),
|
|
XLAT(LOCK_NB),
|
|
XLAT(LOCK_UN),
|
|
XLAT(LOCK_MAND),
|
|
XLAT(LOCK_RW),
|
|
XLAT(LOCK_READ),
|
|
XLAT(LOCK_WRITE),
|
|
XLAT_END
|
|
};
|
|
|
|
# endif /* !IN_MPERS */
|
|
|
|
#endif /* !XLAT_MACROS_ONLY */
|