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