1 /* Generated by ./xlat/gen.sh from ./xlat/msg_flags.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(MSG_OOB) || (defined(HAVE_DECL_MSG_OOB) && HAVE_DECL_MSG_OOB) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((MSG_OOB) == (0x1), "MSG_OOB != 0x1"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define MSG_OOB 0x1 12 #endif 13 #if defined(MSG_PEEK) || (defined(HAVE_DECL_MSG_PEEK) && HAVE_DECL_MSG_PEEK) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((MSG_PEEK) == (0x2), "MSG_PEEK != 0x2"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define MSG_PEEK 0x2 19 #endif 20 #if defined(MSG_DONTROUTE) || (defined(HAVE_DECL_MSG_DONTROUTE) && HAVE_DECL_MSG_DONTROUTE) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((MSG_DONTROUTE) == (0x4), "MSG_DONTROUTE != 0x4"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define MSG_DONTROUTE 0x4 26 #endif 27 #if defined(MSG_CTRUNC) || (defined(HAVE_DECL_MSG_CTRUNC) && HAVE_DECL_MSG_CTRUNC) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((MSG_CTRUNC) == (0x8), "MSG_CTRUNC != 0x8"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define MSG_CTRUNC 0x8 33 #endif 34 #if defined(MSG_PROBE) || (defined(HAVE_DECL_MSG_PROBE) && HAVE_DECL_MSG_PROBE) 35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36 static_assert((MSG_PROBE) == (0x10), "MSG_PROBE != 0x10"); 37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38 #else 39 # define MSG_PROBE 0x10 40 #endif 41 #if defined(MSG_TRUNC) || (defined(HAVE_DECL_MSG_TRUNC) && HAVE_DECL_MSG_TRUNC) 42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 43 static_assert((MSG_TRUNC) == (0x20), "MSG_TRUNC != 0x20"); 44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 45 #else 46 # define MSG_TRUNC 0x20 47 #endif 48 #if defined(MSG_DONTWAIT) || (defined(HAVE_DECL_MSG_DONTWAIT) && HAVE_DECL_MSG_DONTWAIT) 49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 50 static_assert((MSG_DONTWAIT) == (0x40), "MSG_DONTWAIT != 0x40"); 51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 52 #else 53 # define MSG_DONTWAIT 0x40 54 #endif 55 #if defined(MSG_EOR) || (defined(HAVE_DECL_MSG_EOR) && HAVE_DECL_MSG_EOR) 56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 57 static_assert((MSG_EOR) == (0x80), "MSG_EOR != 0x80"); 58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 59 #else 60 # define MSG_EOR 0x80 61 #endif 62 #if defined(MSG_WAITALL) || (defined(HAVE_DECL_MSG_WAITALL) && HAVE_DECL_MSG_WAITALL) 63 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 64 static_assert((MSG_WAITALL) == (0x100), "MSG_WAITALL != 0x100"); 65 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 66 #else 67 # define MSG_WAITALL 0x100 68 #endif 69 #if defined(MSG_FIN) || (defined(HAVE_DECL_MSG_FIN) && HAVE_DECL_MSG_FIN) 70 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 71 static_assert((MSG_FIN) == (0x200), "MSG_FIN != 0x200"); 72 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 73 #else 74 # define MSG_FIN 0x200 75 #endif 76 #if defined(MSG_SYN) || (defined(HAVE_DECL_MSG_SYN) && HAVE_DECL_MSG_SYN) 77 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 78 static_assert((MSG_SYN) == (0x400), "MSG_SYN != 0x400"); 79 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 80 #else 81 # define MSG_SYN 0x400 82 #endif 83 #if defined(MSG_CONFIRM) || (defined(HAVE_DECL_MSG_CONFIRM) && HAVE_DECL_MSG_CONFIRM) 84 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 85 static_assert((MSG_CONFIRM) == (0x800), "MSG_CONFIRM != 0x800"); 86 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 87 #else 88 # define MSG_CONFIRM 0x800 89 #endif 90 #if defined(MSG_RST) || (defined(HAVE_DECL_MSG_RST) && HAVE_DECL_MSG_RST) 91 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 92 static_assert((MSG_RST) == (0x1000), "MSG_RST != 0x1000"); 93 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 94 #else 95 # define MSG_RST 0x1000 96 #endif 97 #if defined(MSG_ERRQUEUE) || (defined(HAVE_DECL_MSG_ERRQUEUE) && HAVE_DECL_MSG_ERRQUEUE) 98 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 99 static_assert((MSG_ERRQUEUE) == (0x2000), "MSG_ERRQUEUE != 0x2000"); 100 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 101 #else 102 # define MSG_ERRQUEUE 0x2000 103 #endif 104 #if defined(MSG_NOSIGNAL) || (defined(HAVE_DECL_MSG_NOSIGNAL) && HAVE_DECL_MSG_NOSIGNAL) 105 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 106 static_assert((MSG_NOSIGNAL) == (0x4000), "MSG_NOSIGNAL != 0x4000"); 107 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 108 #else 109 # define MSG_NOSIGNAL 0x4000 110 #endif 111 #if defined(MSG_MORE) || (defined(HAVE_DECL_MSG_MORE) && HAVE_DECL_MSG_MORE) 112 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 113 static_assert((MSG_MORE) == (0x8000), "MSG_MORE != 0x8000"); 114 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 115 #else 116 # define MSG_MORE 0x8000 117 #endif 118 #if defined(MSG_WAITFORONE) || (defined(HAVE_DECL_MSG_WAITFORONE) && HAVE_DECL_MSG_WAITFORONE) 119 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 120 static_assert((MSG_WAITFORONE) == (0x10000), "MSG_WAITFORONE != 0x10000"); 121 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 122 #else 123 # define MSG_WAITFORONE 0x10000 124 #endif 125 #if defined(MSG_SENDPAGE_NOTLAST) || (defined(HAVE_DECL_MSG_SENDPAGE_NOTLAST) && HAVE_DECL_MSG_SENDPAGE_NOTLAST) 126 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 127 static_assert((MSG_SENDPAGE_NOTLAST) == (0x20000), "MSG_SENDPAGE_NOTLAST != 0x20000"); 128 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 129 #else 130 # define MSG_SENDPAGE_NOTLAST 0x20000 131 #endif 132 #if defined(MSG_BATCH) || (defined(HAVE_DECL_MSG_BATCH) && HAVE_DECL_MSG_BATCH) 133 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 134 static_assert((MSG_BATCH) == (0x40000), "MSG_BATCH != 0x40000"); 135 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 136 #else 137 # define MSG_BATCH 0x40000 138 #endif 139 #if defined(MSG_NO_SHARED_FRAGS) || (defined(HAVE_DECL_MSG_NO_SHARED_FRAGS) && HAVE_DECL_MSG_NO_SHARED_FRAGS) 140 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 141 static_assert((MSG_NO_SHARED_FRAGS) == (0x80000), "MSG_NO_SHARED_FRAGS != 0x80000"); 142 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 143 #else 144 # define MSG_NO_SHARED_FRAGS 0x80000 145 #endif 146 #if defined(MSG_ZEROCOPY) || (defined(HAVE_DECL_MSG_ZEROCOPY) && HAVE_DECL_MSG_ZEROCOPY) 147 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 148 static_assert((MSG_ZEROCOPY) == (0x4000000), "MSG_ZEROCOPY != 0x4000000"); 149 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 150 #else 151 # define MSG_ZEROCOPY 0x4000000 152 #endif 153 #if defined(MSG_FASTOPEN) || (defined(HAVE_DECL_MSG_FASTOPEN) && HAVE_DECL_MSG_FASTOPEN) 154 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 155 static_assert((MSG_FASTOPEN) == (0x20000000), "MSG_FASTOPEN != 0x20000000"); 156 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 157 #else 158 # define MSG_FASTOPEN 0x20000000 159 #endif 160 #if defined(MSG_CMSG_CLOEXEC) || (defined(HAVE_DECL_MSG_CMSG_CLOEXEC) && HAVE_DECL_MSG_CMSG_CLOEXEC) 161 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 162 static_assert((MSG_CMSG_CLOEXEC) == (0x40000000), "MSG_CMSG_CLOEXEC != 0x40000000"); 163 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 164 #else 165 # define MSG_CMSG_CLOEXEC 0x40000000 166 #endif 167 #ifndef STRACE_WORKAROUND_FOR_MSG_CMSG_COMPAT 168 # define STRACE_WORKAROUND_FOR_MSG_CMSG_COMPAT 169 # undef MSG_CMSG_COMPAT 170 #endif 171 #if defined(MSG_CMSG_COMPAT) || (defined(HAVE_DECL_MSG_CMSG_COMPAT) && HAVE_DECL_MSG_CMSG_COMPAT) 172 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 173 static_assert((MSG_CMSG_COMPAT) == (0x80000000), "MSG_CMSG_COMPAT != 0x80000000"); 174 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 175 #else 176 # define MSG_CMSG_COMPAT 0x80000000 177 #endif 178 179 #ifndef XLAT_MACROS_ONLY 180 181 # ifndef IN_MPERS 182 183 const struct xlat msg_flags[] = { 184 XLAT(MSG_OOB), 185 XLAT(MSG_PEEK), 186 XLAT(MSG_DONTROUTE), 187 188 XLAT(MSG_CTRUNC), 189 XLAT(MSG_PROBE), 190 XLAT(MSG_TRUNC), 191 XLAT(MSG_DONTWAIT), 192 XLAT(MSG_EOR), 193 XLAT(MSG_WAITALL), 194 XLAT(MSG_FIN), 195 XLAT(MSG_SYN), 196 XLAT(MSG_CONFIRM), 197 XLAT(MSG_RST), 198 XLAT(MSG_ERRQUEUE), 199 XLAT(MSG_NOSIGNAL), 200 XLAT(MSG_MORE), 201 XLAT(MSG_WAITFORONE), 202 XLAT(MSG_SENDPAGE_NOTLAST), 203 XLAT(MSG_BATCH), 204 XLAT(MSG_NO_SHARED_FRAGS), 205 XLAT(MSG_ZEROCOPY), 206 207 XLAT(MSG_FASTOPEN), 208 XLAT(MSG_CMSG_CLOEXEC), 209 #ifndef STRACE_WORKAROUND_FOR_MSG_CMSG_COMPAT 210 # define STRACE_WORKAROUND_FOR_MSG_CMSG_COMPAT 211 /* 212 * In Linux, the value of MSG_CMSG_COMPAT depends on CONFIG_COMPAT, 213 * and libc might want to replicate that behaviour. 214 */ 215 # undef MSG_CMSG_COMPAT 216 #endif 217 XLAT(MSG_CMSG_COMPAT), 218 XLAT_END 219 }; 220 221 # endif /* !IN_MPERS */ 222 223 #endif /* !XLAT_MACROS_ONLY */ 224