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