1 /* Generated by ./xlat/gen.sh from ./xlat/mlockall_flags.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined __alpha__ || defined __powerpc__ || defined __powerpc64__ || defined __sparc__ 7 #if defined(MCL_CURRENT) || (defined(HAVE_DECL_MCL_CURRENT) && HAVE_DECL_MCL_CURRENT) 8 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 9 static_assert((MCL_CURRENT) == (0x2000), "MCL_CURRENT != 0x2000"); 10 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 11 #else 12 # define MCL_CURRENT 0x2000 13 #endif 14 #if defined(MCL_FUTURE) || (defined(HAVE_DECL_MCL_FUTURE) && HAVE_DECL_MCL_FUTURE) 15 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 16 static_assert((MCL_FUTURE) == (0x4000), "MCL_FUTURE != 0x4000"); 17 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 18 #else 19 # define MCL_FUTURE 0x4000 20 #endif 21 #if defined(MCL_ONFAULT) || (defined(HAVE_DECL_MCL_ONFAULT) && HAVE_DECL_MCL_ONFAULT) 22 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 23 static_assert((MCL_ONFAULT) == (0x8000), "MCL_ONFAULT != 0x8000"); 24 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 25 #else 26 # define MCL_ONFAULT 0x8000 27 #endif 28 #else 29 #if defined(MCL_CURRENT) || (defined(HAVE_DECL_MCL_CURRENT) && HAVE_DECL_MCL_CURRENT) 30 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 31 static_assert((MCL_CURRENT) == (1), "MCL_CURRENT != 1"); 32 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 33 #else 34 # define MCL_CURRENT 1 35 #endif 36 #if defined(MCL_FUTURE) || (defined(HAVE_DECL_MCL_FUTURE) && HAVE_DECL_MCL_FUTURE) 37 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 38 static_assert((MCL_FUTURE) == (2), "MCL_FUTURE != 2"); 39 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 40 #else 41 # define MCL_FUTURE 2 42 #endif 43 #if defined(MCL_ONFAULT) || (defined(HAVE_DECL_MCL_ONFAULT) && HAVE_DECL_MCL_ONFAULT) 44 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 45 static_assert((MCL_ONFAULT) == (4), "MCL_ONFAULT != 4"); 46 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 47 #else 48 # define MCL_ONFAULT 4 49 #endif 50 #endif 51 52 #ifndef XLAT_MACROS_ONLY 53 54 # ifdef IN_MPERS 55 56 # error static const struct xlat mlockall_flags in mpers mode 57 58 # else 59 60 static 61 const struct xlat mlockall_flags[] = { 62 #if defined __alpha__ || defined __powerpc__ || defined __powerpc64__ || defined __sparc__ 63 XLAT(MCL_CURRENT), 64 XLAT(MCL_FUTURE), 65 XLAT(MCL_ONFAULT), 66 #else 67 XLAT(MCL_CURRENT), 68 XLAT(MCL_FUTURE), 69 XLAT(MCL_ONFAULT), 70 #endif 71 XLAT_END 72 }; 73 74 # endif /* !IN_MPERS */ 75 76 #endif /* !XLAT_MACROS_ONLY */ 77