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