• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/phonet_protocols.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(PN_PROTO_TRANSPORT) || (defined(HAVE_DECL_PN_PROTO_TRANSPORT) && HAVE_DECL_PN_PROTO_TRANSPORT)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((PN_PROTO_TRANSPORT) == (0), "PN_PROTO_TRANSPORT != 0");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define PN_PROTO_TRANSPORT 0
12 #endif
13 #if defined(PN_PROTO_PHONET) || (defined(HAVE_DECL_PN_PROTO_PHONET) && HAVE_DECL_PN_PROTO_PHONET)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((PN_PROTO_PHONET) == (1), "PN_PROTO_PHONET != 1");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define PN_PROTO_PHONET 1
19 #endif
20 #if defined(PN_PROTO_PIPE) || (defined(HAVE_DECL_PN_PROTO_PIPE) && HAVE_DECL_PN_PROTO_PIPE)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((PN_PROTO_PIPE) == (2), "PN_PROTO_PIPE != 2");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define PN_PROTO_PIPE 2
26 #endif
27 
28 #ifndef XLAT_MACROS_ONLY
29 
30 # ifdef IN_MPERS
31 
32 #  error static const struct xlat phonet_protocols in mpers mode
33 
34 # else
35 
36 static
37 const struct xlat phonet_protocols[] = {
38  [PN_PROTO_TRANSPORT] = XLAT(PN_PROTO_TRANSPORT),
39  [PN_PROTO_PHONET] = XLAT(PN_PROTO_PHONET),
40  [PN_PROTO_PIPE] = XLAT(PN_PROTO_PIPE),
41  XLAT_END
42 };
43 
44 # endif /* !IN_MPERS */
45 
46 #endif /* !XLAT_MACROS_ONLY */
47