1 /* Generated by ./src/xlat/gen.sh from ./src/xlat/shm_resource_flags.in; do not edit. */
2
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5
6 #if defined(IPC_CREAT) || (defined(HAVE_DECL_IPC_CREAT) && HAVE_DECL_IPC_CREAT)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((IPC_CREAT) == (01000), "IPC_CREAT != 01000");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define IPC_CREAT 01000
12 #endif
13 #if defined(IPC_EXCL) || (defined(HAVE_DECL_IPC_EXCL) && HAVE_DECL_IPC_EXCL)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((IPC_EXCL) == (02000), "IPC_EXCL != 02000");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define IPC_EXCL 02000
19 #endif
20 #if defined(SHM_HUGETLB) || (defined(HAVE_DECL_SHM_HUGETLB) && HAVE_DECL_SHM_HUGETLB)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((SHM_HUGETLB) == (04000), "SHM_HUGETLB != 04000");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define SHM_HUGETLB 04000
26 #endif
27 #if defined(SHM_NORESERVE) || (defined(HAVE_DECL_SHM_NORESERVE) && HAVE_DECL_SHM_NORESERVE)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((SHM_NORESERVE) == (010000), "SHM_NORESERVE != 010000");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define SHM_NORESERVE 010000
33 #endif
34 #undef XLAT_PREV_VAL
35
36 #ifndef XLAT_MACROS_ONLY
37
38 # ifdef IN_MPERS
39
40 # error static const struct xlat shm_resource_flags in mpers mode
41
42 # else
43
44 DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
45 static const struct xlat_data shm_resource_flags_xdata[] = {
46 XLAT(IPC_CREAT),
47 #define XLAT_VAL_0 ((unsigned) (IPC_CREAT))
48 #define XLAT_STR_0 STRINGIFY(IPC_CREAT)
49 XLAT(IPC_EXCL),
50 #define XLAT_VAL_1 ((unsigned) (IPC_EXCL))
51 #define XLAT_STR_1 STRINGIFY(IPC_EXCL)
52 XLAT(SHM_HUGETLB),
53 #define XLAT_VAL_2 ((unsigned) (SHM_HUGETLB))
54 #define XLAT_STR_2 STRINGIFY(SHM_HUGETLB)
55 XLAT(SHM_NORESERVE),
56 #define XLAT_VAL_3 ((unsigned) (SHM_NORESERVE))
57 #define XLAT_STR_3 STRINGIFY(SHM_NORESERVE)
58 };
59 static
60 const struct xlat shm_resource_flags[1] = { {
61 .data = shm_resource_flags_xdata,
62 .size = ARRAY_SIZE(shm_resource_flags_xdata),
63 .type = XT_NORMAL,
64 .flags_mask = 0
65 # ifdef XLAT_VAL_0
66 | XLAT_VAL_0
67 # endif
68 # ifdef XLAT_VAL_1
69 | XLAT_VAL_1
70 # endif
71 # ifdef XLAT_VAL_2
72 | XLAT_VAL_2
73 # endif
74 # ifdef XLAT_VAL_3
75 | XLAT_VAL_3
76 # endif
77 ,
78 .flags_strsz = 0
79 # ifdef XLAT_STR_0
80 + sizeof(XLAT_STR_0)
81 # endif
82 # ifdef XLAT_STR_1
83 + sizeof(XLAT_STR_1)
84 # endif
85 # ifdef XLAT_STR_2
86 + sizeof(XLAT_STR_2)
87 # endif
88 # ifdef XLAT_STR_3
89 + sizeof(XLAT_STR_3)
90 # endif
91 ,
92 } };
93 DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
94
95 # undef XLAT_STR_0
96 # undef XLAT_VAL_0
97 # undef XLAT_STR_1
98 # undef XLAT_VAL_1
99 # undef XLAT_STR_2
100 # undef XLAT_VAL_2
101 # undef XLAT_STR_3
102 # undef XLAT_VAL_3
103 # endif /* !IN_MPERS */
104
105 #endif /* !XLAT_MACROS_ONLY */