1 /* Generated by ./xlat/gen.sh from ./xlat/socketcalls.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(SYS_SOCKET) || (defined(HAVE_DECL_SYS_SOCKET) && HAVE_DECL_SYS_SOCKET)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((SYS_SOCKET) == (1), "SYS_SOCKET != 1");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define SYS_SOCKET 1
12 #endif
13 #if defined(SYS_BIND) || (defined(HAVE_DECL_SYS_BIND) && HAVE_DECL_SYS_BIND)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((SYS_BIND) == (2), "SYS_BIND != 2");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define SYS_BIND 2
19 #endif
20 #if defined(SYS_CONNECT) || (defined(HAVE_DECL_SYS_CONNECT) && HAVE_DECL_SYS_CONNECT)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((SYS_CONNECT) == (3), "SYS_CONNECT != 3");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define SYS_CONNECT 3
26 #endif
27 #if defined(SYS_LISTEN) || (defined(HAVE_DECL_SYS_LISTEN) && HAVE_DECL_SYS_LISTEN)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((SYS_LISTEN) == (4), "SYS_LISTEN != 4");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define SYS_LISTEN 4
33 #endif
34 #if defined(SYS_ACCEPT) || (defined(HAVE_DECL_SYS_ACCEPT) && HAVE_DECL_SYS_ACCEPT)
35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
36 static_assert((SYS_ACCEPT) == (5), "SYS_ACCEPT != 5");
37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
38 #else
39 # define SYS_ACCEPT 5
40 #endif
41 #if defined(SYS_GETSOCKNAME) || (defined(HAVE_DECL_SYS_GETSOCKNAME) && HAVE_DECL_SYS_GETSOCKNAME)
42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
43 static_assert((SYS_GETSOCKNAME) == (6), "SYS_GETSOCKNAME != 6");
44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
45 #else
46 # define SYS_GETSOCKNAME 6
47 #endif
48 #if defined(SYS_GETPEERNAME) || (defined(HAVE_DECL_SYS_GETPEERNAME) && HAVE_DECL_SYS_GETPEERNAME)
49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
50 static_assert((SYS_GETPEERNAME) == (7), "SYS_GETPEERNAME != 7");
51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
52 #else
53 # define SYS_GETPEERNAME 7
54 #endif
55 #if defined(SYS_SOCKETPAIR) || (defined(HAVE_DECL_SYS_SOCKETPAIR) && HAVE_DECL_SYS_SOCKETPAIR)
56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
57 static_assert((SYS_SOCKETPAIR) == (8), "SYS_SOCKETPAIR != 8");
58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
59 #else
60 # define SYS_SOCKETPAIR 8
61 #endif
62 #if defined(SYS_SEND) || (defined(HAVE_DECL_SYS_SEND) && HAVE_DECL_SYS_SEND)
63 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
64 static_assert((SYS_SEND) == (9), "SYS_SEND != 9");
65 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
66 #else
67 # define SYS_SEND 9
68 #endif
69 #if defined(SYS_RECV) || (defined(HAVE_DECL_SYS_RECV) && HAVE_DECL_SYS_RECV)
70 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
71 static_assert((SYS_RECV) == (10), "SYS_RECV != 10");
72 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
73 #else
74 # define SYS_RECV 10
75 #endif
76 #if defined(SYS_SENDTO) || (defined(HAVE_DECL_SYS_SENDTO) && HAVE_DECL_SYS_SENDTO)
77 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
78 static_assert((SYS_SENDTO) == (11), "SYS_SENDTO != 11");
79 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
80 #else
81 # define SYS_SENDTO 11
82 #endif
83 #if defined(SYS_RECVFROM) || (defined(HAVE_DECL_SYS_RECVFROM) && HAVE_DECL_SYS_RECVFROM)
84 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
85 static_assert((SYS_RECVFROM) == (12), "SYS_RECVFROM != 12");
86 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
87 #else
88 # define SYS_RECVFROM 12
89 #endif
90 #if defined(SYS_SHUTDOWN) || (defined(HAVE_DECL_SYS_SHUTDOWN) && HAVE_DECL_SYS_SHUTDOWN)
91 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
92 static_assert((SYS_SHUTDOWN) == (13), "SYS_SHUTDOWN != 13");
93 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
94 #else
95 # define SYS_SHUTDOWN 13
96 #endif
97 #if defined(SYS_SETSOCKOPT) || (defined(HAVE_DECL_SYS_SETSOCKOPT) && HAVE_DECL_SYS_SETSOCKOPT)
98 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
99 static_assert((SYS_SETSOCKOPT) == (14), "SYS_SETSOCKOPT != 14");
100 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
101 #else
102 # define SYS_SETSOCKOPT 14
103 #endif
104 #if defined(SYS_GETSOCKOPT) || (defined(HAVE_DECL_SYS_GETSOCKOPT) && HAVE_DECL_SYS_GETSOCKOPT)
105 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
106 static_assert((SYS_GETSOCKOPT) == (15), "SYS_GETSOCKOPT != 15");
107 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
108 #else
109 # define SYS_GETSOCKOPT 15
110 #endif
111 #if defined(SYS_SENDMSG) || (defined(HAVE_DECL_SYS_SENDMSG) && HAVE_DECL_SYS_SENDMSG)
112 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
113 static_assert((SYS_SENDMSG) == (16), "SYS_SENDMSG != 16");
114 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
115 #else
116 # define SYS_SENDMSG 16
117 #endif
118 #if defined(SYS_RECVMSG) || (defined(HAVE_DECL_SYS_RECVMSG) && HAVE_DECL_SYS_RECVMSG)
119 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
120 static_assert((SYS_RECVMSG) == (17), "SYS_RECVMSG != 17");
121 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
122 #else
123 # define SYS_RECVMSG 17
124 #endif
125 #if defined(SYS_ACCEPT4) || (defined(HAVE_DECL_SYS_ACCEPT4) && HAVE_DECL_SYS_ACCEPT4)
126 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
127 static_assert((SYS_ACCEPT4) == (18), "SYS_ACCEPT4 != 18");
128 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
129 #else
130 # define SYS_ACCEPT4 18
131 #endif
132 #if defined(SYS_RECVMMSG) || (defined(HAVE_DECL_SYS_RECVMMSG) && HAVE_DECL_SYS_RECVMMSG)
133 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
134 static_assert((SYS_RECVMMSG) == (19), "SYS_RECVMMSG != 19");
135 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
136 #else
137 # define SYS_RECVMMSG 19
138 #endif
139 #if defined(SYS_SENDMMSG) || (defined(HAVE_DECL_SYS_SENDMMSG) && HAVE_DECL_SYS_SENDMMSG)
140 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
141 static_assert((SYS_SENDMMSG) == (20), "SYS_SENDMMSG != 20");
142 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
143 #else
144 # define SYS_SENDMMSG 20
145 #endif
146 
147 #ifndef XLAT_MACROS_ONLY
148 
149 # ifdef IN_MPERS
150 
151 #  error static const struct xlat socketcalls in mpers mode
152 
153 # else
154 
155 static
156 const struct xlat socketcalls[] = {
157  XLAT(SYS_SOCKET),
158  XLAT(SYS_BIND),
159  XLAT(SYS_CONNECT),
160  XLAT(SYS_LISTEN),
161  XLAT(SYS_ACCEPT),
162  XLAT(SYS_GETSOCKNAME),
163  XLAT(SYS_GETPEERNAME),
164  XLAT(SYS_SOCKETPAIR),
165  XLAT(SYS_SEND),
166  XLAT(SYS_RECV),
167  XLAT(SYS_SENDTO),
168  XLAT(SYS_RECVFROM),
169  XLAT(SYS_SHUTDOWN),
170  XLAT(SYS_SETSOCKOPT),
171  XLAT(SYS_GETSOCKOPT),
172  XLAT(SYS_SENDMSG),
173  XLAT(SYS_RECVMSG),
174  XLAT(SYS_ACCEPT4),
175  XLAT(SYS_RECVMMSG),
176  XLAT(SYS_SENDMMSG),
177  XLAT_END
178 };
179 
180 # endif /* !IN_MPERS */
181 
182 #endif /* !XLAT_MACROS_ONLY */
183