• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/socktypes.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #ifdef __mips__
7 #if defined(SOCK_DGRAM) || (defined(HAVE_DECL_SOCK_DGRAM) && HAVE_DECL_SOCK_DGRAM)
8 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
9 static_assert((SOCK_DGRAM) == (1), "SOCK_DGRAM != 1");
10 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
11 #else
12 # define SOCK_DGRAM 1
13 #endif
14 #if defined(SOCK_STREAM) || (defined(HAVE_DECL_SOCK_STREAM) && HAVE_DECL_SOCK_STREAM)
15 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
16 static_assert((SOCK_STREAM) == (2), "SOCK_STREAM != 2");
17 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
18 #else
19 # define SOCK_STREAM 2
20 #endif
21 #else
22 #if defined(SOCK_STREAM) || (defined(HAVE_DECL_SOCK_STREAM) && HAVE_DECL_SOCK_STREAM)
23 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
24 static_assert((SOCK_STREAM) == (1), "SOCK_STREAM != 1");
25 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
26 #else
27 # define SOCK_STREAM 1
28 #endif
29 #if defined(SOCK_DGRAM) || (defined(HAVE_DECL_SOCK_DGRAM) && HAVE_DECL_SOCK_DGRAM)
30 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
31 static_assert((SOCK_DGRAM) == (2), "SOCK_DGRAM != 2");
32 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
33 #else
34 # define SOCK_DGRAM 2
35 #endif
36 #endif
37 #if defined(SOCK_RAW) || (defined(HAVE_DECL_SOCK_RAW) && HAVE_DECL_SOCK_RAW)
38 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
39 static_assert((SOCK_RAW) == (3), "SOCK_RAW != 3");
40 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
41 #else
42 # define SOCK_RAW 3
43 #endif
44 #if defined(SOCK_RDM) || (defined(HAVE_DECL_SOCK_RDM) && HAVE_DECL_SOCK_RDM)
45 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
46 static_assert((SOCK_RDM) == (4), "SOCK_RDM != 4");
47 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
48 #else
49 # define SOCK_RDM 4
50 #endif
51 #if defined(SOCK_SEQPACKET) || (defined(HAVE_DECL_SOCK_SEQPACKET) && HAVE_DECL_SOCK_SEQPACKET)
52 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
53 static_assert((SOCK_SEQPACKET) == (5), "SOCK_SEQPACKET != 5");
54 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
55 #else
56 # define SOCK_SEQPACKET 5
57 #endif
58 #if defined(SOCK_DCCP) || (defined(HAVE_DECL_SOCK_DCCP) && HAVE_DECL_SOCK_DCCP)
59 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
60 static_assert((SOCK_DCCP) == (6), "SOCK_DCCP != 6");
61 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
62 #else
63 # define SOCK_DCCP 6
64 #endif
65 #if defined(SOCK_PACKET) || (defined(HAVE_DECL_SOCK_PACKET) && HAVE_DECL_SOCK_PACKET)
66 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
67 static_assert((SOCK_PACKET) == (10), "SOCK_PACKET != 10");
68 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
69 #else
70 # define SOCK_PACKET 10
71 #endif
72 
73 #ifndef XLAT_MACROS_ONLY
74 
75 # ifndef IN_MPERS
76 
77 const struct xlat socktypes[] = {
78 #ifdef __mips__
79  XLAT(SOCK_DGRAM),
80  XLAT(SOCK_STREAM),
81 #else
82  XLAT(SOCK_STREAM),
83  XLAT(SOCK_DGRAM),
84 #endif
85  XLAT(SOCK_RAW),
86  XLAT(SOCK_RDM),
87  XLAT(SOCK_SEQPACKET),
88  XLAT(SOCK_DCCP),
89  XLAT(SOCK_PACKET),
90  XLAT_END
91 };
92 
93 # endif /* !IN_MPERS */
94 
95 #endif /* !XLAT_MACROS_ONLY */
96