1 /* Generated by ./src/xlat/gen.sh from ./src/xlat/nfc_saps.in; do not edit. */
2
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5
6 #if defined(LLCP_SAP_SDP) || (defined(HAVE_DECL_LLCP_SAP_SDP) && HAVE_DECL_LLCP_SAP_SDP)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((LLCP_SAP_SDP) == (0x1), "LLCP_SAP_SDP != 0x1");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define LLCP_SAP_SDP 0x1
12 #endif
13 #if defined(LLCP_SAP_IP) || (defined(HAVE_DECL_LLCP_SAP_IP) && HAVE_DECL_LLCP_SAP_IP)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((LLCP_SAP_IP) == (0x2), "LLCP_SAP_IP != 0x2");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define LLCP_SAP_IP 0x2
19 #endif
20 #if defined(LLCP_SAP_OBEX) || (defined(HAVE_DECL_LLCP_SAP_OBEX) && HAVE_DECL_LLCP_SAP_OBEX)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((LLCP_SAP_OBEX) == (0x3), "LLCP_SAP_OBEX != 0x3");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define LLCP_SAP_OBEX 0x3
26 #endif
27 #if defined(LLCP_SAP_SNEP) || (defined(HAVE_DECL_LLCP_SAP_SNEP) && HAVE_DECL_LLCP_SAP_SNEP)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((LLCP_SAP_SNEP) == (0x4), "LLCP_SAP_SNEP != 0x4");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define LLCP_SAP_SNEP 0x4
33 #endif
34 #if defined(LLCP_SAP_MAX) || (defined(HAVE_DECL_LLCP_SAP_MAX) && HAVE_DECL_LLCP_SAP_MAX)
35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
36 static_assert((LLCP_SAP_MAX) == (0xff), "LLCP_SAP_MAX != 0xff");
37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
38 #else
39 # define LLCP_SAP_MAX 0xff
40 #endif
41 #undef XLAT_PREV_VAL
42
43 #ifndef XLAT_MACROS_ONLY
44
45 # ifdef IN_MPERS
46
47 # error static const struct xlat nfc_saps in mpers mode
48
49 # else
50
51 DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
52 static const struct xlat_data nfc_saps_xdata[] = {
53 XLAT(LLCP_SAP_SDP),
54 #define XLAT_VAL_0 ((unsigned) (LLCP_SAP_SDP))
55 #define XLAT_STR_0 STRINGIFY(LLCP_SAP_SDP)
56 XLAT(LLCP_SAP_IP),
57 #define XLAT_VAL_1 ((unsigned) (LLCP_SAP_IP))
58 #define XLAT_STR_1 STRINGIFY(LLCP_SAP_IP)
59 XLAT(LLCP_SAP_OBEX),
60 #define XLAT_VAL_2 ((unsigned) (LLCP_SAP_OBEX))
61 #define XLAT_STR_2 STRINGIFY(LLCP_SAP_OBEX)
62 XLAT(LLCP_SAP_SNEP),
63 #define XLAT_VAL_3 ((unsigned) (LLCP_SAP_SNEP))
64 #define XLAT_STR_3 STRINGIFY(LLCP_SAP_SNEP)
65 XLAT(LLCP_SAP_MAX),
66 #define XLAT_VAL_4 ((unsigned) (LLCP_SAP_MAX))
67 #define XLAT_STR_4 STRINGIFY(LLCP_SAP_MAX)
68 };
69 static
70 const struct xlat nfc_saps[1] = { {
71 .data = nfc_saps_xdata,
72 .size = ARRAY_SIZE(nfc_saps_xdata),
73 .type = XT_NORMAL,
74 .flags_mask = 0
75 # ifdef XLAT_VAL_0
76 | XLAT_VAL_0
77 # endif
78 # ifdef XLAT_VAL_1
79 | XLAT_VAL_1
80 # endif
81 # ifdef XLAT_VAL_2
82 | XLAT_VAL_2
83 # endif
84 # ifdef XLAT_VAL_3
85 | XLAT_VAL_3
86 # endif
87 # ifdef XLAT_VAL_4
88 | XLAT_VAL_4
89 # endif
90 ,
91 .flags_strsz = 0
92 # ifdef XLAT_STR_0
93 + sizeof(XLAT_STR_0)
94 # endif
95 # ifdef XLAT_STR_1
96 + sizeof(XLAT_STR_1)
97 # endif
98 # ifdef XLAT_STR_2
99 + sizeof(XLAT_STR_2)
100 # endif
101 # ifdef XLAT_STR_3
102 + sizeof(XLAT_STR_3)
103 # endif
104 # ifdef XLAT_STR_4
105 + sizeof(XLAT_STR_4)
106 # endif
107 ,
108 } };
109 DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
110
111 # undef XLAT_STR_0
112 # undef XLAT_VAL_0
113 # undef XLAT_STR_1
114 # undef XLAT_VAL_1
115 # undef XLAT_STR_2
116 # undef XLAT_VAL_2
117 # undef XLAT_STR_3
118 # undef XLAT_VAL_3
119 # undef XLAT_STR_4
120 # undef XLAT_VAL_4
121 # endif /* !IN_MPERS */
122
123 #endif /* !XLAT_MACROS_ONLY */