Home | History | Annotate | Download | only in xlat
      1 /* Generated by ./xlat/gen.sh from ./xlat/bt_protocols.in; do not edit. */
      2 
      3 #include "gcc_compat.h"
      4 #include "static_assert.h"
      5 
      6 #if defined(BTPROTO_L2CAP) || (defined(HAVE_DECL_BTPROTO_L2CAP) && HAVE_DECL_BTPROTO_L2CAP)
      7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
      8 static_assert((BTPROTO_L2CAP) == (0), "BTPROTO_L2CAP != 0");
      9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     10 #else
     11 # define BTPROTO_L2CAP 0
     12 #endif
     13 #if defined(BTPROTO_HCI) || (defined(HAVE_DECL_BTPROTO_HCI) && HAVE_DECL_BTPROTO_HCI)
     14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     15 static_assert((BTPROTO_HCI) == (1), "BTPROTO_HCI != 1");
     16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     17 #else
     18 # define BTPROTO_HCI 1
     19 #endif
     20 #if defined(BTPROTO_SCO) || (defined(HAVE_DECL_BTPROTO_SCO) && HAVE_DECL_BTPROTO_SCO)
     21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     22 static_assert((BTPROTO_SCO) == (2), "BTPROTO_SCO != 2");
     23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     24 #else
     25 # define BTPROTO_SCO 2
     26 #endif
     27 #if defined(BTPROTO_RFCOMM) || (defined(HAVE_DECL_BTPROTO_RFCOMM) && HAVE_DECL_BTPROTO_RFCOMM)
     28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     29 static_assert((BTPROTO_RFCOMM) == (3), "BTPROTO_RFCOMM != 3");
     30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     31 #else
     32 # define BTPROTO_RFCOMM 3
     33 #endif
     34 #if defined(BTPROTO_BNEP) || (defined(HAVE_DECL_BTPROTO_BNEP) && HAVE_DECL_BTPROTO_BNEP)
     35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     36 static_assert((BTPROTO_BNEP) == (4), "BTPROTO_BNEP != 4");
     37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     38 #else
     39 # define BTPROTO_BNEP 4
     40 #endif
     41 #if defined(BTPROTO_CMTP) || (defined(HAVE_DECL_BTPROTO_CMTP) && HAVE_DECL_BTPROTO_CMTP)
     42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     43 static_assert((BTPROTO_CMTP) == (5), "BTPROTO_CMTP != 5");
     44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     45 #else
     46 # define BTPROTO_CMTP 5
     47 #endif
     48 #if defined(BTPROTO_HIDP) || (defined(HAVE_DECL_BTPROTO_HIDP) && HAVE_DECL_BTPROTO_HIDP)
     49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     50 static_assert((BTPROTO_HIDP) == (6), "BTPROTO_HIDP != 6");
     51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     52 #else
     53 # define BTPROTO_HIDP 6
     54 #endif
     55 #if defined(BTPROTO_AVDTP) || (defined(HAVE_DECL_BTPROTO_AVDTP) && HAVE_DECL_BTPROTO_AVDTP)
     56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     57 static_assert((BTPROTO_AVDTP) == (7), "BTPROTO_AVDTP != 7");
     58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     59 #else
     60 # define BTPROTO_AVDTP 7
     61 #endif
     62 
     63 #ifndef XLAT_MACROS_ONLY
     64 
     65 # ifdef IN_MPERS
     66 
     67 #  error static const struct xlat bt_protocols in mpers mode
     68 
     69 # else
     70 
     71 static
     72 const struct xlat bt_protocols[] = {
     73  [BTPROTO_L2CAP] = XLAT(BTPROTO_L2CAP),
     74  [BTPROTO_HCI] = XLAT(BTPROTO_HCI),
     75  [BTPROTO_SCO] = XLAT(BTPROTO_SCO),
     76  [BTPROTO_RFCOMM] = XLAT(BTPROTO_RFCOMM),
     77  [BTPROTO_BNEP] = XLAT(BTPROTO_BNEP),
     78  [BTPROTO_CMTP] = XLAT(BTPROTO_CMTP),
     79  [BTPROTO_HIDP] = XLAT(BTPROTO_HIDP),
     80  [BTPROTO_AVDTP] = XLAT(BTPROTO_AVDTP),
     81  XLAT_END
     82 };
     83 
     84 # endif /* !IN_MPERS */
     85 
     86 #endif /* !XLAT_MACROS_ONLY */
     87