• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/resources.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(RLIMIT_CPU) || (defined(HAVE_DECL_RLIMIT_CPU) && HAVE_DECL_RLIMIT_CPU)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((RLIMIT_CPU) == (0), "RLIMIT_CPU != 0");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define RLIMIT_CPU 0
12 #endif
13 #if defined(RLIMIT_FSIZE) || (defined(HAVE_DECL_RLIMIT_FSIZE) && HAVE_DECL_RLIMIT_FSIZE)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((RLIMIT_FSIZE) == (1), "RLIMIT_FSIZE != 1");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define RLIMIT_FSIZE 1
19 #endif
20 #if defined(RLIMIT_DATA) || (defined(HAVE_DECL_RLIMIT_DATA) && HAVE_DECL_RLIMIT_DATA)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((RLIMIT_DATA) == (2), "RLIMIT_DATA != 2");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define RLIMIT_DATA 2
26 #endif
27 #if defined(RLIMIT_STACK) || (defined(HAVE_DECL_RLIMIT_STACK) && HAVE_DECL_RLIMIT_STACK)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((RLIMIT_STACK) == (3), "RLIMIT_STACK != 3");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define RLIMIT_STACK 3
33 #endif
34 #if defined(RLIMIT_CORE) || (defined(HAVE_DECL_RLIMIT_CORE) && HAVE_DECL_RLIMIT_CORE)
35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
36 static_assert((RLIMIT_CORE) == (4), "RLIMIT_CORE != 4");
37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
38 #else
39 # define RLIMIT_CORE 4
40 #endif
41 #if defined(__alpha__)
42 #if defined(RLIMIT_RSS) || (defined(HAVE_DECL_RLIMIT_RSS) && HAVE_DECL_RLIMIT_RSS)
43 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
44 static_assert((RLIMIT_RSS) == (5), "RLIMIT_RSS != 5");
45 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
46 #else
47 # define RLIMIT_RSS 5
48 #endif
49 #if defined(RLIMIT_NOFILE) || (defined(HAVE_DECL_RLIMIT_NOFILE) && HAVE_DECL_RLIMIT_NOFILE)
50 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
51 static_assert((RLIMIT_NOFILE) == (6), "RLIMIT_NOFILE != 6");
52 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
53 #else
54 # define RLIMIT_NOFILE 6
55 #endif
56 #if defined(RLIMIT_AS) || (defined(HAVE_DECL_RLIMIT_AS) && HAVE_DECL_RLIMIT_AS)
57 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
58 static_assert((RLIMIT_AS) == (7), "RLIMIT_AS != 7");
59 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
60 #else
61 # define RLIMIT_AS 7
62 #endif
63 #if defined(RLIMIT_NPROC) || (defined(HAVE_DECL_RLIMIT_NPROC) && HAVE_DECL_RLIMIT_NPROC)
64 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
65 static_assert((RLIMIT_NPROC) == (8), "RLIMIT_NPROC != 8");
66 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
67 #else
68 # define RLIMIT_NPROC 8
69 #endif
70 #if defined(RLIMIT_MEMLOCK) || (defined(HAVE_DECL_RLIMIT_MEMLOCK) && HAVE_DECL_RLIMIT_MEMLOCK)
71 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
72 static_assert((RLIMIT_MEMLOCK) == (9), "RLIMIT_MEMLOCK != 9");
73 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
74 #else
75 # define RLIMIT_MEMLOCK 9
76 #endif
77 #elif defined(__mips__)
78 #if defined(RLIMIT_NOFILE) || (defined(HAVE_DECL_RLIMIT_NOFILE) && HAVE_DECL_RLIMIT_NOFILE)
79 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
80 static_assert((RLIMIT_NOFILE) == (5), "RLIMIT_NOFILE != 5");
81 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
82 #else
83 # define RLIMIT_NOFILE 5
84 #endif
85 #if defined(RLIMIT_AS) || (defined(HAVE_DECL_RLIMIT_AS) && HAVE_DECL_RLIMIT_AS)
86 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
87 static_assert((RLIMIT_AS) == (6), "RLIMIT_AS != 6");
88 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
89 #else
90 # define RLIMIT_AS 6
91 #endif
92 #if defined(RLIMIT_RSS) || (defined(HAVE_DECL_RLIMIT_RSS) && HAVE_DECL_RLIMIT_RSS)
93 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
94 static_assert((RLIMIT_RSS) == (7), "RLIMIT_RSS != 7");
95 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
96 #else
97 # define RLIMIT_RSS 7
98 #endif
99 #if defined(RLIMIT_NPROC) || (defined(HAVE_DECL_RLIMIT_NPROC) && HAVE_DECL_RLIMIT_NPROC)
100 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
101 static_assert((RLIMIT_NPROC) == (8), "RLIMIT_NPROC != 8");
102 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
103 #else
104 # define RLIMIT_NPROC 8
105 #endif
106 #if defined(RLIMIT_MEMLOCK) || (defined(HAVE_DECL_RLIMIT_MEMLOCK) && HAVE_DECL_RLIMIT_MEMLOCK)
107 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
108 static_assert((RLIMIT_MEMLOCK) == (9), "RLIMIT_MEMLOCK != 9");
109 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
110 #else
111 # define RLIMIT_MEMLOCK 9
112 #endif
113 #elif defined(__sparc__)
114 #if defined(RLIMIT_RSS) || (defined(HAVE_DECL_RLIMIT_RSS) && HAVE_DECL_RLIMIT_RSS)
115 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
116 static_assert((RLIMIT_RSS) == (5), "RLIMIT_RSS != 5");
117 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
118 #else
119 # define RLIMIT_RSS 5
120 #endif
121 #if defined(RLIMIT_NOFILE) || (defined(HAVE_DECL_RLIMIT_NOFILE) && HAVE_DECL_RLIMIT_NOFILE)
122 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
123 static_assert((RLIMIT_NOFILE) == (6), "RLIMIT_NOFILE != 6");
124 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
125 #else
126 # define RLIMIT_NOFILE 6
127 #endif
128 #if defined(RLIMIT_NPROC) || (defined(HAVE_DECL_RLIMIT_NPROC) && HAVE_DECL_RLIMIT_NPROC)
129 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
130 static_assert((RLIMIT_NPROC) == (7), "RLIMIT_NPROC != 7");
131 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
132 #else
133 # define RLIMIT_NPROC 7
134 #endif
135 #if defined(RLIMIT_MEMLOCK) || (defined(HAVE_DECL_RLIMIT_MEMLOCK) && HAVE_DECL_RLIMIT_MEMLOCK)
136 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
137 static_assert((RLIMIT_MEMLOCK) == (8), "RLIMIT_MEMLOCK != 8");
138 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
139 #else
140 # define RLIMIT_MEMLOCK 8
141 #endif
142 #if defined(RLIMIT_AS) || (defined(HAVE_DECL_RLIMIT_AS) && HAVE_DECL_RLIMIT_AS)
143 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
144 static_assert((RLIMIT_AS) == (9), "RLIMIT_AS != 9");
145 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
146 #else
147 # define RLIMIT_AS 9
148 #endif
149 #else
150 #if defined(RLIMIT_RSS) || (defined(HAVE_DECL_RLIMIT_RSS) && HAVE_DECL_RLIMIT_RSS)
151 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
152 static_assert((RLIMIT_RSS) == (5), "RLIMIT_RSS != 5");
153 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
154 #else
155 # define RLIMIT_RSS 5
156 #endif
157 #if defined(RLIMIT_NPROC) || (defined(HAVE_DECL_RLIMIT_NPROC) && HAVE_DECL_RLIMIT_NPROC)
158 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
159 static_assert((RLIMIT_NPROC) == (6), "RLIMIT_NPROC != 6");
160 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
161 #else
162 # define RLIMIT_NPROC 6
163 #endif
164 #if defined(RLIMIT_NOFILE) || (defined(HAVE_DECL_RLIMIT_NOFILE) && HAVE_DECL_RLIMIT_NOFILE)
165 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
166 static_assert((RLIMIT_NOFILE) == (7), "RLIMIT_NOFILE != 7");
167 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
168 #else
169 # define RLIMIT_NOFILE 7
170 #endif
171 #if defined(RLIMIT_MEMLOCK) || (defined(HAVE_DECL_RLIMIT_MEMLOCK) && HAVE_DECL_RLIMIT_MEMLOCK)
172 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
173 static_assert((RLIMIT_MEMLOCK) == (8), "RLIMIT_MEMLOCK != 8");
174 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
175 #else
176 # define RLIMIT_MEMLOCK 8
177 #endif
178 #if defined(RLIMIT_AS) || (defined(HAVE_DECL_RLIMIT_AS) && HAVE_DECL_RLIMIT_AS)
179 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
180 static_assert((RLIMIT_AS) == (9), "RLIMIT_AS != 9");
181 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
182 #else
183 # define RLIMIT_AS 9
184 #endif
185 #endif
186 #if defined(RLIMIT_LOCKS) || (defined(HAVE_DECL_RLIMIT_LOCKS) && HAVE_DECL_RLIMIT_LOCKS)
187 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
188 static_assert((RLIMIT_LOCKS) == (10), "RLIMIT_LOCKS != 10");
189 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
190 #else
191 # define RLIMIT_LOCKS 10
192 #endif
193 #if defined(RLIMIT_SIGPENDING) || (defined(HAVE_DECL_RLIMIT_SIGPENDING) && HAVE_DECL_RLIMIT_SIGPENDING)
194 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
195 static_assert((RLIMIT_SIGPENDING) == (11), "RLIMIT_SIGPENDING != 11");
196 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
197 #else
198 # define RLIMIT_SIGPENDING 11
199 #endif
200 #if defined(RLIMIT_MSGQUEUE) || (defined(HAVE_DECL_RLIMIT_MSGQUEUE) && HAVE_DECL_RLIMIT_MSGQUEUE)
201 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
202 static_assert((RLIMIT_MSGQUEUE) == (12), "RLIMIT_MSGQUEUE != 12");
203 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
204 #else
205 # define RLIMIT_MSGQUEUE 12
206 #endif
207 #if defined(RLIMIT_NICE) || (defined(HAVE_DECL_RLIMIT_NICE) && HAVE_DECL_RLIMIT_NICE)
208 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
209 static_assert((RLIMIT_NICE) == (13), "RLIMIT_NICE != 13");
210 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
211 #else
212 # define RLIMIT_NICE 13
213 #endif
214 #if defined(RLIMIT_RTPRIO) || (defined(HAVE_DECL_RLIMIT_RTPRIO) && HAVE_DECL_RLIMIT_RTPRIO)
215 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
216 static_assert((RLIMIT_RTPRIO) == (14), "RLIMIT_RTPRIO != 14");
217 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
218 #else
219 # define RLIMIT_RTPRIO 14
220 #endif
221 #if defined(RLIMIT_RTTIME) || (defined(HAVE_DECL_RLIMIT_RTTIME) && HAVE_DECL_RLIMIT_RTTIME)
222 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
223 static_assert((RLIMIT_RTTIME) == (15), "RLIMIT_RTTIME != 15");
224 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
225 #else
226 # define RLIMIT_RTTIME 15
227 #endif
228 
229 #ifndef XLAT_MACROS_ONLY
230 
231 # ifdef IN_MPERS
232 
233 #  error static const struct xlat resources in mpers mode
234 
235 # else
236 
237 static
238 const struct xlat resources[] = {
239  [RLIMIT_CPU] = XLAT(RLIMIT_CPU),
240  [RLIMIT_FSIZE] = XLAT(RLIMIT_FSIZE),
241  [RLIMIT_DATA] = XLAT(RLIMIT_DATA),
242  [RLIMIT_STACK] = XLAT(RLIMIT_STACK),
243  [RLIMIT_CORE] = XLAT(RLIMIT_CORE),
244 
245 #if defined(__alpha__)
246  [RLIMIT_RSS] = XLAT(RLIMIT_RSS),
247  [RLIMIT_NOFILE] = XLAT(RLIMIT_NOFILE),
248  [RLIMIT_AS] = XLAT(RLIMIT_AS),
249  [RLIMIT_NPROC] = XLAT(RLIMIT_NPROC),
250  [RLIMIT_MEMLOCK] = XLAT(RLIMIT_MEMLOCK),
251 #elif defined(__mips__)
252  [RLIMIT_NOFILE] = XLAT(RLIMIT_NOFILE),
253  [RLIMIT_AS] = XLAT(RLIMIT_AS),
254  [RLIMIT_RSS] = XLAT(RLIMIT_RSS),
255  [RLIMIT_NPROC] = XLAT(RLIMIT_NPROC),
256  [RLIMIT_MEMLOCK] = XLAT(RLIMIT_MEMLOCK),
257 #elif defined(__sparc__)
258  [RLIMIT_RSS] = XLAT(RLIMIT_RSS),
259  [RLIMIT_NOFILE] = XLAT(RLIMIT_NOFILE),
260  [RLIMIT_NPROC] = XLAT(RLIMIT_NPROC),
261  [RLIMIT_MEMLOCK] = XLAT(RLIMIT_MEMLOCK),
262  [RLIMIT_AS] = XLAT(RLIMIT_AS),
263 #else
264  [RLIMIT_RSS] = XLAT(RLIMIT_RSS),
265  [RLIMIT_NPROC] = XLAT(RLIMIT_NPROC),
266  [RLIMIT_NOFILE] = XLAT(RLIMIT_NOFILE),
267  [RLIMIT_MEMLOCK] = XLAT(RLIMIT_MEMLOCK),
268  [RLIMIT_AS] = XLAT(RLIMIT_AS),
269 #endif
270 
271  [RLIMIT_LOCKS] = XLAT(RLIMIT_LOCKS),
272  [RLIMIT_SIGPENDING] = XLAT(RLIMIT_SIGPENDING),
273  [RLIMIT_MSGQUEUE] = XLAT(RLIMIT_MSGQUEUE),
274  [RLIMIT_NICE] = XLAT(RLIMIT_NICE),
275  [RLIMIT_RTPRIO] = XLAT(RLIMIT_RTPRIO),
276  [RLIMIT_RTTIME] = XLAT(RLIMIT_RTTIME),
277  XLAT_END
278 };
279 
280 # endif /* !IN_MPERS */
281 
282 #endif /* !XLAT_MACROS_ONLY */
283