1 /* Generated by ./src/xlat/gen.sh from ./src/xlat/sock_type_flags.in; do not edit. */
2
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5
6 #undef XLAT_PREV_VAL
7
8 #ifndef XLAT_MACROS_ONLY
9
10 # ifdef IN_MPERS
11
12 # error static const struct xlat sock_type_flags in mpers mode
13
14 # else
15
16 DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
17 static const struct xlat_data sock_type_flags_xdata[] = {
18 #if defined(SOCK_CLOEXEC) || (defined(HAVE_DECL_SOCK_CLOEXEC) && HAVE_DECL_SOCK_CLOEXEC)
19 XLAT(SOCK_CLOEXEC),
20 #define XLAT_VAL_0 ((unsigned) (SOCK_CLOEXEC))
21 #define XLAT_STR_0 STRINGIFY(SOCK_CLOEXEC)
22 #endif
23 #if defined(SOCK_NONBLOCK) || (defined(HAVE_DECL_SOCK_NONBLOCK) && HAVE_DECL_SOCK_NONBLOCK)
24 XLAT(SOCK_NONBLOCK),
25 #define XLAT_VAL_1 ((unsigned) (SOCK_NONBLOCK))
26 #define XLAT_STR_1 STRINGIFY(SOCK_NONBLOCK)
27 #endif
28 };
29 static
30 const struct xlat sock_type_flags[1] = { {
31 .data = sock_type_flags_xdata,
32 .size = ARRAY_SIZE(sock_type_flags_xdata),
33 .type = XT_NORMAL,
34 .flags_mask = 0
35 # ifdef XLAT_VAL_0
36 | XLAT_VAL_0
37 # endif
38 # ifdef XLAT_VAL_1
39 | XLAT_VAL_1
40 # endif
41 ,
42 .flags_strsz = 0
43 # ifdef XLAT_STR_0
44 + sizeof(XLAT_STR_0)
45 # endif
46 # ifdef XLAT_STR_1
47 + sizeof(XLAT_STR_1)
48 # endif
49 ,
50 } };
51 DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
52
53 # undef XLAT_STR_0
54 # undef XLAT_VAL_0
55 # undef XLAT_STR_1
56 # undef XLAT_VAL_1
57 # endif /* !IN_MPERS */
58
59 #endif /* !XLAT_MACROS_ONLY */