1 /* Generated by ./xlat/gen.sh from ./xlat/memfd_create_flags.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(MFD_CLOEXEC) || (defined(HAVE_DECL_MFD_CLOEXEC) && HAVE_DECL_MFD_CLOEXEC) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((MFD_CLOEXEC) == (1), "MFD_CLOEXEC != 1"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define MFD_CLOEXEC 1 12 #endif 13 #if defined(MFD_ALLOW_SEALING) || (defined(HAVE_DECL_MFD_ALLOW_SEALING) && HAVE_DECL_MFD_ALLOW_SEALING) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((MFD_ALLOW_SEALING) == (2), "MFD_ALLOW_SEALING != 2"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define MFD_ALLOW_SEALING 2 19 #endif 20 #if defined(MFD_HUGETLB) || (defined(HAVE_DECL_MFD_HUGETLB) && HAVE_DECL_MFD_HUGETLB) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((MFD_HUGETLB) == (4), "MFD_HUGETLB != 4"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define MFD_HUGETLB 4 26 #endif 27 28 #ifndef XLAT_MACROS_ONLY 29 30 # ifdef IN_MPERS 31 32 # error static const struct xlat memfd_create_flags in mpers mode 33 34 # else 35 36 static 37 const struct xlat memfd_create_flags[] = { 38 XLAT(MFD_CLOEXEC), 39 XLAT(MFD_ALLOW_SEALING), 40 XLAT(MFD_HUGETLB), 41 XLAT_END 42 }; 43 44 # endif /* !IN_MPERS */ 45 46 #endif /* !XLAT_MACROS_ONLY */ 47