• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/open_mode_flags.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined __hppa__ || defined __mips__
7 #if defined(O_CREAT) || (defined(HAVE_DECL_O_CREAT) && HAVE_DECL_O_CREAT)
8 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
9 static_assert((O_CREAT) == (0400), "O_CREAT != 0400");
10 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
11 #else
12 # define O_CREAT 0400
13 #endif
14 #elif defined __alpha__ || defined __sparc__
15 #if defined(O_CREAT) || (defined(HAVE_DECL_O_CREAT) && HAVE_DECL_O_CREAT)
16 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
17 static_assert((O_CREAT) == (01000), "O_CREAT != 01000");
18 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
19 #else
20 # define O_CREAT 01000
21 #endif
22 #else
23 #if defined(O_CREAT) || (defined(HAVE_DECL_O_CREAT) && HAVE_DECL_O_CREAT)
24 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
25 static_assert((O_CREAT) == (0100), "O_CREAT != 0100");
26 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
27 #else
28 # define O_CREAT 0100
29 #endif
30 #endif
31 #if defined __hppa__ || defined __mips__
32 #if defined(O_EXCL) || (defined(HAVE_DECL_O_EXCL) && HAVE_DECL_O_EXCL)
33 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
34 static_assert((O_EXCL) == (02000), "O_EXCL != 02000");
35 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
36 #else
37 # define O_EXCL 02000
38 #endif
39 #elif defined __alpha__ || defined __sparc__
40 #if defined(O_EXCL) || (defined(HAVE_DECL_O_EXCL) && HAVE_DECL_O_EXCL)
41 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
42 static_assert((O_EXCL) == (04000), "O_EXCL != 04000");
43 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
44 #else
45 # define O_EXCL 04000
46 #endif
47 #else
48 #if defined(O_EXCL) || (defined(HAVE_DECL_O_EXCL) && HAVE_DECL_O_EXCL)
49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
50 static_assert((O_EXCL) == (0200), "O_EXCL != 0200");
51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
52 #else
53 # define O_EXCL 0200
54 #endif
55 #endif
56 #if defined __mips__
57 #if defined(O_NOCTTY) || (defined(HAVE_DECL_O_NOCTTY) && HAVE_DECL_O_NOCTTY)
58 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
59 static_assert((O_NOCTTY) == (04000), "O_NOCTTY != 04000");
60 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
61 #else
62 # define O_NOCTTY 04000
63 #endif
64 #elif defined __alpha__
65 #if defined(O_NOCTTY) || (defined(HAVE_DECL_O_NOCTTY) && HAVE_DECL_O_NOCTTY)
66 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
67 static_assert((O_NOCTTY) == (010000), "O_NOCTTY != 010000");
68 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
69 #else
70 # define O_NOCTTY 010000
71 #endif
72 #elif defined __sparc__
73 #if defined(O_NOCTTY) || (defined(HAVE_DECL_O_NOCTTY) && HAVE_DECL_O_NOCTTY)
74 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
75 static_assert((O_NOCTTY) == (0100000), "O_NOCTTY != 0100000");
76 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
77 #else
78 # define O_NOCTTY 0100000
79 #endif
80 #elif defined __hppa__
81 #if defined(O_NOCTTY) || (defined(HAVE_DECL_O_NOCTTY) && HAVE_DECL_O_NOCTTY)
82 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
83 static_assert((O_NOCTTY) == (0400000), "O_NOCTTY != 0400000");
84 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
85 #else
86 # define O_NOCTTY 0400000
87 #endif
88 #else
89 #if defined(O_NOCTTY) || (defined(HAVE_DECL_O_NOCTTY) && HAVE_DECL_O_NOCTTY)
90 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
91 static_assert((O_NOCTTY) == (0400), "O_NOCTTY != 0400");
92 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
93 #else
94 # define O_NOCTTY 0400
95 #endif
96 #endif
97 #if defined __alpha__ || defined __sparc__
98 #if defined(O_TRUNC) || (defined(HAVE_DECL_O_TRUNC) && HAVE_DECL_O_TRUNC)
99 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
100 static_assert((O_TRUNC) == (02000), "O_TRUNC != 02000");
101 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
102 #else
103 # define O_TRUNC 02000
104 #endif
105 #else
106 #if defined(O_TRUNC) || (defined(HAVE_DECL_O_TRUNC) && HAVE_DECL_O_TRUNC)
107 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
108 static_assert((O_TRUNC) == (01000), "O_TRUNC != 01000");
109 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
110 #else
111 # define O_TRUNC 01000
112 #endif
113 #endif
114 #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__
115 #if defined(O_APPEND) || (defined(HAVE_DECL_O_APPEND) && HAVE_DECL_O_APPEND)
116 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
117 static_assert((O_APPEND) == (010), "O_APPEND != 010");
118 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
119 #else
120 # define O_APPEND 010
121 #endif
122 #else
123 #if defined(O_APPEND) || (defined(HAVE_DECL_O_APPEND) && HAVE_DECL_O_APPEND)
124 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
125 static_assert((O_APPEND) == (02000), "O_APPEND != 02000");
126 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
127 #else
128 # define O_APPEND 02000
129 #endif
130 #endif
131 #if defined __alpha__
132 #if defined(O_NONBLOCK) || (defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK)
133 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
134 static_assert((O_NONBLOCK) == (04), "O_NONBLOCK != 04");
135 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
136 #else
137 # define O_NONBLOCK 04
138 #endif
139 #elif defined __mips__
140 #if defined(O_NONBLOCK) || (defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK)
141 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
142 static_assert((O_NONBLOCK) == (0200), "O_NONBLOCK != 0200");
143 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
144 #else
145 # define O_NONBLOCK 0200
146 #endif
147 #elif defined __sparc__
148 #if defined(O_NONBLOCK) || (defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK)
149 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
150 static_assert((O_NONBLOCK) == (040000), "O_NONBLOCK != 040000");
151 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
152 #else
153 # define O_NONBLOCK 040000
154 #endif
155 #elif defined __hppa__
156 #if defined(O_NONBLOCK) || (defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK)
157 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
158 static_assert((O_NONBLOCK) == (0200004), "O_NONBLOCK != 0200004");
159 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
160 #else
161 # define O_NONBLOCK 0200004
162 #endif
163 #else
164 #if defined(O_NONBLOCK) || (defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK)
165 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
166 static_assert((O_NONBLOCK) == (04000), "O_NONBLOCK != 04000");
167 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
168 #else
169 # define O_NONBLOCK 04000
170 #endif
171 #endif
172 #if defined __mips__
173 #if defined(__O_SYNC) || (defined(HAVE_DECL___O_SYNC) && HAVE_DECL___O_SYNC)
174 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
175 static_assert((__O_SYNC) == (040000), "__O_SYNC != 040000");
176 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
177 #else
178 # define __O_SYNC 040000
179 #endif
180 #elif defined __hppa__
181 #if defined(__O_SYNC) || (defined(HAVE_DECL___O_SYNC) && HAVE_DECL___O_SYNC)
182 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
183 static_assert((__O_SYNC) == (0100000), "__O_SYNC != 0100000");
184 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
185 #else
186 # define __O_SYNC 0100000
187 #endif
188 #elif defined __alpha__
189 #if defined(__O_SYNC) || (defined(HAVE_DECL___O_SYNC) && HAVE_DECL___O_SYNC)
190 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
191 static_assert((__O_SYNC) == (020000000), "__O_SYNC != 020000000");
192 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
193 #else
194 # define __O_SYNC 020000000
195 #endif
196 #elif defined __sparc__
197 #if defined(__O_SYNC) || (defined(HAVE_DECL___O_SYNC) && HAVE_DECL___O_SYNC)
198 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
199 static_assert((__O_SYNC) == (040000000), "__O_SYNC != 040000000");
200 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
201 #else
202 # define __O_SYNC 040000000
203 #endif
204 #else
205 #if defined(__O_SYNC) || (defined(HAVE_DECL___O_SYNC) && HAVE_DECL___O_SYNC)
206 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
207 static_assert((__O_SYNC) == (04000000), "__O_SYNC != 04000000");
208 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
209 #else
210 # define __O_SYNC 04000000
211 #endif
212 #endif
213 #if defined __mips__
214 #if defined(O_DSYNC) || (defined(HAVE_DECL_O_DSYNC) && HAVE_DECL_O_DSYNC)
215 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
216 static_assert((O_DSYNC) == (020), "O_DSYNC != 020");
217 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
218 #else
219 # define O_DSYNC 020
220 #endif
221 #elif defined __sparc__
222 #if defined(O_DSYNC) || (defined(HAVE_DECL_O_DSYNC) && HAVE_DECL_O_DSYNC)
223 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
224 static_assert((O_DSYNC) == (020000), "O_DSYNC != 020000");
225 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
226 #else
227 # define O_DSYNC 020000
228 #endif
229 #elif defined __alpha__
230 #if defined(O_DSYNC) || (defined(HAVE_DECL_O_DSYNC) && HAVE_DECL_O_DSYNC)
231 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
232 static_assert((O_DSYNC) == (040000), "O_DSYNC != 040000");
233 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
234 #else
235 # define O_DSYNC 040000
236 #endif
237 #elif defined __hppa__
238 #if defined(O_DSYNC) || (defined(HAVE_DECL_O_DSYNC) && HAVE_DECL_O_DSYNC)
239 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
240 static_assert((O_DSYNC) == (01000000), "O_DSYNC != 01000000");
241 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
242 #else
243 # define O_DSYNC 01000000
244 #endif
245 #else
246 #if defined(O_DSYNC) || (defined(HAVE_DECL_O_DSYNC) && HAVE_DECL_O_DSYNC)
247 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
248 static_assert((O_DSYNC) == (010000), "O_DSYNC != 010000");
249 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
250 #else
251 # define O_DSYNC 010000
252 #endif
253 #endif
254 #if defined __hppa__
255 #if defined(O_RSYNC) || (defined(HAVE_DECL_O_RSYNC) && HAVE_DECL_O_RSYNC)
256 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
257 static_assert((O_RSYNC) == (02000000), "O_RSYNC != 02000000");
258 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
259 #else
260 # define O_RSYNC 02000000
261 #endif
262 #else
263 #endif
264 #if defined O_NDELAY && O_NDELAY & O_NONBLOCK
265 # ifndef STRACE_WORKAROUND_FOR_O_NDELAY
266 # define STRACE_WORKAROUND_FOR_O_NDELAY
267 # undef O_NDELAY
268 # endif
269 #endif
270 #if defined __sparc__
271 #if defined(O_NDELAY) || (defined(HAVE_DECL_O_NDELAY) && HAVE_DECL_O_NDELAY)
272 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
273 static_assert((O_NDELAY) == (04), "O_NDELAY != 04");
274 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
275 #else
276 # define O_NDELAY 04
277 #endif
278 #else
279 #endif
280 #if defined __sparc__
281 #if defined(O_DIRECT) || (defined(HAVE_DECL_O_DIRECT) && HAVE_DECL_O_DIRECT)
282 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
283 static_assert((O_DIRECT) == (04000000), "O_DIRECT != 04000000");
284 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
285 #else
286 # define O_DIRECT 04000000
287 #endif
288 #elif defined __mips__
289 #if defined(O_DIRECT) || (defined(HAVE_DECL_O_DIRECT) && HAVE_DECL_O_DIRECT)
290 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
291 static_assert((O_DIRECT) == (0100000), "O_DIRECT != 0100000");
292 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
293 #else
294 # define O_DIRECT 0100000
295 #endif
296 #elif defined __arm__ || defined __arm64__ || defined __aarch64__ || defined __m68k__
297 #if defined(O_DIRECT) || (defined(HAVE_DECL_O_DIRECT) && HAVE_DECL_O_DIRECT)
298 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
299 static_assert((O_DIRECT) == (0200000), "O_DIRECT != 0200000");
300 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
301 #else
302 # define O_DIRECT 0200000
303 #endif
304 #elif defined __powerpc__
305 #if defined(O_DIRECT) || (defined(HAVE_DECL_O_DIRECT) && HAVE_DECL_O_DIRECT)
306 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
307 static_assert((O_DIRECT) == (0400000), "O_DIRECT != 0400000");
308 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
309 #else
310 # define O_DIRECT 0400000
311 #endif
312 #elif defined __alpha__
313 #if defined(O_DIRECT) || (defined(HAVE_DECL_O_DIRECT) && HAVE_DECL_O_DIRECT)
314 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
315 static_assert((O_DIRECT) == (02000000), "O_DIRECT != 02000000");
316 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
317 #else
318 # define O_DIRECT 02000000
319 #endif
320 #else
321 #if defined(O_DIRECT) || (defined(HAVE_DECL_O_DIRECT) && HAVE_DECL_O_DIRECT)
322 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
323 static_assert((O_DIRECT) == (040000), "O_DIRECT != 040000");
324 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
325 #else
326 # define O_DIRECT 040000
327 #endif
328 #endif
329 #if defined __hppa__
330 #if defined(O_LARGEFILE) || (defined(HAVE_DECL_O_LARGEFILE) && HAVE_DECL_O_LARGEFILE)
331 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
332 static_assert((O_LARGEFILE) == (04000), "O_LARGEFILE != 04000");
333 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
334 #else
335 # define O_LARGEFILE 04000
336 #endif
337 #elif defined __mips__
338 #if defined(O_LARGEFILE) || (defined(HAVE_DECL_O_LARGEFILE) && HAVE_DECL_O_LARGEFILE)
339 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
340 static_assert((O_LARGEFILE) == (020000), "O_LARGEFILE != 020000");
341 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
342 #else
343 # define O_LARGEFILE 020000
344 #endif
345 #elif defined __powerpc__
346 #if defined(O_LARGEFILE) || (defined(HAVE_DECL_O_LARGEFILE) && HAVE_DECL_O_LARGEFILE)
347 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
348 static_assert((O_LARGEFILE) == (0200000), "O_LARGEFILE != 0200000");
349 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
350 #else
351 # define O_LARGEFILE 0200000
352 #endif
353 #elif defined __alpha__ || defined __arm__ || defined __arm64__ || defined __aarch64__ || defined __m68k__
354 #if defined(O_LARGEFILE) || (defined(HAVE_DECL_O_LARGEFILE) && HAVE_DECL_O_LARGEFILE)
355 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
356 static_assert((O_LARGEFILE) == (0400000), "O_LARGEFILE != 0400000");
357 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
358 #else
359 # define O_LARGEFILE 0400000
360 #endif
361 #elif defined __sparc__
362 #if defined(O_LARGEFILE) || (defined(HAVE_DECL_O_LARGEFILE) && HAVE_DECL_O_LARGEFILE)
363 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
364 static_assert((O_LARGEFILE) == (01000000), "O_LARGEFILE != 01000000");
365 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
366 #else
367 # define O_LARGEFILE 01000000
368 #endif
369 #else
370 #if defined(O_LARGEFILE) || (defined(HAVE_DECL_O_LARGEFILE) && HAVE_DECL_O_LARGEFILE)
371 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
372 static_assert((O_LARGEFILE) == (0100000), "O_LARGEFILE != 0100000");
373 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
374 #else
375 # define O_LARGEFILE 0100000
376 #endif
377 #endif
378 #if defined __hppa__
379 #if defined(O_NOFOLLOW) || (defined(HAVE_DECL_O_NOFOLLOW) && HAVE_DECL_O_NOFOLLOW)
380 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
381 static_assert((O_NOFOLLOW) == (0200), "O_NOFOLLOW != 0200");
382 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
383 #else
384 # define O_NOFOLLOW 0200
385 #endif
386 #elif defined __arm__ || defined __arm64__ || defined __aarch64__ || defined __m68k__ || defined __powerpc__
387 #if defined(O_NOFOLLOW) || (defined(HAVE_DECL_O_NOFOLLOW) && HAVE_DECL_O_NOFOLLOW)
388 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
389 static_assert((O_NOFOLLOW) == (0100000), "O_NOFOLLOW != 0100000");
390 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
391 #else
392 # define O_NOFOLLOW 0100000
393 #endif
394 #elif defined __alpha__
395 #if defined(O_NOFOLLOW) || (defined(HAVE_DECL_O_NOFOLLOW) && HAVE_DECL_O_NOFOLLOW)
396 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
397 static_assert((O_NOFOLLOW) == (0200000), "O_NOFOLLOW != 0200000");
398 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
399 #else
400 # define O_NOFOLLOW 0200000
401 #endif
402 #else
403 #if defined(O_NOFOLLOW) || (defined(HAVE_DECL_O_NOFOLLOW) && HAVE_DECL_O_NOFOLLOW)
404 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
405 static_assert((O_NOFOLLOW) == (0400000), "O_NOFOLLOW != 0400000");
406 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
407 #else
408 # define O_NOFOLLOW 0400000
409 #endif
410 #endif
411 #if defined __alpha__ || defined __hppa__
412 #if defined(O_NOATIME) || (defined(HAVE_DECL_O_NOATIME) && HAVE_DECL_O_NOATIME)
413 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
414 static_assert((O_NOATIME) == (04000000), "O_NOATIME != 04000000");
415 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
416 #else
417 # define O_NOATIME 04000000
418 #endif
419 #elif defined __sparc__
420 #if defined(O_NOATIME) || (defined(HAVE_DECL_O_NOATIME) && HAVE_DECL_O_NOATIME)
421 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
422 static_assert((O_NOATIME) == (010000000), "O_NOATIME != 010000000");
423 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
424 #else
425 # define O_NOATIME 010000000
426 #endif
427 #else
428 #if defined(O_NOATIME) || (defined(HAVE_DECL_O_NOATIME) && HAVE_DECL_O_NOATIME)
429 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
430 static_assert((O_NOATIME) == (01000000), "O_NOATIME != 01000000");
431 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
432 #else
433 # define O_NOATIME 01000000
434 #endif
435 #endif
436 #if defined __alpha__ || defined __hppa__
437 #if defined(O_CLOEXEC) || (defined(HAVE_DECL_O_CLOEXEC) && HAVE_DECL_O_CLOEXEC)
438 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
439 static_assert((O_CLOEXEC) == (010000000), "O_CLOEXEC != 010000000");
440 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
441 #else
442 # define O_CLOEXEC 010000000
443 #endif
444 #elif defined __sparc__
445 #if defined(O_CLOEXEC) || (defined(HAVE_DECL_O_CLOEXEC) && HAVE_DECL_O_CLOEXEC)
446 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
447 static_assert((O_CLOEXEC) == (020000000), "O_CLOEXEC != 020000000");
448 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
449 #else
450 # define O_CLOEXEC 020000000
451 #endif
452 #else
453 #if defined(O_CLOEXEC) || (defined(HAVE_DECL_O_CLOEXEC) && HAVE_DECL_O_CLOEXEC)
454 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
455 static_assert((O_CLOEXEC) == (02000000), "O_CLOEXEC != 02000000");
456 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
457 #else
458 # define O_CLOEXEC 02000000
459 #endif
460 #endif
461 #if defined __hppa__
462 #if defined(O_PATH) || (defined(HAVE_DECL_O_PATH) && HAVE_DECL_O_PATH)
463 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
464 static_assert((O_PATH) == (020000000), "O_PATH != 020000000");
465 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
466 #else
467 # define O_PATH 020000000
468 #endif
469 #elif defined __alpha__
470 #if defined(O_PATH) || (defined(HAVE_DECL_O_PATH) && HAVE_DECL_O_PATH)
471 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
472 static_assert((O_PATH) == (040000000), "O_PATH != 040000000");
473 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
474 #else
475 # define O_PATH 040000000
476 #endif
477 #elif defined __sparc__
478 #if defined(O_PATH) || (defined(HAVE_DECL_O_PATH) && HAVE_DECL_O_PATH)
479 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
480 static_assert((O_PATH) == (0100000000), "O_PATH != 0100000000");
481 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
482 #else
483 # define O_PATH 0100000000
484 #endif
485 #else
486 #if defined(O_PATH) || (defined(HAVE_DECL_O_PATH) && HAVE_DECL_O_PATH)
487 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
488 static_assert((O_PATH) == (010000000), "O_PATH != 010000000");
489 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
490 #else
491 # define O_PATH 010000000
492 #endif
493 #endif
494 #if defined __hppa__
495 #if defined(__O_TMPFILE) || (defined(HAVE_DECL___O_TMPFILE) && HAVE_DECL___O_TMPFILE)
496 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
497 static_assert((__O_TMPFILE) == (040000000), "__O_TMPFILE != 040000000");
498 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
499 #else
500 # define __O_TMPFILE 040000000
501 #endif
502 #elif defined __alpha__
503 #if defined(__O_TMPFILE) || (defined(HAVE_DECL___O_TMPFILE) && HAVE_DECL___O_TMPFILE)
504 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
505 static_assert((__O_TMPFILE) == (0100000000), "__O_TMPFILE != 0100000000");
506 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
507 #else
508 # define __O_TMPFILE 0100000000
509 #endif
510 #elif defined __sparc__
511 #if defined(__O_TMPFILE) || (defined(HAVE_DECL___O_TMPFILE) && HAVE_DECL___O_TMPFILE)
512 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
513 static_assert((__O_TMPFILE) == (0200000000), "__O_TMPFILE != 0200000000");
514 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
515 #else
516 # define __O_TMPFILE 0200000000
517 #endif
518 #else
519 #if defined(__O_TMPFILE) || (defined(HAVE_DECL___O_TMPFILE) && HAVE_DECL___O_TMPFILE)
520 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
521 static_assert((__O_TMPFILE) == (020000000), "__O_TMPFILE != 020000000");
522 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
523 #else
524 # define __O_TMPFILE 020000000
525 #endif
526 #endif
527 #if defined __hppa__
528 #if defined(O_DIRECTORY) || (defined(HAVE_DECL_O_DIRECTORY) && HAVE_DECL_O_DIRECTORY)
529 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
530 static_assert((O_DIRECTORY) == (010000), "O_DIRECTORY != 010000");
531 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
532 #else
533 # define O_DIRECTORY 010000
534 #endif
535 #elif defined __arm__ || defined __arm64__ || defined __aarch64__ || defined __m68k__ || defined __powerpc__
536 #if defined(O_DIRECTORY) || (defined(HAVE_DECL_O_DIRECTORY) && HAVE_DECL_O_DIRECTORY)
537 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
538 static_assert((O_DIRECTORY) == (040000), "O_DIRECTORY != 040000");
539 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
540 #else
541 # define O_DIRECTORY 040000
542 #endif
543 #elif defined __alpha__
544 #if defined(O_DIRECTORY) || (defined(HAVE_DECL_O_DIRECTORY) && HAVE_DECL_O_DIRECTORY)
545 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
546 static_assert((O_DIRECTORY) == (0100000), "O_DIRECTORY != 0100000");
547 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
548 #else
549 # define O_DIRECTORY 0100000
550 #endif
551 #else
552 #if defined(O_DIRECTORY) || (defined(HAVE_DECL_O_DIRECTORY) && HAVE_DECL_O_DIRECTORY)
553 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
554 static_assert((O_DIRECTORY) == (0200000), "O_DIRECTORY != 0200000");
555 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
556 #else
557 # define O_DIRECTORY 0200000
558 #endif
559 #endif
560 #if defined __sparc__
561 #if defined(FASYNC) || (defined(HAVE_DECL_FASYNC) && HAVE_DECL_FASYNC)
562 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
563 static_assert((FASYNC) == (0100), "FASYNC != 0100");
564 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
565 #else
566 # define FASYNC 0100
567 #endif
568 #elif defined __mips__
569 #if defined(FASYNC) || (defined(HAVE_DECL_FASYNC) && HAVE_DECL_FASYNC)
570 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
571 static_assert((FASYNC) == (010000), "FASYNC != 010000");
572 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
573 #else
574 # define FASYNC 010000
575 #endif
576 #else
577 #if defined(FASYNC) || (defined(HAVE_DECL_FASYNC) && HAVE_DECL_FASYNC)
578 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
579 static_assert((FASYNC) == (020000), "FASYNC != 020000");
580 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
581 #else
582 # define FASYNC 020000
583 #endif
584 #endif
585 
586 #ifndef XLAT_MACROS_ONLY
587 
588 # ifndef IN_MPERS
589 
590 const struct xlat open_mode_flags[] = {
591 
592 
593 #if defined __hppa__ || defined __mips__
594  XLAT(O_CREAT),
595 #elif defined __alpha__ || defined __sparc__
596  XLAT(O_CREAT),
597 #else
598  XLAT(O_CREAT),
599 #endif
600 
601 #if defined __hppa__ || defined __mips__
602  XLAT(O_EXCL),
603 #elif defined __alpha__ || defined __sparc__
604  XLAT(O_EXCL),
605 #else
606  XLAT(O_EXCL),
607 #endif
608 
609 #if defined __mips__
610  XLAT(O_NOCTTY),
611 #elif defined __alpha__
612  XLAT(O_NOCTTY),
613 #elif defined __sparc__
614  XLAT(O_NOCTTY),
615 #elif defined __hppa__
616  XLAT(O_NOCTTY),
617 #else
618  XLAT(O_NOCTTY),
619 #endif
620 
621 #if defined __alpha__ || defined __sparc__
622  XLAT(O_TRUNC),
623 #else
624  XLAT(O_TRUNC),
625 #endif
626 
627 #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__
628  XLAT(O_APPEND),
629 #else
630  XLAT(O_APPEND),
631 #endif
632 
633 #if defined __alpha__
634  XLAT(O_NONBLOCK),
635 #elif defined __mips__
636  XLAT(O_NONBLOCK),
637 #elif defined __sparc__
638  XLAT(O_NONBLOCK),
639 #elif defined __hppa__
640  XLAT(O_NONBLOCK),
641 #else
642  XLAT(O_NONBLOCK),
643 #endif
644 
645 
646 #if defined(O_SYNC) || (defined(HAVE_DECL_O_SYNC) && HAVE_DECL_O_SYNC)
647   XLAT(O_SYNC),
648 #endif
649 
650 #if defined __mips__
651  XLAT(__O_SYNC),
652 #elif defined __hppa__
653  XLAT(__O_SYNC),
654 #elif defined __alpha__
655  XLAT(__O_SYNC),
656 #elif defined __sparc__
657  XLAT(__O_SYNC),
658 #else
659  XLAT(__O_SYNC),
660 #endif
661 
662 #if defined(O_ASYNC) || (defined(HAVE_DECL_O_ASYNC) && HAVE_DECL_O_ASYNC)
663   XLAT(O_ASYNC),
664 #endif
665 
666 #if defined __mips__
667  XLAT(O_DSYNC),
668 #elif defined __sparc__
669  XLAT(O_DSYNC),
670 #elif defined __alpha__
671  XLAT(O_DSYNC),
672 #elif defined __hppa__
673  XLAT(O_DSYNC),
674 #else
675  XLAT(O_DSYNC),
676 #endif
677 
678 #if defined __hppa__
679  XLAT(O_RSYNC),
680 #else
681 #if defined(O_RSYNC) || (defined(HAVE_DECL_O_RSYNC) && HAVE_DECL_O_RSYNC)
682   XLAT(O_RSYNC),
683 #endif
684 #endif
685 
686 #if defined O_NDELAY && O_NDELAY & O_NONBLOCK
687 # ifndef STRACE_WORKAROUND_FOR_O_NDELAY
688 # define STRACE_WORKAROUND_FOR_O_NDELAY
689 
690 
691 
692 # undef O_NDELAY
693 # endif
694 #endif
695 
696 #if defined __sparc__
697  XLAT(O_NDELAY),
698 #else
699 #if defined(O_NDELAY) || (defined(HAVE_DECL_O_NDELAY) && HAVE_DECL_O_NDELAY)
700   XLAT(O_NDELAY),
701 #endif
702 #endif
703 
704 #if defined __sparc__
705  XLAT(O_DIRECT),
706 #elif defined __mips__
707  XLAT(O_DIRECT),
708 #elif defined __arm__ || defined __arm64__ || defined __aarch64__ || defined __m68k__
709  XLAT(O_DIRECT),
710 #elif defined __powerpc__
711  XLAT(O_DIRECT),
712 #elif defined __alpha__
713  XLAT(O_DIRECT),
714 #else
715  XLAT(O_DIRECT),
716 #endif
717 
718 #if defined __hppa__
719  XLAT(O_LARGEFILE),
720 #elif defined __mips__
721  XLAT(O_LARGEFILE),
722 #elif defined __powerpc__
723  XLAT(O_LARGEFILE),
724 #elif defined __alpha__ || defined __arm__ || defined __arm64__ || defined __aarch64__ || defined __m68k__
725  XLAT(O_LARGEFILE),
726 #elif defined __sparc__
727  XLAT(O_LARGEFILE),
728 #else
729  XLAT(O_LARGEFILE),
730 #endif
731 
732 #if defined __hppa__
733  XLAT(O_NOFOLLOW),
734 #elif defined __arm__ || defined __arm64__ || defined __aarch64__ || defined __m68k__ || defined __powerpc__
735  XLAT(O_NOFOLLOW),
736 #elif defined __alpha__
737  XLAT(O_NOFOLLOW),
738 #else
739  XLAT(O_NOFOLLOW),
740 #endif
741 
742 #if defined __alpha__ || defined __hppa__
743  XLAT(O_NOATIME),
744 #elif defined __sparc__
745  XLAT(O_NOATIME),
746 #else
747  XLAT(O_NOATIME),
748 #endif
749 
750 #if defined __alpha__ || defined __hppa__
751  XLAT(O_CLOEXEC),
752 #elif defined __sparc__
753  XLAT(O_CLOEXEC),
754 #else
755  XLAT(O_CLOEXEC),
756 #endif
757 
758 #if defined __hppa__
759  XLAT(O_PATH),
760 #elif defined __alpha__
761  XLAT(O_PATH),
762 #elif defined __sparc__
763  XLAT(O_PATH),
764 #else
765  XLAT(O_PATH),
766 #endif
767 
768 
769 #if defined(O_TMPFILE) || (defined(HAVE_DECL_O_TMPFILE) && HAVE_DECL_O_TMPFILE)
770   XLAT(O_TMPFILE),
771 #endif
772 
773 #if defined __hppa__
774  XLAT(__O_TMPFILE),
775 #elif defined __alpha__
776  XLAT(__O_TMPFILE),
777 #elif defined __sparc__
778  XLAT(__O_TMPFILE),
779 #else
780  XLAT(__O_TMPFILE),
781 #endif
782 
783 #if defined __hppa__
784  XLAT(O_DIRECTORY),
785 #elif defined __arm__ || defined __arm64__ || defined __aarch64__ || defined __m68k__ || defined __powerpc__
786  XLAT(O_DIRECTORY),
787 #elif defined __alpha__
788  XLAT(O_DIRECTORY),
789 #else
790  XLAT(O_DIRECTORY),
791 #endif
792 
793 #if defined __sparc__
794  XLAT(FASYNC),
795 #elif defined __mips__
796  XLAT(FASYNC),
797 #else
798  XLAT(FASYNC),
799 #endif
800  XLAT_END
801 };
802 
803 # endif /* !IN_MPERS */
804 
805 #endif /* !XLAT_MACROS_ONLY */
806