Sysconf.xs

filter: Statementstmt 2.8% 34 / 1189 Branchbran 1.5% 8 / 518 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 2.4% 42 / 1707 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Solaris/Sysconf.pm ↑ Summary
1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4  
5 #include <sys/unistd.h>
6  
7 static int
8 0 not_here(char *s)
9 {
10 0 croak("%s not implemented on this architecture", s);
11 return -1;
12 }
13  
14 static double
15 0 constant__XOPEN_XP(char *name, int len, int arg)
16 {
17 0 ▶ if (9 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (9 + 1 >= len ) { 0 0 0
18 0 errno = EINVAL;
19 0 return 0;
20 }
21 0 switch (name[9 + 1]) {
22 0 case '3':
23 0 ▶ if (strEQ(name + 9, "G3")) { /* _XOPEN_XP removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 9, "G3")) { /* _XOPEN_XP removed */ 0 0 0
24 #ifdef _XOPEN_XPG3
25 0 return _XOPEN_XPG3;
26 #else
27 goto not_there;
28 #endif
29 }
30 case '4':
31 0 ▶ if (strEQ(name + 9, "G4")) { /* _XOPEN_XP removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 9, "G4")) { /* _XOPEN_XP removed */ 0 0 0
32 #ifdef _XOPEN_XPG4
33 0 return _XOPEN_XPG4;
34 #else
35 goto not_there;
36 #endif
37 }
38 }
39 0 errno = EINVAL;
40 0 return 0;
41  
42 not_there:
43 errno = ENOENT;
44 return 0;
45 }
46  
47 static double
48 0 constant__XOPEN_X(char *name, int len, int arg)
49 {
50 0 switch (name[8 + 0]) {
51 0 case 'C':
52 0 ▶ if (strEQ(name + 8, "CU_VERSION")) { /* _XOPEN_X removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "CU_VERSION")) { /* _XOPEN_X removed */ 0 0 0
53 #ifdef _XOPEN_XCU_VERSION
54 0 return _XOPEN_XCU_VERSION;
55 #else
56 goto not_there;
57 #endif
58 }
59 case 'P':
60 0 return constant__XOPEN_XP(name, len, arg);
61 }
62 0 errno = EINVAL;
63 0 return 0;
64  
65 not_there:
66 errno = ENOENT;
67 return 0;
68 }
69  
70 static double
71 0 constant__X(char *name, int len, int arg)
72 {
73 0 ▶ if (2 + 5 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (2 + 5 >= len ) { 0 0 0
74 0 errno = EINVAL;
75 0 return 0;
76 }
77 0 switch (name[2 + 5]) {
78 0 case 'E':
79 0 ▶ if (strEQ(name + 2, "OPEN_ENH_I18N")) { /* _X removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 2, "OPEN_ENH_I18N")) { /* _X removed */ 0 0 0
80 #ifdef _XOPEN_ENH_I18N
81 0 return _XOPEN_ENH_I18N;
82 #else
83 goto not_there;
84 #endif
85 }
86 case 'R':
87 0 ▶ if (strEQ(name + 2, "OPEN_REALTIME")) { /* _X removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 2, "OPEN_REALTIME")) { /* _X removed */ 0 0 0
88 #ifdef _XOPEN_REALTIME
89 0 return _XOPEN_REALTIME;
90 #else
91 goto not_there;
92 #endif
93 }
94 case 'S':
95 0 ▶ if (strEQ(name + 2, "OPEN_SHM")) { /* _X removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 2, "OPEN_SHM")) { /* _X removed */ 0 0 0
96 #ifdef _XOPEN_SHM
97 0 return _XOPEN_SHM;
98 #else
99 goto not_there;
100 #endif
101 }
102 case 'U':
103 0 ▶ if (strEQ(name + 2, "OPEN_UNIX")) { /* _X removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 2, "OPEN_UNIX")) { /* _X removed */ 0 0 0
104 #ifdef _XOPEN_UNIX
105 0 return _XOPEN_UNIX;
106 #else
107 goto not_there;
108 #endif
109 }
110 case 'X':
111 0 ▶ if (!strnEQ(name + 2,"OPEN_", 5))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"OPEN_", 5)) 0 0 0
112 0 break;
113 0 return constant__XOPEN_X(name, len, arg);
114 }
115 0 errno = EINVAL;
116 0 return 0;
117  
118 not_there:
119 errno = ENOENT;
120 return 0;
121 }
122  
123 static double
124 0 constant__POSIX2_C_(char *name, int len, int arg)
125 {
126 0 switch (name[10 + 0]) {
127 0 case 'B':
128 0 ▶ if (strEQ(name + 10, "BIND")) { /* _POSIX2_C_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 10, "BIND")) { /* _POSIX2_C_ removed */ 0 0 0
129 #ifdef _POSIX2_C_BIND
130 0 return _POSIX2_C_BIND;
131 #else
132 goto not_there;
133 #endif
134 }
135 case 'D':
136 0 ▶ if (strEQ(name + 10, "DEV")) { /* _POSIX2_C_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 10, "DEV")) { /* _POSIX2_C_ removed */ 0 0 0
137 #ifdef _POSIX2_C_DEV
138 0 return _POSIX2_C_DEV;
139 #else
140 goto not_there;
141 #endif
142 }
143 case 'V':
144 0 ▶ if (strEQ(name + 10, "VERSION")) { /* _POSIX2_C_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 10, "VERSION")) { /* _POSIX2_C_ removed */ 0 0 0
145 #ifdef _POSIX2_C_VERSION
146 0 return _POSIX2_C_VERSION;
147 #else
148 goto not_there;
149 #endif
150 }
151 }
152 0 errno = EINVAL;
153 0 return 0;
154  
155 not_there:
156 errno = ENOENT;
157 return 0;
158 }
159  
160 static double
161 0 constant__POSIX2_C(char *name, int len, int arg)
162 {
163 0 switch (name[9 + 0]) {
164 0 case 'H':
165 0 ▶ if (strEQ(name + 9, "HAR_TERM")) { /* _POSIX2_C removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 9, "HAR_TERM")) { /* _POSIX2_C removed */ 0 0 0
166 #ifdef _POSIX2_CHAR_TERM
167 0 return _POSIX2_CHAR_TERM;
168 #else
169 goto not_there;
170 #endif
171 }
172 case '_':
173 0 return constant__POSIX2_C_(name, len, arg);
174 }
175 0 errno = EINVAL;
176 0 return 0;
177  
178 not_there:
179 errno = ENOENT;
180 return 0;
181 }
182  
183 static double
184 0 constant__POSIX2(char *name, int len, int arg)
185 {
186 0 ▶ if (7 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (7 + 1 >= len ) { 0 0 0
187 0 errno = EINVAL;
188 0 return 0;
189 }
190 0 switch (name[7 + 1]) {
191 0 case 'C':
192 0 ▶ if (!strnEQ(name + 7,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 7,"_", 1)) 0 0 0
193 0 break;
194 0 return constant__POSIX2_C(name, len, arg);
195 0 case 'L':
196 0 ▶ if (strEQ(name + 7, "_LOCALEDEF")) { /* _POSIX2 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 7, "_LOCALEDEF")) { /* _POSIX2 removed */ 0 0 0
197 #ifdef _POSIX2_LOCALEDEF
198 0 return _POSIX2_LOCALEDEF;
199 #else
200 goto not_there;
201 #endif
202 }
203 case 'S':
204 0 ▶ if (strEQ(name + 7, "_SW_DEV")) { /* _POSIX2 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 7, "_SW_DEV")) { /* _POSIX2 removed */ 0 0 0
205 #ifdef _POSIX2_SW_DEV
206 0 return _POSIX2_SW_DEV;
207 #else
208 goto not_there;
209 #endif
210 }
211 case 'U':
212 0 ▶ if (strEQ(name + 7, "_UPE")) { /* _POSIX2 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 7, "_UPE")) { /* _POSIX2 removed */ 0 0 0
213 #ifdef _POSIX2_UPE
214 return _POSIX2_UPE;
215 #else
216 0 goto not_there;
217 #endif
218 }
219 case 'V':
220 0 ▶ if (strEQ(name + 7, "_VERSION")) { /* _POSIX2 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 7, "_VERSION")) { /* _POSIX2 removed */ 0 0 0
221 #ifdef _POSIX2_VERSION
222 0 return _POSIX2_VERSION;
223 #else
224 goto not_there;
225 #endif
226 }
227 }
228 0 errno = EINVAL;
229 0 return 0;
230  
231 0 not_there:
232 0 errno = ENOENT;
233 0 return 0;
234 }
235  
236 static double
237 0 constant__PO(char *name, int len, int arg)
238 {
239 0 ▶ if (3 + 3 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (3 + 3 >= len ) { 0 0 0
240 0 errno = EINVAL;
241 0 return 0;
242 }
243 0 switch (name[3 + 3]) {
244 0 case '2':
245 0 ▶ if (!strnEQ(name + 3,"SIX", 3))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 3,"SIX", 3)) 0 0 0
246 0 break;
247 0 return constant__POSIX2(name, len, arg);
248 0 case '_':
249 0 ▶ if (strEQ(name + 3, "SIX_VERSION")) { /* _PO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 3, "SIX_VERSION")) { /* _PO removed */ 0 0 0
250 #ifdef _POSIX_VERSION
251 0 return _POSIX_VERSION;
252 #else
253 goto not_there;
254 #endif
255 }
256 }
257 0 errno = EINVAL;
258 0 return 0;
259  
260 not_there:
261 errno = ENOENT;
262 return 0;
263 }
264  
265 static double
266 0 constant__PC_N(char *name, int len, int arg)
267 {
268 0 switch (name[5 + 0]) {
269 0 case 'A':
270 0 ▶ if (strEQ(name + 5, "AME_MAX")) { /* _PC_N removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "AME_MAX")) { /* _PC_N removed */ 0 0 0
271 #ifdef _PC_NAME_MAX
272 0 return _PC_NAME_MAX;
273 #else
274 goto not_there;
275 #endif
276 }
277 case 'O':
278 0 ▶ if (strEQ(name + 5, "O_TRUNC")) { /* _PC_N removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "O_TRUNC")) { /* _PC_N removed */ 0 0 0
279 #ifdef _PC_NO_TRUNC
280 0 return _PC_NO_TRUNC;
281 #else
282 goto not_there;
283 #endif
284 }
285 }
286 0 errno = EINVAL;
287 0 return 0;
288  
289 not_there:
290 errno = ENOENT;
291 return 0;
292 }
293  
294 static double
295 0 constant__PC_P(char *name, int len, int arg)
296 {
297 0 switch (name[5 + 0]) {
298 0 case 'A':
299 0 ▶ if (strEQ(name + 5, "ATH_MAX")) { /* _PC_P removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "ATH_MAX")) { /* _PC_P removed */ 0 0 0
300 #ifdef _PC_PATH_MAX
301 0 return _PC_PATH_MAX;
302 #else
303 goto not_there;
304 #endif
305 }
306 case 'I':
307 0 ▶ if (strEQ(name + 5, "IPE_BUF")) { /* _PC_P removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "IPE_BUF")) { /* _PC_P removed */ 0 0 0
308 #ifdef _PC_PIPE_BUF
309 0 return _PC_PIPE_BUF;
310 #else
311 goto not_there;
312 #endif
313 }
314 case 'R':
315 0 ▶ if (strEQ(name + 5, "RIO_IO")) { /* _PC_P removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "RIO_IO")) { /* _PC_P removed */ 0 0 0
316 #ifdef _PC_PRIO_IO
317 0 return _PC_PRIO_IO;
318 #else
319 goto not_there;
320 #endif
321 }
322 }
323 0 errno = EINVAL;
324 0 return 0;
325  
326 not_there:
327 errno = ENOENT;
328 return 0;
329 }
330  
331 static double
332 0 constant__PC_L(char *name, int len, int arg)
333 {
334 0 switch (name[5 + 0]) {
335 0 case 'A':
336 0 ▶ if (strEQ(name + 5, "AST")) { /* _PC_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "AST")) { /* _PC_L removed */ 0 0 0
337 #ifdef _PC_LAST
338 return _PC_LAST;
339 #else
340 0 goto not_there;
341 #endif
342 }
343 case 'I':
344 0 ▶ if (strEQ(name + 5, "INK_MAX")) { /* _PC_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "INK_MAX")) { /* _PC_L removed */ 0 0 0
345 #ifdef _PC_LINK_MAX
346 0 return _PC_LINK_MAX;
347 #else
348 goto not_there;
349 #endif
350 }
351 }
352 0 errno = EINVAL;
353 0 return 0;
354  
355 0 not_there:
356 0 errno = ENOENT;
357 0 return 0;
358 }
359  
360 static double
361 0 constant__PC_M(char *name, int len, int arg)
362 {
363 0 ▶ if (5 + 3 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (5 + 3 >= len ) { 0 0 0
364 0 errno = EINVAL;
365 0 return 0;
366 }
367 0 switch (name[5 + 3]) {
368 0 case 'C':
369 0 ▶ if (strEQ(name + 5, "AX_CANON")) { /* _PC_M removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "AX_CANON")) { /* _PC_M removed */ 0 0 0
370 #ifdef _PC_MAX_CANON
371 0 return _PC_MAX_CANON;
372 #else
373 goto not_there;
374 #endif
375 }
376 case 'I':
377 0 ▶ if (strEQ(name + 5, "AX_INPUT")) { /* _PC_M removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "AX_INPUT")) { /* _PC_M removed */ 0 0 0
378 #ifdef _PC_MAX_INPUT
379 0 return _PC_MAX_INPUT;
380 #else
381 goto not_there;
382 #endif
383 }
384 }
385 0 errno = EINVAL;
386 0 return 0;
387  
388 not_there:
389 errno = ENOENT;
390 return 0;
391 }
392  
393 static double
394 0 constant__PC(char *name, int len, int arg)
395 {
396 0 ▶ if (3 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (3 + 1 >= len ) { 0 0 0
397 0 errno = EINVAL;
398 0 return 0;
399 }
400 0 switch (name[3 + 1]) {
401 0 case 'A':
402 0 ▶ if (strEQ(name + 3, "_ASYNC_IO")) { /* _PC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 3, "_ASYNC_IO")) { /* _PC removed */ 0 0 0
403 #ifdef _PC_ASYNC_IO
404 0 return _PC_ASYNC_IO;
405 #else
406 goto not_there;
407 #endif
408 }
409 case 'C':
410 0 ▶ if (strEQ(name + 3, "_CHOWN_RESTRICTED")) { /* _PC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 3, "_CHOWN_RESTRICTED")) { /* _PC removed */ 0 0 0
411 #ifdef _PC_CHOWN_RESTRICTED
412 0 return _PC_CHOWN_RESTRICTED;
413 #else
414 goto not_there;
415 #endif
416 }
417 case 'F':
418 0 ▶ if (strEQ(name + 3, "_FILESIZEBITS")) { /* _PC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 3, "_FILESIZEBITS")) { /* _PC removed */ 0 0 0
419 #ifdef _PC_FILESIZEBITS
420 0 return _PC_FILESIZEBITS;
421 #else
422 goto not_there;
423 #endif
424 }
425 case 'L':
426 0 ▶ if (!strnEQ(name + 3,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 3,"_", 1)) 0 0 0
427 0 break;
428 0 return constant__PC_L(name, len, arg);
429 0 case 'M':
430 0 ▶ if (!strnEQ(name + 3,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 3,"_", 1)) 0 0 0
431 0 break;
432 0 return constant__PC_M(name, len, arg);
433 0 case 'N':
434 0 ▶ if (!strnEQ(name + 3,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 3,"_", 1)) 0 0 0
435 0 break;
436 0 return constant__PC_N(name, len, arg);
437 0 case 'P':
438 0 ▶ if (!strnEQ(name + 3,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 3,"_", 1)) 0 0 0
439 0 break;
440 0 return constant__PC_P(name, len, arg);
441 0 case 'S':
442 0 ▶ if (strEQ(name + 3, "_SYNC_IO")) { /* _PC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 3, "_SYNC_IO")) { /* _PC removed */ 0 0 0
443 #ifdef _PC_SYNC_IO
444 0 return _PC_SYNC_IO;
445 #else
446 goto not_there;
447 #endif
448 }
449 case 'V':
450 0 ▶ if (strEQ(name + 3, "_VDISABLE")) { /* _PC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 3, "_VDISABLE")) { /* _PC removed */ 0 0 0
451 #ifdef _PC_VDISABLE
452 0 return _PC_VDISABLE;
453 #else
454 goto not_there;
455 #endif
456 }
457 }
458 0 errno = EINVAL;
459 0 return 0;
460  
461 not_there:
462 errno = ENOENT;
463 return 0;
464 }
465  
466 static double
467 0 constant__P(char *name, int len, int arg)
468 {
469 0 switch (name[2 + 0]) {
470 0 case 'C':
471 0 return constant__PC(name, len, arg);
472 0 case 'O':
473 0 return constant__PO(name, len, arg);
474 }
475 0 errno = EINVAL;
476 0 return 0;
477  
478 not_there:
479 errno = ENOENT;
480 return 0;
481 }
482  
483 static double
484 0 constant__SC_AI(char *name, int len, int arg)
485 {
486 0 ▶ if (6 + 2 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 2 >= len ) { 0 0 0
487 0 errno = EINVAL;
488 0 return 0;
489 }
490 0 switch (name[6 + 2]) {
491 0 case 'L':
492 0 ▶ if (strEQ(name + 6, "O_LISTIO_MAX")) { /* _SC_AI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "O_LISTIO_MAX")) { /* _SC_AI removed */ 0 0 0
493 #ifdef _SC_AIO_LISTIO_MAX
494 0 return _SC_AIO_LISTIO_MAX;
495 #else
496 goto not_there;
497 #endif
498 }
499 case 'M':
500 0 ▶ if (strEQ(name + 6, "O_MAX")) { /* _SC_AI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "O_MAX")) { /* _SC_AI removed */ 0 0 0
501 #ifdef _SC_AIO_MAX
502 0 return _SC_AIO_MAX;
503 #else
504 goto not_there;
505 #endif
506 }
507 case 'P':
508 0 ▶ if (strEQ(name + 6, "O_PRIO_DELTA_MAX")) { /* _SC_AI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "O_PRIO_DELTA_MAX")) { /* _SC_AI removed */ 0 0 0
509 #ifdef _SC_AIO_PRIO_DELTA_MAX
510 0 return _SC_AIO_PRIO_DELTA_MAX;
511 #else
512 goto not_there;
513 #endif
514 }
515 }
516 0 errno = EINVAL;
517 0 return 0;
518  
519 not_there:
520 errno = ENOENT;
521 return 0;
522 }
523  
524 static double
525 0 constant__SC_A(char *name, int len, int arg)
526 {
527 0 switch (name[5 + 0]) {
528 0 case 'I':
529 0 return constant__SC_AI(name, len, arg);
530 0 case 'R':
531 0 ▶ if (strEQ(name + 5, "RG_MAX")) { /* _SC_A removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "RG_MAX")) { /* _SC_A removed */ 0 0 0
532 #ifdef _SC_ARG_MAX
533 0 return _SC_ARG_MAX;
534 #else
535 goto not_there;
536 #endif
537 }
538 case 'S':
539 0 ▶ if (strEQ(name + 5, "SYNCHRONOUS_IO")) { /* _SC_A removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "SYNCHRONOUS_IO")) { /* _SC_A removed */ 0 0 0
540 #ifdef _SC_ASYNCHRONOUS_IO
541 0 return _SC_ASYNCHRONOUS_IO;
542 #else
543 goto not_there;
544 #endif
545 }
546 case 'T':
547 0 ▶ if (strEQ(name + 5, "TEXIT_MAX")) { /* _SC_A removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "TEXIT_MAX")) { /* _SC_A removed */ 0 0 0
548 #ifdef _SC_ATEXIT_MAX
549 0 return _SC_ATEXIT_MAX;
550 #else
551 goto not_there;
552 #endif
553 }
554 case 'V':
555 0 ▶ if (strEQ(name + 5, "VPHYS_PAGES")) { /* _SC_A removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "VPHYS_PAGES")) { /* _SC_A removed */ 0 0 0
556 #ifdef _SC_AVPHYS_PAGES
557 0 return _SC_AVPHYS_PAGES;
558 #else
559 goto not_there;
560 #endif
561 }
562 }
563 0 errno = EINVAL;
564 0 return 0;
565  
566 not_there:
567 errno = ENOENT;
568 return 0;
569 }
570  
571 static double
572 0 constant__SC_BC_S(char *name, int len, int arg)
573 {
574 0 switch (name[8 + 0]) {
575 0 case 'C':
576 0 ▶ if (strEQ(name + 8, "CALE_MAX")) { /* _SC_BC_S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "CALE_MAX")) { /* _SC_BC_S removed */ 0 0 0
577 #ifdef _SC_BC_SCALE_MAX
578 0 return _SC_BC_SCALE_MAX;
579 #else
580 goto not_there;
581 #endif
582 }
583 case 'T':
584 0 ▶ if (strEQ(name + 8, "TRING_MAX")) { /* _SC_BC_S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "TRING_MAX")) { /* _SC_BC_S removed */ 0 0 0
585 #ifdef _SC_BC_STRING_MAX
586 0 return _SC_BC_STRING_MAX;
587 #else
588 goto not_there;
589 #endif
590 }
591 }
592 0 errno = EINVAL;
593 0 return 0;
594  
595 not_there:
596 errno = ENOENT;
597 return 0;
598 }
599  
600 static double
601 0 constant__SC_B(char *name, int len, int arg)
602 {
603 0 ▶ if (5 + 2 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (5 + 2 >= len ) { 0 0 0
604 0 errno = EINVAL;
605 0 return 0;
606 }
607 0 switch (name[5 + 2]) {
608 0 case 'B':
609 0 ▶ if (strEQ(name + 5, "C_BASE_MAX")) { /* _SC_B removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "C_BASE_MAX")) { /* _SC_B removed */ 0 0 0
610 #ifdef _SC_BC_BASE_MAX
611 0 return _SC_BC_BASE_MAX;
612 #else
613 goto not_there;
614 #endif
615 }
616 case 'D':
617 0 ▶ if (strEQ(name + 5, "C_DIM_MAX")) { /* _SC_B removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "C_DIM_MAX")) { /* _SC_B removed */ 0 0 0
618 #ifdef _SC_BC_DIM_MAX
619 0 return _SC_BC_DIM_MAX;
620 #else
621 goto not_there;
622 #endif
623 }
624 case 'S':
625 0 ▶ if (!strnEQ(name + 5,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 5,"C_", 2)) 0 0 0
626 0 break;
627 0 return constant__SC_BC_S(name, len, arg);
628 }
629 0 errno = EINVAL;
630 0 return 0;
631  
632 not_there:
633 errno = ENOENT;
634 return 0;
635 }
636  
637 static double
638 0 constant__SC_CO(char *name, int len, int arg)
639 {
640 0 switch (name[6 + 0]) {
641 0 case 'H':
642 0 ▶ if (strEQ(name + 6, "HER_BLKSZ")) { /* _SC_CO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "HER_BLKSZ")) { /* _SC_CO removed */ 0 0 0
643 #ifdef _SC_COHER_BLKSZ
644 return _SC_COHER_BLKSZ;
645 #else
646 0 goto not_there;
647 #endif
648 }
649 case 'L':
650 0 ▶ if (strEQ(name + 6, "LL_WEIGHTS_MAX")) { /* _SC_CO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "LL_WEIGHTS_MAX")) { /* _SC_CO removed */ 0 0 0
651 #ifdef _SC_COLL_WEIGHTS_MAX
652 0 return _SC_COLL_WEIGHTS_MAX;
653 #else
654 goto not_there;
655 #endif
656 }
657 }
658 0 errno = EINVAL;
659 0 return 0;
660  
661 0 not_there:
662 0 errno = ENOENT;
663 0 return 0;
664 }
665  
666 static double
667 1 constant__SC_C(char *name, int len, int arg)
668 {
669 1 switch (name[5 + 0]) {
670 0 case 'H':
671 0 ▶ if (strEQ(name + 5, "HILD_MAX")) { /* _SC_C removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "HILD_MAX")) { /* _SC_C removed */ 0 0 0
672 #ifdef _SC_CHILD_MAX
673 0 return _SC_CHILD_MAX;
674 #else
675 goto not_there;
676 #endif
677 }
678 case 'L':
679 1 ▶ if (strEQ(name + 5, "LK_TCK")) { /* _SC_C removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "LK_TCK")) { /* _SC_C removed */ 1 0 1
680 #ifdef _SC_CLK_TCK
681 1 return _SC_CLK_TCK;
682 #else
683 goto not_there;
684 #endif
685 }
686 case 'O':
687 0 return constant__SC_CO(name, len, arg);
688 }
689 0 errno = EINVAL;
690 0 return 0;
691  
692 not_there:
693 errno = ENOENT;
694 return 0;
695 }
696  
697 static double
698 0 constant__SC_DC(char *name, int len, int arg)
699 {
700 0 ▶ if (6 + 5 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 5 >= len ) { 0 0 0
701 0 errno = EINVAL;
702 0 return 0;
703 }
704 0 switch (name[6 + 5]) {
705 0 case 'A':
706 0 ▶ if (strEQ(name + 6, "ACHE_ASSOC")) { /* _SC_DC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ACHE_ASSOC")) { /* _SC_DC removed */ 0 0 0
707 #ifdef _SC_DCACHE_ASSOC
708 return _SC_DCACHE_ASSOC;
709 #else
710 0 goto not_there;
711 #endif
712 }
713 case 'B':
714 0 ▶ if (strEQ(name + 6, "ACHE_BLKSZ")) { /* _SC_DC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ACHE_BLKSZ")) { /* _SC_DC removed */ 0 0 0
715 #ifdef _SC_DCACHE_BLKSZ
716 return _SC_DCACHE_BLKSZ;
717 #else
718 0 goto not_there;
719 #endif
720 }
721 case 'L':
722 0 ▶ if (strEQ(name + 6, "ACHE_LINESZ")) { /* _SC_DC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ACHE_LINESZ")) { /* _SC_DC removed */ 0 0 0
723 #ifdef _SC_DCACHE_LINESZ
724 return _SC_DCACHE_LINESZ;
725 #else
726 0 goto not_there;
727 #endif
728 }
729 case 'S':
730 0 ▶ if (strEQ(name + 6, "ACHE_SZ")) { /* _SC_DC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ACHE_SZ")) { /* _SC_DC removed */ 0 0 0
731 #ifdef _SC_DCACHE_SZ
732 return _SC_DCACHE_SZ;
733 #else
734 0 goto not_there;
735 #endif
736 }
737 case 'T':
738 0 ▶ if (strEQ(name + 6, "ACHE_TBLKSZ")) { /* _SC_DC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ACHE_TBLKSZ")) { /* _SC_DC removed */ 0 0 0
739 #ifdef _SC_DCACHE_TBLKSZ
740 return _SC_DCACHE_TBLKSZ;
741 #else
742 0 goto not_there;
743 #endif
744 }
745 }
746 0 errno = EINVAL;
747 0 return 0;
748  
749 0 not_there:
750 0 errno = ENOENT;
751 0 return 0;
752 }
753  
754 static double
755 0 constant__SC_D(char *name, int len, int arg)
756 {
757 0 switch (name[5 + 0]) {
758 0 case 'C':
759 0 return constant__SC_DC(name, len, arg);
760 0 case 'E':
761 0 ▶ if (strEQ(name + 5, "ELAYTIMER_MAX")) { /* _SC_D removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "ELAYTIMER_MAX")) { /* _SC_D removed */ 0 0 0
762 #ifdef _SC_DELAYTIMER_MAX
763 0 return _SC_DELAYTIMER_MAX;
764 #else
765 goto not_there;
766 #endif
767 }
768 }
769 0 errno = EINVAL;
770 0 return 0;
771  
772 not_there:
773 errno = ENOENT;
774 return 0;
775 }
776  
777 static double
778 0 constant__SC_G(char *name, int len, int arg)
779 {
780 0 ▶ if (5 + 2 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (5 + 2 >= len ) { 0 0 0
781 0 errno = EINVAL;
782 0 return 0;
783 }
784 0 switch (name[5 + 2]) {
785 0 case 'G':
786 0 ▶ if (strEQ(name + 5, "ETGR_R_SIZE_MAX")) { /* _SC_G removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "ETGR_R_SIZE_MAX")) { /* _SC_G removed */ 0 0 0
787 #ifdef _SC_GETGR_R_SIZE_MAX
788 0 return _SC_GETGR_R_SIZE_MAX;
789 #else
790 goto not_there;
791 #endif
792 }
793 case 'P':
794 0 ▶ if (strEQ(name + 5, "ETPW_R_SIZE_MAX")) { /* _SC_G removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "ETPW_R_SIZE_MAX")) { /* _SC_G removed */ 0 0 0
795 #ifdef _SC_GETPW_R_SIZE_MAX
796 0 return _SC_GETPW_R_SIZE_MAX;
797 #else
798 goto not_there;
799 #endif
800 }
801 }
802 0 errno = EINVAL;
803 0 return 0;
804  
805 not_there:
806 errno = ENOENT;
807 return 0;
808 }
809  
810 static double
811 0 constant__SC_IC(char *name, int len, int arg)
812 {
813 0 ▶ if (6 + 5 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 5 >= len ) { 0 0 0
814 0 errno = EINVAL;
815 0 return 0;
816 }
817 0 switch (name[6 + 5]) {
818 0 case 'A':
819 0 ▶ if (strEQ(name + 6, "ACHE_ASSOC")) { /* _SC_IC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ACHE_ASSOC")) { /* _SC_IC removed */ 0 0 0
820 #ifdef _SC_ICACHE_ASSOC
821 return _SC_ICACHE_ASSOC;
822 #else
823 0 goto not_there;
824 #endif
825 }
826 case 'B':
827 0 ▶ if (strEQ(name + 6, "ACHE_BLKSZ")) { /* _SC_IC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ACHE_BLKSZ")) { /* _SC_IC removed */ 0 0 0
828 #ifdef _SC_ICACHE_BLKSZ
829 return _SC_ICACHE_BLKSZ;
830 #else
831 0 goto not_there;
832 #endif
833 }
834 case 'L':
835 0 ▶ if (strEQ(name + 6, "ACHE_LINESZ")) { /* _SC_IC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ACHE_LINESZ")) { /* _SC_IC removed */ 0 0 0
836 #ifdef _SC_ICACHE_LINESZ
837 return _SC_ICACHE_LINESZ;
838 #else
839 0 goto not_there;
840 #endif
841 }
842 case 'S':
843 0 ▶ if (strEQ(name + 6, "ACHE_SZ")) { /* _SC_IC removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ACHE_SZ")) { /* _SC_IC removed */ 0 0 0
844 #ifdef _SC_ICACHE_SZ
845 return _SC_ICACHE_SZ;
846 #else
847 0 goto not_there;
848 #endif
849 }
850 }
851 0 errno = EINVAL;
852 0 return 0;
853  
854 0 not_there:
855 0 errno = ENOENT;
856 0 return 0;
857 }
858  
859 static double
860 0 constant__SC_I(char *name, int len, int arg)
861 {
862 0 switch (name[5 + 0]) {
863 0 case 'C':
864 0 return constant__SC_IC(name, len, arg);
865 0 case 'O':
866 0 ▶ if (strEQ(name + 5, "OV_MAX")) { /* _SC_I removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "OV_MAX")) { /* _SC_I removed */ 0 0 0
867 #ifdef _SC_IOV_MAX
868 0 return _SC_IOV_MAX;
869 #else
870 goto not_there;
871 #endif
872 }
873 }
874 0 errno = EINVAL;
875 0 return 0;
876  
877 not_there:
878 errno = ENOENT;
879 return 0;
880 }
881  
882 static double
883 0 constant__SC_LO(char *name, int len, int arg)
884 {
885 0 ▶ if (6 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 1 >= len ) { 0 0 0
886 0 errno = EINVAL;
887 0 return 0;
888 }
889 0 switch (name[6 + 1]) {
890 0 case 'I':
891 0 ▶ if (strEQ(name + 6, "GIN_NAME_MAX")) { /* _SC_LO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "GIN_NAME_MAX")) { /* _SC_LO removed */ 0 0 0
892 #ifdef _SC_LOGIN_NAME_MAX
893 0 return _SC_LOGIN_NAME_MAX;
894 #else
895 goto not_there;
896 #endif
897 }
898 case 'N':
899 0 ▶ if (strEQ(name + 6, "GNAME_MAX")) { /* _SC_LO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "GNAME_MAX")) { /* _SC_LO removed */ 0 0 0
900 #ifdef _SC_LOGNAME_MAX
901 return _SC_LOGNAME_MAX;
902 #else
903 0 goto not_there;
904 #endif
905 }
906 }
907 0 errno = EINVAL;
908 0 return 0;
909  
910 0 not_there:
911 0 errno = ENOENT;
912 0 return 0;
913 }
914  
915 static double
916 0 constant__SC_L(char *name, int len, int arg)
917 {
918 0 switch (name[5 + 0]) {
919 0 case 'I':
920 0 ▶ if (strEQ(name + 5, "INE_MAX")) { /* _SC_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "INE_MAX")) { /* _SC_L removed */ 0 0 0
921 #ifdef _SC_LINE_MAX
922 0 return _SC_LINE_MAX;
923 #else
924 goto not_there;
925 #endif
926 }
927 case 'O':
928 0 return constant__SC_LO(name, len, arg);
929 }
930 0 errno = EINVAL;
931 0 return 0;
932  
933 not_there:
934 errno = ENOENT;
935 return 0;
936 }
937  
938 static double
939 0 constant__SC_MQ(char *name, int len, int arg)
940 {
941 0 ▶ if (6 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 1 >= len ) { 0 0 0
942 0 errno = EINVAL;
943 0 return 0;
944 }
945 0 switch (name[6 + 1]) {
946 0 case 'O':
947 0 ▶ if (strEQ(name + 6, "_OPEN_MAX")) { /* _SC_MQ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "_OPEN_MAX")) { /* _SC_MQ removed */ 0 0 0
948 #ifdef _SC_MQ_OPEN_MAX
949 0 return _SC_MQ_OPEN_MAX;
950 #else
951 goto not_there;
952 #endif
953 }
954 case 'P':
955 0 ▶ if (strEQ(name + 6, "_PRIO_MAX")) { /* _SC_MQ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "_PRIO_MAX")) { /* _SC_MQ removed */ 0 0 0
956 #ifdef _SC_MQ_PRIO_MAX
957 0 return _SC_MQ_PRIO_MAX;
958 #else
959 goto not_there;
960 #endif
961 }
962 }
963 0 errno = EINVAL;
964 0 return 0;
965  
966 not_there:
967 errno = ENOENT;
968 return 0;
969 }
970  
971 static double
972 0 constant__SC_MA(char *name, int len, int arg)
973 {
974 0 switch (name[6 + 0]) {
975 0 case 'P':
976 0 ▶ if (strEQ(name + 6, "PPED_FILES")) { /* _SC_MA removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "PPED_FILES")) { /* _SC_MA removed */ 0 0 0
977 #ifdef _SC_MAPPED_FILES
978 0 return _SC_MAPPED_FILES;
979 #else
980 goto not_there;
981 #endif
982 }
983 case 'X':
984 0 ▶ if (strEQ(name + 6, "XPID")) { /* _SC_MA removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "XPID")) { /* _SC_MA removed */ 0 0 0
985 #ifdef _SC_MAXPID
986 return _SC_MAXPID;
987 #else
988 0 goto not_there;
989 #endif
990 }
991 }
992 0 errno = EINVAL;
993 0 return 0;
994  
995 0 not_there:
996 0 errno = ENOENT;
997 0 return 0;
998 }
999  
1000 static double
1001 0 constant__SC_MEML(char *name, int len, int arg)
1002 {
1003 0 ▶ if (8 + 3 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (8 + 3 >= len ) { 0 0 0
1004 0 errno = EINVAL;
1005 0 return 0;
1006 }
1007 0 switch (name[8 + 3]) {
1008 0 case '\0':
1009 0 ▶ if (strEQ(name + 8, "OCK")) { /* _SC_MEML removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "OCK")) { /* _SC_MEML removed */ 0 0 0
1010 #ifdef _SC_MEMLOCK
1011 0 return _SC_MEMLOCK;
1012 #else
1013 goto not_there;
1014 #endif
1015 }
1016 case '_':
1017 0 ▶ if (strEQ(name + 8, "OCK_RANGE")) { /* _SC_MEML removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "OCK_RANGE")) { /* _SC_MEML removed */ 0 0 0
1018 #ifdef _SC_MEMLOCK_RANGE
1019 0 return _SC_MEMLOCK_RANGE;
1020 #else
1021 goto not_there;
1022 #endif
1023 }
1024 }
1025 0 errno = EINVAL;
1026 0 return 0;
1027  
1028 not_there:
1029 errno = ENOENT;
1030 return 0;
1031 }
1032  
1033 static double
1034 0 constant__SC_MEM(char *name, int len, int arg)
1035 {
1036 0 switch (name[7 + 0]) {
1037 0 case 'L':
1038 0 return constant__SC_MEML(name, len, arg);
1039 0 case 'O':
1040 0 ▶ if (strEQ(name + 7, "ORY_PROTECTION")) { /* _SC_MEM removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 7, "ORY_PROTECTION")) { /* _SC_MEM removed */ 0 0 0
1041 #ifdef _SC_MEMORY_PROTECTION
1042 0 return _SC_MEMORY_PROTECTION;
1043 #else
1044 goto not_there;
1045 #endif
1046 }
1047 }
1048 0 errno = EINVAL;
1049 0 return 0;
1050  
1051 not_there:
1052 errno = ENOENT;
1053 return 0;
1054 }
1055  
1056 static double
1057 0 constant__SC_ME(char *name, int len, int arg)
1058 {
1059 0 switch (name[6 + 0]) {
1060 0 case 'M':
1061 0 return constant__SC_MEM(name, len, arg);
1062 0 case 'S':
1063 0 ▶ if (strEQ(name + 6, "SSAGE_PASSING")) { /* _SC_ME removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "SSAGE_PASSING")) { /* _SC_ME removed */ 0 0 0
1064 #ifdef _SC_MESSAGE_PASSING
1065 0 return _SC_MESSAGE_PASSING;
1066 #else
1067 goto not_there;
1068 #endif
1069 }
1070 }
1071 0 errno = EINVAL;
1072 0 return 0;
1073  
1074 not_there:
1075 errno = ENOENT;
1076 return 0;
1077 }
1078  
1079 static double
1080 0 constant__SC_M(char *name, int len, int arg)
1081 {
1082 0 switch (name[5 + 0]) {
1083 0 case 'A':
1084 0 return constant__SC_MA(name, len, arg);
1085 0 case 'E':
1086 0 return constant__SC_ME(name, len, arg);
1087 0 case 'Q':
1088 0 return constant__SC_MQ(name, len, arg);
1089 }
1090 0 errno = EINVAL;
1091 0 return 0;
1092  
1093 not_there:
1094 errno = ENOENT;
1095 return 0;
1096 }
1097  
1098 static double
1099 0 constant__SC_NP(char *name, int len, int arg)
1100 {
1101 0 ▶ if (6 + 10 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 10 >= len ) { 0 0 0
1102 0 errno = EINVAL;
1103 0 return 0;
1104 }
1105 0 switch (name[6 + 10]) {
1106 0 case 'C':
1107 0 ▶ if (strEQ(name + 6, "ROCESSORS_CONF")) { /* _SC_NP removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ROCESSORS_CONF")) { /* _SC_NP removed */ 0 0 0
1108 #ifdef _SC_NPROCESSORS_CONF
1109 0 return _SC_NPROCESSORS_CONF;
1110 #else
1111 goto not_there;
1112 #endif
1113 }
1114 case 'O':
1115 0 ▶ if (strEQ(name + 6, "ROCESSORS_ONLN")) { /* _SC_NP removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ROCESSORS_ONLN")) { /* _SC_NP removed */ 0 0 0
1116 #ifdef _SC_NPROCESSORS_ONLN
1117 0 return _SC_NPROCESSORS_ONLN;
1118 #else
1119 goto not_there;
1120 #endif
1121 }
1122 }
1123 0 errno = EINVAL;
1124 0 return 0;
1125  
1126 not_there:
1127 errno = ENOENT;
1128 return 0;
1129 }
1130  
1131 static double
1132 0 constant__SC_N(char *name, int len, int arg)
1133 {
1134 0 switch (name[5 + 0]) {
1135 0 case 'G':
1136 0 ▶ if (strEQ(name + 5, "GROUPS_MAX")) { /* _SC_N removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "GROUPS_MAX")) { /* _SC_N removed */ 0 0 0
1137 #ifdef _SC_NGROUPS_MAX
1138 0 return _SC_NGROUPS_MAX;
1139 #else
1140 goto not_there;
1141 #endif
1142 }
1143 case 'P':
1144 0 return constant__SC_NP(name, len, arg);
1145 }
1146 0 errno = EINVAL;
1147 0 return 0;
1148  
1149 not_there:
1150 errno = ENOENT;
1151 return 0;
1152 }
1153  
1154 static double
1155 1 constant__SC_PAG(char *name, int len, int arg)
1156 {
1157 1 ▶ if (7 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (7 + 1 >= len ) { 0 1 1
1158 0 errno = EINVAL;
1159 0 return 0;
1160 }
1161 1 switch (name[7 + 1]) {
1162 0 case 'S':
1163 0 ▶ if (strEQ(name + 7, "ESIZE")) { /* _SC_PAG removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 7, "ESIZE")) { /* _SC_PAG removed */ 0 0 0
1164 #ifdef _SC_PAGESIZE
1165 0 return _SC_PAGESIZE;
1166 #else
1167 goto not_there;
1168 #endif
1169 }
1170 case '_':
1171 1 ▶ if (strEQ(name + 7, "E_SIZE")) { /* _SC_PAG removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 7, "E_SIZE")) { /* _SC_PAG removed */ 1 0 1
1172 #ifdef _SC_PAGE_SIZE
1173 1 return _SC_PAGE_SIZE;
1174 #else
1175 goto not_there;
1176 #endif
1177 }
1178 }
1179 0 errno = EINVAL;
1180 0 return 0;
1181  
1182 not_there:
1183 errno = ENOENT;
1184 return 0;
1185 }
1186  
1187 static double
1188 1 constant__SC_PA(char *name, int len, int arg)
1189 {
1190 1 switch (name[6 + 0]) {
1191 1 case 'G':
1192 1 return constant__SC_PAG(name, len, arg);
1193 0 case 'S':
1194 0 ▶ if (strEQ(name + 6, "SS_MAX")) { /* _SC_PA removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "SS_MAX")) { /* _SC_PA removed */ 0 0 0
1195 #ifdef _SC_PASS_MAX
1196 0 return _SC_PASS_MAX;
1197 #else
1198 goto not_there;
1199 #endif
1200 }
1201 }
1202 0 errno = EINVAL;
1203 0 return 0;
1204  
1205 not_there:
1206 errno = ENOENT;
1207 return 0;
1208 }
1209  
1210 static double
1211 0 constant__SC_PR(char *name, int len, int arg)
1212 {
1213 0 ▶ if (6 + 5 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 5 >= len ) { 0 0 0
1214 0 errno = EINVAL;
1215 0 return 0;
1216 }
1217 0 switch (name[6 + 5]) {
1218 0 case 'I':
1219 0 ▶ if (strEQ(name + 6, "IORITIZED_IO")) { /* _SC_PR removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "IORITIZED_IO")) { /* _SC_PR removed */ 0 0 0
1220 #ifdef _SC_PRIORITIZED_IO
1221 0 return _SC_PRIORITIZED_IO;
1222 #else
1223 goto not_there;
1224 #endif
1225 }
1226 case 'Y':
1227 0 ▶ if (strEQ(name + 6, "IORITY_SCHEDULING")) { /* _SC_PR removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "IORITY_SCHEDULING")) { /* _SC_PR removed */ 0 0 0
1228 #ifdef _SC_PRIORITY_SCHEDULING
1229 0 return _SC_PRIORITY_SCHEDULING;
1230 #else
1231 goto not_there;
1232 #endif
1233 }
1234 }
1235 0 errno = EINVAL;
1236 0 return 0;
1237  
1238 not_there:
1239 errno = ENOENT;
1240 return 0;
1241 }
1242  
1243 static double
1244 1 constant__SC_P(char *name, int len, int arg)
1245 {
1246 1 switch (name[5 + 0]) {
1247 1 case 'A':
1248 1 return constant__SC_PA(name, len, arg);
1249 0 case 'H':
1250 0 ▶ if (strEQ(name + 5, "HYS_PAGES")) { /* _SC_P removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "HYS_PAGES")) { /* _SC_P removed */ 0 0 0
1251 #ifdef _SC_PHYS_PAGES
1252 0 return _SC_PHYS_PAGES;
1253 #else
1254 goto not_there;
1255 #endif
1256 }
1257 case 'R':
1258 0 return constant__SC_PR(name, len, arg);
1259 }
1260 0 errno = EINVAL;
1261 0 return 0;
1262  
1263 not_there:
1264 errno = ENOENT;
1265 return 0;
1266 }
1267  
1268 static double
1269 0 constant__SC_2_F(char *name, int len, int arg)
1270 {
1271 0 ▶ if (7 + 4 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (7 + 4 >= len ) { 0 0 0
1272 0 errno = EINVAL;
1273 0 return 0;
1274 }
1275 0 switch (name[7 + 4]) {
1276 0 case 'D':
1277 0 ▶ if (strEQ(name + 7, "ORT_DEV")) { /* _SC_2_F removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 7, "ORT_DEV")) { /* _SC_2_F removed */ 0 0 0
1278 #ifdef _SC_2_FORT_DEV
1279 0 return _SC_2_FORT_DEV;
1280 #else
1281 goto not_there;
1282 #endif
1283 }
1284 case 'R':
1285 0 ▶ if (strEQ(name + 7, "ORT_RUN")) { /* _SC_2_F removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 7, "ORT_RUN")) { /* _SC_2_F removed */ 0 0 0
1286 #ifdef _SC_2_FORT_RUN
1287 0 return _SC_2_FORT_RUN;
1288 #else
1289 goto not_there;
1290 #endif
1291 }
1292 }
1293 0 errno = EINVAL;
1294 0 return 0;
1295  
1296 not_there:
1297 errno = ENOENT;
1298 return 0;
1299 }
1300  
1301 static double
1302 0 constant__SC_2_C_(char *name, int len, int arg)
1303 {
1304 0 switch (name[8 + 0]) {
1305 0 case 'B':
1306 0 ▶ if (strEQ(name + 8, "BIND")) { /* _SC_2_C_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "BIND")) { /* _SC_2_C_ removed */ 0 0 0
1307 #ifdef _SC_2_C_BIND
1308 0 return _SC_2_C_BIND;
1309 #else
1310 goto not_there;
1311 #endif
1312 }
1313 case 'D':
1314 0 ▶ if (strEQ(name + 8, "DEV")) { /* _SC_2_C_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "DEV")) { /* _SC_2_C_ removed */ 0 0 0
1315 #ifdef _SC_2_C_DEV
1316 0 return _SC_2_C_DEV;
1317 #else
1318 goto not_there;
1319 #endif
1320 }
1321 case 'V':
1322 0 ▶ if (strEQ(name + 8, "VERSION")) { /* _SC_2_C_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "VERSION")) { /* _SC_2_C_ removed */ 0 0 0
1323 #ifdef _SC_2_C_VERSION
1324 0 return _SC_2_C_VERSION;
1325 #else
1326 goto not_there;
1327 #endif
1328 }
1329 }
1330 0 errno = EINVAL;
1331 0 return 0;
1332  
1333 not_there:
1334 errno = ENOENT;
1335 return 0;
1336 }
1337  
1338 static double
1339 0 constant__SC_2_C(char *name, int len, int arg)
1340 {
1341 0 switch (name[7 + 0]) {
1342 0 case 'H':
1343 0 ▶ if (strEQ(name + 7, "HAR_TERM")) { /* _SC_2_C removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 7, "HAR_TERM")) { /* _SC_2_C removed */ 0 0 0
1344 #ifdef _SC_2_CHAR_TERM
1345 0 return _SC_2_CHAR_TERM;
1346 #else
1347 goto not_there;
1348 #endif
1349 }
1350 case '_':
1351 0 return constant__SC_2_C_(name, len, arg);
1352 }
1353 0 errno = EINVAL;
1354 0 return 0;
1355  
1356 not_there:
1357 errno = ENOENT;
1358 return 0;
1359 }
1360  
1361 static double
1362 0 constant__SC_2(char *name, int len, int arg)
1363 {
1364 0 ▶ if (5 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (5 + 1 >= len ) { 0 0 0
1365 0 errno = EINVAL;
1366 0 return 0;
1367 }
1368 0 switch (name[5 + 1]) {
1369 0 case 'C':
1370 0 ▶ if (!strnEQ(name + 5,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 5,"_", 1)) 0 0 0
1371 0 break;
1372 0 return constant__SC_2_C(name, len, arg);
1373 0 case 'F':
1374 0 ▶ if (!strnEQ(name + 5,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 5,"_", 1)) 0 0 0
1375 0 break;
1376 0 return constant__SC_2_F(name, len, arg);
1377 0 case 'L':
1378 0 ▶ if (strEQ(name + 5, "_LOCALEDEF")) { /* _SC_2 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "_LOCALEDEF")) { /* _SC_2 removed */ 0 0 0
1379 #ifdef _SC_2_LOCALEDEF
1380 0 return _SC_2_LOCALEDEF;
1381 #else
1382 goto not_there;
1383 #endif
1384 }
1385 case 'S':
1386 0 ▶ if (strEQ(name + 5, "_SW_DEV")) { /* _SC_2 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "_SW_DEV")) { /* _SC_2 removed */ 0 0 0
1387 #ifdef _SC_2_SW_DEV
1388 0 return _SC_2_SW_DEV;
1389 #else
1390 goto not_there;
1391 #endif
1392 }
1393 case 'U':
1394 0 ▶ if (strEQ(name + 5, "_UPE")) { /* _SC_2 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "_UPE")) { /* _SC_2 removed */ 0 0 0
1395 #ifdef _SC_2_UPE
1396 0 return _SC_2_UPE;
1397 #else
1398 goto not_there;
1399 #endif
1400 }
1401 case 'V':
1402 0 ▶ if (strEQ(name + 5, "_VERSION")) { /* _SC_2 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "_VERSION")) { /* _SC_2 removed */ 0 0 0
1403 #ifdef _SC_2_VERSION
1404 0 return _SC_2_VERSION;
1405 #else
1406 goto not_there;
1407 #endif
1408 }
1409 }
1410 0 errno = EINVAL;
1411 0 return 0;
1412  
1413 not_there:
1414 errno = ENOENT;
1415 return 0;
1416 }
1417  
1418 static double
1419 0 constant__SC_RE(char *name, int len, int arg)
1420 {
1421 0 switch (name[6 + 0]) {
1422 0 case 'A':
1423 0 ▶ if (strEQ(name + 6, "ALTIME_SIGNALS")) { /* _SC_RE removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ALTIME_SIGNALS")) { /* _SC_RE removed */ 0 0 0
1424 #ifdef _SC_REALTIME_SIGNALS
1425 0 return _SC_REALTIME_SIGNALS;
1426 #else
1427 goto not_there;
1428 #endif
1429 }
1430 case '_':
1431 0 ▶ if (strEQ(name + 6, "_DUP_MAX")) { /* _SC_RE removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "_DUP_MAX")) { /* _SC_RE removed */ 0 0 0
1432 #ifdef _SC_RE_DUP_MAX
1433 0 return _SC_RE_DUP_MAX;
1434 #else
1435 goto not_there;
1436 #endif
1437 }
1438 }
1439 0 errno = EINVAL;
1440 0 return 0;
1441  
1442 not_there:
1443 errno = ENOENT;
1444 return 0;
1445 }
1446  
1447 static double
1448 0 constant__SC_R(char *name, int len, int arg)
1449 {
1450 0 switch (name[5 + 0]) {
1451 0 case 'E':
1452 0 return constant__SC_RE(name, len, arg);
1453 0 case 'T':
1454 0 ▶ if (strEQ(name + 5, "TSIG_MAX")) { /* _SC_R removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "TSIG_MAX")) { /* _SC_R removed */ 0 0 0
1455 #ifdef _SC_RTSIG_MAX
1456 0 return _SC_RTSIG_MAX;
1457 #else
1458 goto not_there;
1459 #endif
1460 }
1461 }
1462 0 errno = EINVAL;
1463 0 return 0;
1464  
1465 not_there:
1466 errno = ENOENT;
1467 return 0;
1468 }
1469  
1470 static double
1471 0 constant__SC_SIGR(char *name, int len, int arg)
1472 {
1473 0 ▶ if (8 + 3 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (8 + 3 >= len ) { 0 0 0
1474 0 errno = EINVAL;
1475 0 return 0;
1476 }
1477 0 switch (name[8 + 3]) {
1478 0 case 'A':
1479 0 ▶ if (strEQ(name + 8, "T_MAX")) { /* _SC_SIGR removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "T_MAX")) { /* _SC_SIGR removed */ 0 0 0
1480 #ifdef _SC_SIGRT_MAX
1481 return _SC_SIGRT_MAX;
1482 #else
1483 0 goto not_there;
1484 #endif
1485 }
1486 case 'I':
1487 0 ▶ if (strEQ(name + 8, "T_MIN")) { /* _SC_SIGR removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "T_MIN")) { /* _SC_SIGR removed */ 0 0 0
1488 #ifdef _SC_SIGRT_MIN
1489 return _SC_SIGRT_MIN;
1490 #else
1491 0 goto not_there;
1492 #endif
1493 }
1494 }
1495 0 errno = EINVAL;
1496 0 return 0;
1497  
1498 0 not_there:
1499 0 errno = ENOENT;
1500 0 return 0;
1501 }
1502  
1503 static double
1504 0 constant__SC_SI(char *name, int len, int arg)
1505 {
1506 0 ▶ if (6 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 1 >= len ) { 0 0 0
1507 0 errno = EINVAL;
1508 0 return 0;
1509 }
1510 0 switch (name[6 + 1]) {
1511 0 case 'Q':
1512 0 ▶ if (strEQ(name + 6, "GQUEUE_MAX")) { /* _SC_SI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "GQUEUE_MAX")) { /* _SC_SI removed */ 0 0 0
1513 #ifdef _SC_SIGQUEUE_MAX
1514 0 return _SC_SIGQUEUE_MAX;
1515 #else
1516 goto not_there;
1517 #endif
1518 }
1519 case 'R':
1520 0 ▶ if (!strnEQ(name + 6,"G", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 6,"G", 1)) 0 0 0
1521 0 break;
1522 0 return constant__SC_SIGR(name, len, arg);
1523 }
1524 0 errno = EINVAL;
1525 0 return 0;
1526  
1527 not_there:
1528 errno = ENOENT;
1529 return 0;
1530 }
1531  
1532 static double
1533 0 constant__SC_ST(char *name, int len, int arg)
1534 {
1535 0 switch (name[6 + 0]) {
1536 0 case 'A':
1537 0 ▶ if (strEQ(name + 6, "ACK_PROT")) { /* _SC_ST removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "ACK_PROT")) { /* _SC_ST removed */ 0 0 0
1538 #ifdef _SC_STACK_PROT
1539 return _SC_STACK_PROT;
1540 #else
1541 0 goto not_there;
1542 #endif
1543 }
1544 case 'R':
1545 0 ▶ if (strEQ(name + 6, "REAM_MAX")) { /* _SC_ST removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "REAM_MAX")) { /* _SC_ST removed */ 0 0 0
1546 #ifdef _SC_STREAM_MAX
1547 0 return _SC_STREAM_MAX;
1548 #else
1549 goto not_there;
1550 #endif
1551 }
1552 }
1553 0 errno = EINVAL;
1554 0 return 0;
1555  
1556 0 not_there:
1557 0 errno = ENOENT;
1558 0 return 0;
1559 }
1560  
1561 static double
1562 0 constant__SC_SEM_(char *name, int len, int arg)
1563 {
1564 0 switch (name[8 + 0]) {
1565 0 case 'N':
1566 0 ▶ if (strEQ(name + 8, "NSEMS_MAX")) { /* _SC_SEM_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "NSEMS_MAX")) { /* _SC_SEM_ removed */ 0 0 0
1567 #ifdef _SC_SEM_NSEMS_MAX
1568 0 return _SC_SEM_NSEMS_MAX;
1569 #else
1570 goto not_there;
1571 #endif
1572 }
1573 case 'V':
1574 0 ▶ if (strEQ(name + 8, "VALUE_MAX")) { /* _SC_SEM_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "VALUE_MAX")) { /* _SC_SEM_ removed */ 0 0 0
1575 #ifdef _SC_SEM_VALUE_MAX
1576 0 return _SC_SEM_VALUE_MAX;
1577 #else
1578 goto not_there;
1579 #endif
1580 }
1581 }
1582 0 errno = EINVAL;
1583 0 return 0;
1584  
1585 not_there:
1586 errno = ENOENT;
1587 return 0;
1588 }
1589  
1590 static double
1591 0 constant__SC_SE(char *name, int len, int arg)
1592 {
1593 0 ▶ if (6 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 1 >= len ) { 0 0 0
1594 0 errno = EINVAL;
1595 0 return 0;
1596 }
1597 0 switch (name[6 + 1]) {
1598 0 case 'A':
1599 0 ▶ if (strEQ(name + 6, "MAPHORES")) { /* _SC_SE removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "MAPHORES")) { /* _SC_SE removed */ 0 0 0
1600 #ifdef _SC_SEMAPHORES
1601 0 return _SC_SEMAPHORES;
1602 #else
1603 goto not_there;
1604 #endif
1605 }
1606 case '_':
1607 0 ▶ if (!strnEQ(name + 6,"M", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 6,"M", 1)) 0 0 0
1608 0 break;
1609 0 return constant__SC_SEM_(name, len, arg);
1610 }
1611 0 errno = EINVAL;
1612 0 return 0;
1613  
1614 not_there:
1615 errno = ENOENT;
1616 return 0;
1617 }
1618  
1619 static double
1620 0 constant__SC_S(char *name, int len, int arg)
1621 {
1622 0 switch (name[5 + 0]) {
1623 0 case 'A':
1624 0 ▶ if (strEQ(name + 5, "AVED_IDS")) { /* _SC_S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "AVED_IDS")) { /* _SC_S removed */ 0 0 0
1625 #ifdef _SC_SAVED_IDS
1626 0 return _SC_SAVED_IDS;
1627 #else
1628 goto not_there;
1629 #endif
1630 }
1631 case 'E':
1632 0 return constant__SC_SE(name, len, arg);
1633 0 case 'H':
1634 0 ▶ if (strEQ(name + 5, "HARED_MEMORY_OBJECTS")) { /* _SC_S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "HARED_MEMORY_OBJECTS")) { /* _SC_S removed */ 0 0 0
1635 #ifdef _SC_SHARED_MEMORY_OBJECTS
1636 0 return _SC_SHARED_MEMORY_OBJECTS;
1637 #else
1638 goto not_there;
1639 #endif
1640 }
1641 case 'I':
1642 0 return constant__SC_SI(name, len, arg);
1643 0 case 'P':
1644 0 ▶ if (strEQ(name + 5, "PLIT_CACHE")) { /* _SC_S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "PLIT_CACHE")) { /* _SC_S removed */ 0 0 0
1645 #ifdef _SC_SPLIT_CACHE
1646 return _SC_SPLIT_CACHE;
1647 #else
1648 0 goto not_there;
1649 #endif
1650 }
1651 case 'T':
1652 0 return constant__SC_ST(name, len, arg);
1653 0 case 'Y':
1654 0 ▶ if (strEQ(name + 5, "YNCHRONIZED_IO")) { /* _SC_S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "YNCHRONIZED_IO")) { /* _SC_S removed */ 0 0 0
1655 #ifdef _SC_SYNCHRONIZED_IO
1656 0 return _SC_SYNCHRONIZED_IO;
1657 #else
1658 goto not_there;
1659 #endif
1660 }
1661 }
1662 0 errno = EINVAL;
1663 0 return 0;
1664  
1665 0 not_there:
1666 0 errno = ENOENT;
1667 0 return 0;
1668 }
1669  
1670 static double
1671 0 constant__SC_THREAD_PRIO_(char *name, int len, int arg)
1672 {
1673 0 switch (name[16 + 0]) {
1674 0 case 'I':
1675 0 ▶ if (strEQ(name + 16, "INHERIT")) { /* _SC_THREAD_PRIO_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 16, "INHERIT")) { /* _SC_THREAD_PRIO_ removed */ 0 0 0
1676 #ifdef _SC_THREAD_PRIO_INHERIT
1677 0 return _SC_THREAD_PRIO_INHERIT;
1678 #else
1679 goto not_there;
1680 #endif
1681 }
1682 case 'P':
1683 0 ▶ if (strEQ(name + 16, "PROTECT")) { /* _SC_THREAD_PRIO_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 16, "PROTECT")) { /* _SC_THREAD_PRIO_ removed */ 0 0 0
1684 #ifdef _SC_THREAD_PRIO_PROTECT
1685 0 return _SC_THREAD_PRIO_PROTECT;
1686 #else
1687 goto not_there;
1688 #endif
1689 }
1690 }
1691 0 errno = EINVAL;
1692 0 return 0;
1693  
1694 not_there:
1695 errno = ENOENT;
1696 return 0;
1697 }
1698  
1699 static double
1700 0 constant__SC_THREAD_PRI(char *name, int len, int arg)
1701 {
1702 0 ▶ if (14 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (14 + 1 >= len ) { 0 0 0
1703 0 errno = EINVAL;
1704 0 return 0;
1705 }
1706 0 switch (name[14 + 1]) {
1707 0 case 'R':
1708 0 ▶ if (strEQ(name + 14, "ORITY_SCHEDULING")) { /* _SC_THREAD_PRI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 14, "ORITY_SCHEDULING")) { /* _SC_THREAD_PRI removed */ 0 0 0
1709 #ifdef _SC_THREAD_PRIORITY_SCHEDULING
1710 0 return _SC_THREAD_PRIORITY_SCHEDULING;
1711 #else
1712 goto not_there;
1713 #endif
1714 }
1715 case '_':
1716 0 ▶ if (!strnEQ(name + 14,"O", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 14,"O", 1)) 0 0 0
1717 0 break;
1718 0 return constant__SC_THREAD_PRIO_(name, len, arg);
1719 }
1720 0 errno = EINVAL;
1721 0 return 0;
1722  
1723 not_there:
1724 errno = ENOENT;
1725 return 0;
1726 }
1727  
1728 static double
1729 0 constant__SC_THREAD_P(char *name, int len, int arg)
1730 {
1731 0 ▶ if (12 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (12 + 1 >= len ) { 0 0 0
1732 0 errno = EINVAL;
1733 0 return 0;
1734 }
1735 0 switch (name[12 + 1]) {
1736 0 case 'I':
1737 0 ▶ if (!strnEQ(name + 12,"R", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 12,"R", 1)) 0 0 0
1738 0 break;
1739 0 return constant__SC_THREAD_PRI(name, len, arg);
1740 0 case 'O':
1741 0 ▶ if (strEQ(name + 12, "ROCESS_SHARED")) { /* _SC_THREAD_P removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 12, "ROCESS_SHARED")) { /* _SC_THREAD_P removed */ 0 0 0
1742 #ifdef _SC_THREAD_PROCESS_SHARED
1743 0 return _SC_THREAD_PROCESS_SHARED;
1744 #else
1745 goto not_there;
1746 #endif
1747 }
1748 }
1749 0 errno = EINVAL;
1750 0 return 0;
1751  
1752 not_there:
1753 errno = ENOENT;
1754 return 0;
1755 }
1756  
1757 static double
1758 0 constant__SC_THREAD_A(char *name, int len, int arg)
1759 {
1760 0 ▶ if (12 + 9 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (12 + 9 >= len ) { 0 0 0
1761 0 errno = EINVAL;
1762 0 return 0;
1763 }
1764 0 switch (name[12 + 9]) {
1765 0 case 'A':
1766 0 ▶ if (strEQ(name + 12, "TTR_STACKADDR")) { /* _SC_THREAD_A removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 12, "TTR_STACKADDR")) { /* _SC_THREAD_A removed */ 0 0 0
1767 #ifdef _SC_THREAD_ATTR_STACKADDR
1768 0 return _SC_THREAD_ATTR_STACKADDR;
1769 #else
1770 goto not_there;
1771 #endif
1772 }
1773 case 'S':
1774 0 ▶ if (strEQ(name + 12, "TTR_STACKSIZE")) { /* _SC_THREAD_A removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 12, "TTR_STACKSIZE")) { /* _SC_THREAD_A removed */ 0 0 0
1775 #ifdef _SC_THREAD_ATTR_STACKSIZE
1776 0 return _SC_THREAD_ATTR_STACKSIZE;
1777 #else
1778 goto not_there;
1779 #endif
1780 }
1781 }
1782 0 errno = EINVAL;
1783 0 return 0;
1784  
1785 not_there:
1786 errno = ENOENT;
1787 return 0;
1788 }
1789  
1790 static double
1791 0 constant__SC_THREAD_S(char *name, int len, int arg)
1792 {
1793 0 switch (name[12 + 0]) {
1794 0 case 'A':
1795 0 ▶ if (strEQ(name + 12, "AFE_FUNCTIONS")) { /* _SC_THREAD_S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 12, "AFE_FUNCTIONS")) { /* _SC_THREAD_S removed */ 0 0 0
1796 #ifdef _SC_THREAD_SAFE_FUNCTIONS
1797 0 return _SC_THREAD_SAFE_FUNCTIONS;
1798 #else
1799 goto not_there;
1800 #endif
1801 }
1802 case 'T':
1803 0 ▶ if (strEQ(name + 12, "TACK_MIN")) { /* _SC_THREAD_S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 12, "TACK_MIN")) { /* _SC_THREAD_S removed */ 0 0 0
1804 #ifdef _SC_THREAD_STACK_MIN
1805 0 return _SC_THREAD_STACK_MIN;
1806 #else
1807 goto not_there;
1808 #endif
1809 }
1810 }
1811 0 errno = EINVAL;
1812 0 return 0;
1813  
1814 not_there:
1815 errno = ENOENT;
1816 return 0;
1817 }
1818  
1819 static double
1820 0 constant__SC_THREAD_(char *name, int len, int arg)
1821 {
1822 0 switch (name[11 + 0]) {
1823 0 case 'A':
1824 0 return constant__SC_THREAD_A(name, len, arg);
1825 0 case 'D':
1826 0 ▶ if (strEQ(name + 11, "DESTRUCTOR_ITERATIONS")) { /* _SC_THREAD_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 11, "DESTRUCTOR_ITERATIONS")) { /* _SC_THREAD_ removed */ 0 0 0
1827 #ifdef _SC_THREAD_DESTRUCTOR_ITERATIONS
1828 0 return _SC_THREAD_DESTRUCTOR_ITERATIONS;
1829 #else
1830 goto not_there;
1831 #endif
1832 }
1833 case 'K':
1834 0 ▶ if (strEQ(name + 11, "KEYS_MAX")) { /* _SC_THREAD_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 11, "KEYS_MAX")) { /* _SC_THREAD_ removed */ 0 0 0
1835 #ifdef _SC_THREAD_KEYS_MAX
1836 0 return _SC_THREAD_KEYS_MAX;
1837 #else
1838 goto not_there;
1839 #endif
1840 }
1841 case 'P':
1842 0 return constant__SC_THREAD_P(name, len, arg);
1843 0 case 'S':
1844 0 return constant__SC_THREAD_S(name, len, arg);
1845 0 case 'T':
1846 0 ▶ if (strEQ(name + 11, "THREADS_MAX")) { /* _SC_THREAD_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 11, "THREADS_MAX")) { /* _SC_THREAD_ removed */ 0 0 0
1847 #ifdef _SC_THREAD_THREADS_MAX
1848 0 return _SC_THREAD_THREADS_MAX;
1849 #else
1850 goto not_there;
1851 #endif
1852 }
1853 }
1854 0 errno = EINVAL;
1855 0 return 0;
1856  
1857 not_there:
1858 errno = ENOENT;
1859 return 0;
1860 }
1861  
1862 static double
1863 0 constant__SC_TH(char *name, int len, int arg)
1864 {
1865 0 ▶ if (6 + 4 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 4 >= len ) { 0 0 0
1866 0 errno = EINVAL;
1867 0 return 0;
1868 }
1869 0 switch (name[6 + 4]) {
1870 0 case 'S':
1871 0 ▶ if (strEQ(name + 6, "READS")) { /* _SC_TH removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "READS")) { /* _SC_TH removed */ 0 0 0
1872 #ifdef _SC_THREADS
1873 0 return _SC_THREADS;
1874 #else
1875 goto not_there;
1876 #endif
1877 }
1878 case '_':
1879 0 ▶ if (!strnEQ(name + 6,"READ", 4))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 6,"READ", 4)) 0 0 0
1880 0 break;
1881 0 return constant__SC_THREAD_(name, len, arg);
1882 }
1883 0 errno = EINVAL;
1884 0 return 0;
1885  
1886 not_there:
1887 errno = ENOENT;
1888 return 0;
1889 }
1890  
1891 static double
1892 0 constant__SC_TI(char *name, int len, int arg)
1893 {
1894 0 ▶ if (6 + 3 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 3 >= len ) { 0 0 0
1895 0 errno = EINVAL;
1896 0 return 0;
1897 }
1898 0 switch (name[6 + 3]) {
1899 0 case 'S':
1900 0 ▶ if (strEQ(name + 6, "MERS")) { /* _SC_TI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "MERS")) { /* _SC_TI removed */ 0 0 0
1901 #ifdef _SC_TIMERS
1902 0 return _SC_TIMERS;
1903 #else
1904 goto not_there;
1905 #endif
1906 }
1907 case '_':
1908 0 ▶ if (strEQ(name + 6, "MER_MAX")) { /* _SC_TI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "MER_MAX")) { /* _SC_TI removed */ 0 0 0
1909 #ifdef _SC_TIMER_MAX
1910 0 return _SC_TIMER_MAX;
1911 #else
1912 goto not_there;
1913 #endif
1914 }
1915 }
1916 0 errno = EINVAL;
1917 0 return 0;
1918  
1919 not_there:
1920 errno = ENOENT;
1921 return 0;
1922 }
1923  
1924 static double
1925 0 constant__SC_T(char *name, int len, int arg)
1926 {
1927 0 switch (name[5 + 0]) {
1928 0 case 'H':
1929 0 return constant__SC_TH(name, len, arg);
1930 0 case 'I':
1931 0 return constant__SC_TI(name, len, arg);
1932 0 case 'T':
1933 0 ▶ if (strEQ(name + 5, "TY_NAME_MAX")) { /* _SC_T removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "TY_NAME_MAX")) { /* _SC_T removed */ 0 0 0
1934 #ifdef _SC_TTY_NAME_MAX
1935 0 return _SC_TTY_NAME_MAX;
1936 #else
1937 goto not_there;
1938 #endif
1939 }
1940 case 'Z':
1941 0 ▶ if (strEQ(name + 5, "ZNAME_MAX")) { /* _SC_T removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "ZNAME_MAX")) { /* _SC_T removed */ 0 0 0
1942 #ifdef _SC_TZNAME_MAX
1943 0 return _SC_TZNAME_MAX;
1944 #else
1945 goto not_there;
1946 #endif
1947 }
1948 case '_':
1949 0 ▶ if (strEQ(name + 5, "_IOV_MAX")) { /* _SC_T removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 5, "_IOV_MAX")) { /* _SC_T removed */ 0 0 0
1950 #ifdef _SC_T_IOV_MAX
1951 0 return _SC_T_IOV_MAX;
1952 #else
1953 goto not_there;
1954 #endif
1955 }
1956 }
1957 0 errno = EINVAL;
1958 0 return 0;
1959  
1960 not_there:
1961 errno = ENOENT;
1962 return 0;
1963 }
1964  
1965 static double
1966 0 constant__SC_XOPEN_R(char *name, int len, int arg)
1967 {
1968 0 ▶ if (11 + 7 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (11 + 7 >= len ) { 0 0 0
1969 0 errno = EINVAL;
1970 0 return 0;
1971 }
1972 0 switch (name[11 + 7]) {
1973 0 case '\0':
1974 0 ▶ if (strEQ(name + 11, "EALTIME")) { /* _SC_XOPEN_R removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 11, "EALTIME")) { /* _SC_XOPEN_R removed */ 0 0 0
1975 #ifdef _SC_XOPEN_REALTIME
1976 0 return _SC_XOPEN_REALTIME;
1977 #else
1978 goto not_there;
1979 #endif
1980 }
1981 case '_':
1982 0 ▶ if (strEQ(name + 11, "EALTIME_THREADS")) { /* _SC_XOPEN_R removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 11, "EALTIME_THREADS")) { /* _SC_XOPEN_R removed */ 0 0 0
1983 #ifdef _SC_XOPEN_REALTIME_THREADS
1984 0 return _SC_XOPEN_REALTIME_THREADS;
1985 #else
1986 goto not_there;
1987 #endif
1988 }
1989 }
1990 0 errno = EINVAL;
1991 0 return 0;
1992  
1993 not_there:
1994 errno = ENOENT;
1995 return 0;
1996 }
1997  
1998 static double
1999 0 constant__SC_XO(char *name, int len, int arg)
2000 {
2001 0 ▶ if (6 + 4 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 4 >= len ) { 0 0 0
2002 0 errno = EINVAL;
2003 0 return 0;
2004 }
2005 0 switch (name[6 + 4]) {
2006 0 case 'C':
2007 0 ▶ if (strEQ(name + 6, "PEN_CRYPT")) { /* _SC_XO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "PEN_CRYPT")) { /* _SC_XO removed */ 0 0 0
2008 #ifdef _SC_XOPEN_CRYPT
2009 0 return _SC_XOPEN_CRYPT;
2010 #else
2011 goto not_there;
2012 #endif
2013 }
2014 case 'E':
2015 0 ▶ if (strEQ(name + 6, "PEN_ENH_I18N")) { /* _SC_XO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "PEN_ENH_I18N")) { /* _SC_XO removed */ 0 0 0
2016 #ifdef _SC_XOPEN_ENH_I18N
2017 0 return _SC_XOPEN_ENH_I18N;
2018 #else
2019 goto not_there;
2020 #endif
2021 }
2022 case 'L':
2023 0 ▶ if (strEQ(name + 6, "PEN_LEGACY")) { /* _SC_XO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "PEN_LEGACY")) { /* _SC_XO removed */ 0 0 0
2024 #ifdef _SC_XOPEN_LEGACY
2025 0 return _SC_XOPEN_LEGACY;
2026 #else
2027 goto not_there;
2028 #endif
2029 }
2030 case 'R':
2031 0 ▶ if (!strnEQ(name + 6,"PEN_", 4))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 6,"PEN_", 4)) 0 0 0
2032 0 break;
2033 0 return constant__SC_XOPEN_R(name, len, arg);
2034 0 case 'S':
2035 0 ▶ if (strEQ(name + 6, "PEN_SHM")) { /* _SC_XO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "PEN_SHM")) { /* _SC_XO removed */ 0 0 0
2036 #ifdef _SC_XOPEN_SHM
2037 0 return _SC_XOPEN_SHM;
2038 #else
2039 goto not_there;
2040 #endif
2041 }
2042 case 'U':
2043 0 ▶ if (strEQ(name + 6, "PEN_UNIX")) { /* _SC_XO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "PEN_UNIX")) { /* _SC_XO removed */ 0 0 0
2044 #ifdef _SC_XOPEN_UNIX
2045 0 return _SC_XOPEN_UNIX;
2046 #else
2047 goto not_there;
2048 #endif
2049 }
2050 case 'V':
2051 0 ▶ if (strEQ(name + 6, "PEN_VERSION")) { /* _SC_XO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "PEN_VERSION")) { /* _SC_XO removed */ 0 0 0
2052 #ifdef _SC_XOPEN_VERSION
2053 0 return _SC_XOPEN_VERSION;
2054 #else
2055 goto not_there;
2056 #endif
2057 }
2058 case 'X':
2059 0 ▶ if (strEQ(name + 6, "PEN_XCU_VERSION")) { /* _SC_XO removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 6, "PEN_XCU_VERSION")) { /* _SC_XO removed */ 0 0 0
2060 #ifdef _SC_XOPEN_XCU_VERSION
2061 0 return _SC_XOPEN_XCU_VERSION;
2062 #else
2063 goto not_there;
2064 #endif
2065 }
2066 }
2067 0 errno = EINVAL;
2068 0 return 0;
2069  
2070 not_there:
2071 errno = ENOENT;
2072 return 0;
2073 }
2074  
2075 static double
2076 0 constant__SC_XBS5_I(char *name, int len, int arg)
2077 {
2078 0 ▶ if (10 + 8 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (10 + 8 >= len ) { 0 0 0
2079 0 errno = EINVAL;
2080 0 return 0;
2081 }
2082 0 switch (name[10 + 8]) {
2083 0 case '3':
2084 0 ▶ if (strEQ(name + 10, "LP32_OFF32")) { /* _SC_XBS5_I removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 10, "LP32_OFF32")) { /* _SC_XBS5_I removed */ 0 0 0
2085 #ifdef _SC_XBS5_ILP32_OFF32
2086 0 return _SC_XBS5_ILP32_OFF32;
2087 #else
2088 goto not_there;
2089 #endif
2090 }
2091 case 'B':
2092 0 ▶ if (strEQ(name + 10, "LP32_OFFBIG")) { /* _SC_XBS5_I removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 10, "LP32_OFFBIG")) { /* _SC_XBS5_I removed */ 0 0 0
2093 #ifdef _SC_XBS5_ILP32_OFFBIG
2094 0 return _SC_XBS5_ILP32_OFFBIG;
2095 #else
2096 goto not_there;
2097 #endif
2098 }
2099 }
2100 0 errno = EINVAL;
2101 0 return 0;
2102  
2103 not_there:
2104 errno = ENOENT;
2105 return 0;
2106 }
2107  
2108 static double
2109 0 constant__SC_XBS5_L(char *name, int len, int arg)
2110 {
2111 0 ▶ if (10 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (10 + 1 >= len ) { 0 0 0
2112 0 errno = EINVAL;
2113 0 return 0;
2114 }
2115 0 switch (name[10 + 1]) {
2116 0 case '6':
2117 0 ▶ if (strEQ(name + 10, "P64_OFF64")) { /* _SC_XBS5_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 10, "P64_OFF64")) { /* _SC_XBS5_L removed */ 0 0 0
2118 #ifdef _SC_XBS5_LP64_OFF64
2119 0 return _SC_XBS5_LP64_OFF64;
2120 #else
2121 goto not_there;
2122 #endif
2123 }
2124 case 'B':
2125 0 ▶ if (strEQ(name + 10, "PBIG_OFFBIG")) { /* _SC_XBS5_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 10, "PBIG_OFFBIG")) { /* _SC_XBS5_L removed */ 0 0 0
2126 #ifdef _SC_XBS5_LPBIG_OFFBIG
2127 0 return _SC_XBS5_LPBIG_OFFBIG;
2128 #else
2129 goto not_there;
2130 #endif
2131 }
2132 }
2133 0 errno = EINVAL;
2134 0 return 0;
2135  
2136 not_there:
2137 errno = ENOENT;
2138 return 0;
2139 }
2140  
2141 static double
2142 0 constant__SC_XB(char *name, int len, int arg)
2143 {
2144 0 ▶ if (6 + 3 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (6 + 3 >= len ) { 0 0 0
2145 0 errno = EINVAL;
2146 0 return 0;
2147 }
2148 0 switch (name[6 + 3]) {
2149 0 case 'I':
2150 0 ▶ if (!strnEQ(name + 6,"S5_", 3))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 6,"S5_", 3)) 0 0 0
2151 0 break;
2152 0 return constant__SC_XBS5_I(name, len, arg);
2153 0 case 'L':
2154 0 ▶ if (!strnEQ(name + 6,"S5_", 3))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 6,"S5_", 3)) 0 0 0
2155 0 break;
2156 0 return constant__SC_XBS5_L(name, len, arg);
2157 }
2158 0 errno = EINVAL;
2159 0 return 0;
2160  
2161 not_there:
2162 errno = ENOENT;
2163 return 0;
2164 }
2165  
2166 static double
2167 0 constant__SC_X(char *name, int len, int arg)
2168 {
2169 0 switch (name[5 + 0]) {
2170 0 case 'B':
2171 0 return constant__SC_XB(name, len, arg);
2172 0 case 'O':
2173 0 return constant__SC_XO(name, len, arg);
2174 }
2175 0 errno = EINVAL;
2176 0 return 0;
2177  
2178 not_there:
2179 errno = ENOENT;
2180 return 0;
2181 }
2182  
2183 static double
2184 2 constant__S(char *name, int len, int arg)
2185 {
2186 2 ▶ if (2 + 2 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (2 + 2 >= len ) { 0 2 2
2187 0 errno = EINVAL;
2188 0 return 0;
2189 }
2190 2 switch (name[2 + 2]) {
2191 0 case '2':
2192 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2193 0 break;
2194 0 return constant__SC_2(name, len, arg);
2195 0 case 'A':
2196 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2197 0 break;
2198 0 return constant__SC_A(name, len, arg);
2199 0 case 'B':
2200 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2201 0 break;
2202 0 return constant__SC_B(name, len, arg);
2203 1 case 'C':
2204 1 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 1 1
2205 0 break;
2206 1 return constant__SC_C(name, len, arg);
2207 0 case 'D':
2208 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2209 0 break;
2210 0 return constant__SC_D(name, len, arg);
2211 0 case 'E':
2212 0 ▶ if (strEQ(name + 2, "C_EXPR_NEST_MAX")) { /* _S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 2, "C_EXPR_NEST_MAX")) { /* _S removed */ 0 0 0
2213 #ifdef _SC_EXPR_NEST_MAX
2214 0 return _SC_EXPR_NEST_MAX;
2215 #else
2216 goto not_there;
2217 #endif
2218 }
2219 case 'F':
2220 0 ▶ if (strEQ(name + 2, "C_FSYNC")) { /* _S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 2, "C_FSYNC")) { /* _S removed */ 0 0 0
2221 #ifdef _SC_FSYNC
2222 0 return _SC_FSYNC;
2223 #else
2224 goto not_there;
2225 #endif
2226 }
2227 case 'G':
2228 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2229 0 break;
2230 0 return constant__SC_G(name, len, arg);
2231 0 case 'I':
2232 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2233 0 break;
2234 0 return constant__SC_I(name, len, arg);
2235 0 case 'J':
2236 0 ▶ if (strEQ(name + 2, "C_JOB_CONTROL")) { /* _S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 2, "C_JOB_CONTROL")) { /* _S removed */ 0 0 0
2237 #ifdef _SC_JOB_CONTROL
2238 0 return _SC_JOB_CONTROL;
2239 #else
2240 goto not_there;
2241 #endif
2242 }
2243 case 'L':
2244 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2245 0 break;
2246 0 return constant__SC_L(name, len, arg);
2247 0 case 'M':
2248 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2249 0 break;
2250 0 return constant__SC_M(name, len, arg);
2251 0 case 'N':
2252 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2253 0 break;
2254 0 return constant__SC_N(name, len, arg);
2255 0 case 'O':
2256 0 ▶ if (strEQ(name + 2, "C_OPEN_MAX")) { /* _S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 2, "C_OPEN_MAX")) { /* _S removed */ 0 0 0
2257 #ifdef _SC_OPEN_MAX
2258 0 return _SC_OPEN_MAX;
2259 #else
2260 goto not_there;
2261 #endif
2262 }
2263 case 'P':
2264 1 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 1 1
2265 0 break;
2266 1 return constant__SC_P(name, len, arg);
2267 0 case 'R':
2268 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2269 0 break;
2270 0 return constant__SC_R(name, len, arg);
2271 0 case 'S':
2272 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2273 0 break;
2274 0 return constant__SC_S(name, len, arg);
2275 0 case 'T':
2276 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2277 0 break;
2278 0 return constant__SC_T(name, len, arg);
2279 0 case 'V':
2280 0 ▶ if (strEQ(name + 2, "C_VERSION")) { /* _S removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 2, "C_VERSION")) { /* _S removed */ 0 0 0
2281 #ifdef _SC_VERSION
2282 0 return _SC_VERSION;
2283 #else
2284 goto not_there;
2285 #endif
2286 }
2287 case 'X':
2288 0 ▶ if (!strnEQ(name + 2,"C_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"C_", 2)) 0 0 0
2289 0 break;
2290 0 return constant__SC_X(name, len, arg);
2291 }
2292 0 errno = EINVAL;
2293 0 return 0;
2294  
2295 not_there:
2296 errno = ENOENT;
2297 return 0;
2298 }
2299  
2300 static double
2301 0 constant__CS_LFS_LI(char *name, int len, int arg)
2302 {
2303 0 switch (name[10 + 0]) {
2304 0 case 'B':
2305 0 ▶ if (strEQ(name + 10, "BS")) { /* _CS_LFS_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 10, "BS")) { /* _CS_LFS_LI removed */ 0 0 0
2306 #ifdef _CS_LFS_LIBS
2307 0 return _CS_LFS_LIBS;
2308 #else
2309 goto not_there;
2310 #endif
2311 }
2312 case 'N':
2313 0 ▶ if (strEQ(name + 10, "NTFLAGS")) { /* _CS_LFS_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 10, "NTFLAGS")) { /* _CS_LFS_LI removed */ 0 0 0
2314 #ifdef _CS_LFS_LINTFLAGS
2315 0 return _CS_LFS_LINTFLAGS;
2316 #else
2317 goto not_there;
2318 #endif
2319 }
2320 }
2321 0 errno = EINVAL;
2322 0 return 0;
2323  
2324 not_there:
2325 errno = ENOENT;
2326 return 0;
2327 }
2328  
2329 static double
2330 0 constant__CS_LFS_L(char *name, int len, int arg)
2331 {
2332 0 switch (name[9 + 0]) {
2333 0 case 'D':
2334 0 ▶ if (strEQ(name + 9, "DFLAGS")) { /* _CS_LFS_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 9, "DFLAGS")) { /* _CS_LFS_L removed */ 0 0 0
2335 #ifdef _CS_LFS_LDFLAGS
2336 0 return _CS_LFS_LDFLAGS;
2337 #else
2338 goto not_there;
2339 #endif
2340 }
2341 case 'I':
2342 0 return constant__CS_LFS_LI(name, len, arg);
2343 }
2344 0 errno = EINVAL;
2345 0 return 0;
2346  
2347 not_there:
2348 errno = ENOENT;
2349 return 0;
2350 }
2351  
2352 static double
2353 0 constant__CS_LFS_(char *name, int len, int arg)
2354 {
2355 0 switch (name[8 + 0]) {
2356 0 case 'C':
2357 0 ▶ if (strEQ(name + 8, "CFLAGS")) { /* _CS_LFS_ removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "CFLAGS")) { /* _CS_LFS_ removed */ 0 0 0
2358 #ifdef _CS_LFS_CFLAGS
2359 0 return _CS_LFS_CFLAGS;
2360 #else
2361 goto not_there;
2362 #endif
2363 }
2364 case 'L':
2365 0 return constant__CS_LFS_L(name, len, arg);
2366 }
2367 0 errno = EINVAL;
2368 0 return 0;
2369  
2370 not_there:
2371 errno = ENOENT;
2372 return 0;
2373 }
2374  
2375 static double
2376 0 constant__CS_LFS64_LI(char *name, int len, int arg)
2377 {
2378 0 switch (name[12 + 0]) {
2379 0 case 'B':
2380 0 ▶ if (strEQ(name + 12, "BS")) { /* _CS_LFS64_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 12, "BS")) { /* _CS_LFS64_LI removed */ 0 0 0
2381 #ifdef _CS_LFS64_LIBS
2382 0 return _CS_LFS64_LIBS;
2383 #else
2384 goto not_there;
2385 #endif
2386 }
2387 case 'N':
2388 0 ▶ if (strEQ(name + 12, "NTFLAGS")) { /* _CS_LFS64_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 12, "NTFLAGS")) { /* _CS_LFS64_LI removed */ 0 0 0
2389 #ifdef _CS_LFS64_LINTFLAGS
2390 0 return _CS_LFS64_LINTFLAGS;
2391 #else
2392 goto not_there;
2393 #endif
2394 }
2395 }
2396 0 errno = EINVAL;
2397 0 return 0;
2398  
2399 not_there:
2400 errno = ENOENT;
2401 return 0;
2402 }
2403  
2404 static double
2405 0 constant__CS_LFS64_L(char *name, int len, int arg)
2406 {
2407 0 switch (name[11 + 0]) {
2408 0 case 'D':
2409 0 ▶ if (strEQ(name + 11, "DFLAGS")) { /* _CS_LFS64_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 11, "DFLAGS")) { /* _CS_LFS64_L removed */ 0 0 0
2410 #ifdef _CS_LFS64_LDFLAGS
2411 0 return _CS_LFS64_LDFLAGS;
2412 #else
2413 goto not_there;
2414 #endif
2415 }
2416 case 'I':
2417 0 return constant__CS_LFS64_LI(name, len, arg);
2418 }
2419 0 errno = EINVAL;
2420 0 return 0;
2421  
2422 not_there:
2423 errno = ENOENT;
2424 return 0;
2425 }
2426  
2427 static double
2428 0 constant__CS_LFS6(char *name, int len, int arg)
2429 {
2430 0 ▶ if (8 + 2 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (8 + 2 >= len ) { 0 0 0
2431 0 errno = EINVAL;
2432 0 return 0;
2433 }
2434 0 switch (name[8 + 2]) {
2435 0 case 'C':
2436 0 ▶ if (strEQ(name + 8, "4_CFLAGS")) { /* _CS_LFS6 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 8, "4_CFLAGS")) { /* _CS_LFS6 removed */ 0 0 0
2437 #ifdef _CS_LFS64_CFLAGS
2438 0 return _CS_LFS64_CFLAGS;
2439 #else
2440 goto not_there;
2441 #endif
2442 }
2443 case 'L':
2444 0 ▶ if (!strnEQ(name + 8,"4_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 8,"4_", 2)) 0 0 0
2445 0 break;
2446 0 return constant__CS_LFS64_L(name, len, arg);
2447 }
2448 0 errno = EINVAL;
2449 0 return 0;
2450  
2451 not_there:
2452 errno = ENOENT;
2453 return 0;
2454 }
2455  
2456 static double
2457 0 constant__CS_L(char *name, int len, int arg)
2458 {
2459 0 ▶ if (5 + 2 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (5 + 2 >= len ) { 0 0 0
2460 0 errno = EINVAL;
2461 0 return 0;
2462 }
2463 0 switch (name[5 + 2]) {
2464 0 case '6':
2465 0 ▶ if (!strnEQ(name + 5,"FS", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 5,"FS", 2)) 0 0 0
2466 0 break;
2467 0 return constant__CS_LFS6(name, len, arg);
2468 0 case '_':
2469 0 ▶ if (!strnEQ(name + 5,"FS", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 5,"FS", 2)) 0 0 0
2470 0 break;
2471 0 return constant__CS_LFS_(name, len, arg);
2472 }
2473 0 errno = EINVAL;
2474 0 return 0;
2475  
2476 not_there:
2477 errno = ENOENT;
2478 return 0;
2479 }
2480  
2481 static double
2482 0 constant__CS_XBS5_ILP32_OFFBIG_LI(char *name, int len, int arg)
2483 {
2484 0 switch (name[24 + 0]) {
2485 0 case 'B':
2486 0 ▶ if (strEQ(name + 24, "BS")) { /* _CS_XBS5_ILP32_OFFBIG_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 24, "BS")) { /* _CS_XBS5_ILP32_OFFBIG_LI removed */ 0 0 0
2487 #ifdef _CS_XBS5_ILP32_OFFBIG_LIBS
2488 0 return _CS_XBS5_ILP32_OFFBIG_LIBS;
2489 #else
2490 goto not_there;
2491 #endif
2492 }
2493 case 'N':
2494 0 ▶ if (strEQ(name + 24, "NTFLAGS")) { /* _CS_XBS5_ILP32_OFFBIG_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 24, "NTFLAGS")) { /* _CS_XBS5_ILP32_OFFBIG_LI removed */ 0 0 0
2495 #ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
2496 0 return _CS_XBS5_ILP32_OFFBIG_LINTFLAGS;
2497 #else
2498 goto not_there;
2499 #endif
2500 }
2501 }
2502 0 errno = EINVAL;
2503 0 return 0;
2504  
2505 not_there:
2506 errno = ENOENT;
2507 return 0;
2508 }
2509  
2510 static double
2511 0 constant__CS_XBS5_ILP32_OFFBIG_L(char *name, int len, int arg)
2512 {
2513 0 switch (name[23 + 0]) {
2514 0 case 'D':
2515 0 ▶ if (strEQ(name + 23, "DFLAGS")) { /* _CS_XBS5_ILP32_OFFBIG_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 23, "DFLAGS")) { /* _CS_XBS5_ILP32_OFFBIG_L removed */ 0 0 0
2516 #ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS
2517 0 return _CS_XBS5_ILP32_OFFBIG_LDFLAGS;
2518 #else
2519 goto not_there;
2520 #endif
2521 }
2522 case 'I':
2523 0 return constant__CS_XBS5_ILP32_OFFBIG_LI(name, len, arg);
2524 }
2525 0 errno = EINVAL;
2526 0 return 0;
2527  
2528 not_there:
2529 errno = ENOENT;
2530 return 0;
2531 }
2532  
2533 static double
2534 0 constant__CS_XBS5_ILP32_OFFB(char *name, int len, int arg)
2535 {
2536 0 ▶ if (19 + 3 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (19 + 3 >= len ) { 0 0 0
2537 0 errno = EINVAL;
2538 0 return 0;
2539 }
2540 0 switch (name[19 + 3]) {
2541 0 case 'C':
2542 0 ▶ if (strEQ(name + 19, "IG_CFLAGS")) { /* _CS_XBS5_ILP32_OFFB removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 19, "IG_CFLAGS")) { /* _CS_XBS5_ILP32_OFFB removed */ 0 0 0
2543 #ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS
2544 0 return _CS_XBS5_ILP32_OFFBIG_CFLAGS;
2545 #else
2546 goto not_there;
2547 #endif
2548 }
2549 case 'L':
2550 0 ▶ if (!strnEQ(name + 19,"IG_", 3))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 19,"IG_", 3)) 0 0 0
2551 0 break;
2552 0 return constant__CS_XBS5_ILP32_OFFBIG_L(name, len, arg);
2553 }
2554 0 errno = EINVAL;
2555 0 return 0;
2556  
2557 not_there:
2558 errno = ENOENT;
2559 return 0;
2560 }
2561  
2562 static double
2563 0 constant__CS_XBS5_ILP32_OFF32_LI(char *name, int len, int arg)
2564 {
2565 0 switch (name[23 + 0]) {
2566 0 case 'B':
2567 0 ▶ if (strEQ(name + 23, "BS")) { /* _CS_XBS5_ILP32_OFF32_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 23, "BS")) { /* _CS_XBS5_ILP32_OFF32_LI removed */ 0 0 0
2568 #ifdef _CS_XBS5_ILP32_OFF32_LIBS
2569 0 return _CS_XBS5_ILP32_OFF32_LIBS;
2570 #else
2571 goto not_there;
2572 #endif
2573 }
2574 case 'N':
2575 0 ▶ if (strEQ(name + 23, "NTFLAGS")) { /* _CS_XBS5_ILP32_OFF32_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 23, "NTFLAGS")) { /* _CS_XBS5_ILP32_OFF32_LI removed */ 0 0 0
2576 #ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS
2577 0 return _CS_XBS5_ILP32_OFF32_LINTFLAGS;
2578 #else
2579 goto not_there;
2580 #endif
2581 }
2582 }
2583 0 errno = EINVAL;
2584 0 return 0;
2585  
2586 not_there:
2587 errno = ENOENT;
2588 return 0;
2589 }
2590  
2591 static double
2592 0 constant__CS_XBS5_ILP32_OFF32_L(char *name, int len, int arg)
2593 {
2594 0 switch (name[22 + 0]) {
2595 0 case 'D':
2596 0 ▶ if (strEQ(name + 22, "DFLAGS")) { /* _CS_XBS5_ILP32_OFF32_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 22, "DFLAGS")) { /* _CS_XBS5_ILP32_OFF32_L removed */ 0 0 0
2597 #ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS
2598 0 return _CS_XBS5_ILP32_OFF32_LDFLAGS;
2599 #else
2600 goto not_there;
2601 #endif
2602 }
2603 case 'I':
2604 0 return constant__CS_XBS5_ILP32_OFF32_LI(name, len, arg);
2605 }
2606 0 errno = EINVAL;
2607 0 return 0;
2608  
2609 not_there:
2610 errno = ENOENT;
2611 return 0;
2612 }
2613  
2614 static double
2615 0 constant__CS_XBS5_ILP32_OFF3(char *name, int len, int arg)
2616 {
2617 0 ▶ if (19 + 2 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (19 + 2 >= len ) { 0 0 0
2618 0 errno = EINVAL;
2619 0 return 0;
2620 }
2621 0 switch (name[19 + 2]) {
2622 0 case 'C':
2623 0 ▶ if (strEQ(name + 19, "2_CFLAGS")) { /* _CS_XBS5_ILP32_OFF3 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 19, "2_CFLAGS")) { /* _CS_XBS5_ILP32_OFF3 removed */ 0 0 0
2624 #ifdef _CS_XBS5_ILP32_OFF32_CFLAGS
2625 0 return _CS_XBS5_ILP32_OFF32_CFLAGS;
2626 #else
2627 goto not_there;
2628 #endif
2629 }
2630 case 'L':
2631 0 ▶ if (!strnEQ(name + 19,"2_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 19,"2_", 2)) 0 0 0
2632 0 break;
2633 0 return constant__CS_XBS5_ILP32_OFF32_L(name, len, arg);
2634 }
2635 0 errno = EINVAL;
2636 0 return 0;
2637  
2638 not_there:
2639 errno = ENOENT;
2640 return 0;
2641 }
2642  
2643 static double
2644 0 constant__CS_XBS5_I(char *name, int len, int arg)
2645 {
2646 0 ▶ if (10 + 8 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (10 + 8 >= len ) { 0 0 0
2647 0 errno = EINVAL;
2648 0 return 0;
2649 }
2650 0 switch (name[10 + 8]) {
2651 0 case '3':
2652 0 ▶ if (!strnEQ(name + 10,"LP32_OFF", 8))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 10,"LP32_OFF", 8)) 0 0 0
2653 0 break;
2654 0 return constant__CS_XBS5_ILP32_OFF3(name, len, arg);
2655 0 case 'B':
2656 0 ▶ if (!strnEQ(name + 10,"LP32_OFF", 8))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 10,"LP32_OFF", 8)) 0 0 0
2657 0 break;
2658 0 return constant__CS_XBS5_ILP32_OFFB(name, len, arg);
2659 }
2660 0 errno = EINVAL;
2661 0 return 0;
2662  
2663 not_there:
2664 errno = ENOENT;
2665 return 0;
2666 }
2667  
2668 static double
2669 0 constant__CS_XBS5_LPBIG_OFFBIG_LI(char *name, int len, int arg)
2670 {
2671 0 switch (name[24 + 0]) {
2672 0 case 'B':
2673 0 ▶ if (strEQ(name + 24, "BS")) { /* _CS_XBS5_LPBIG_OFFBIG_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 24, "BS")) { /* _CS_XBS5_LPBIG_OFFBIG_LI removed */ 0 0 0
2674 #ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS
2675 0 return _CS_XBS5_LPBIG_OFFBIG_LIBS;
2676 #else
2677 goto not_there;
2678 #endif
2679 }
2680 case 'N':
2681 0 ▶ if (strEQ(name + 24, "NTFLAGS")) { /* _CS_XBS5_LPBIG_OFFBIG_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 24, "NTFLAGS")) { /* _CS_XBS5_LPBIG_OFFBIG_LI removed */ 0 0 0
2682 #ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
2683 0 return _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS;
2684 #else
2685 goto not_there;
2686 #endif
2687 }
2688 }
2689 0 errno = EINVAL;
2690 0 return 0;
2691  
2692 not_there:
2693 errno = ENOENT;
2694 return 0;
2695 }
2696  
2697 static double
2698 0 constant__CS_XBS5_LPBIG_OFFBIG_L(char *name, int len, int arg)
2699 {
2700 0 switch (name[23 + 0]) {
2701 0 case 'D':
2702 0 ▶ if (strEQ(name + 23, "DFLAGS")) { /* _CS_XBS5_LPBIG_OFFBIG_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 23, "DFLAGS")) { /* _CS_XBS5_LPBIG_OFFBIG_L removed */ 0 0 0
2703 #ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
2704 0 return _CS_XBS5_LPBIG_OFFBIG_LDFLAGS;
2705 #else
2706 goto not_there;
2707 #endif
2708 }
2709 case 'I':
2710 0 return constant__CS_XBS5_LPBIG_OFFBIG_LI(name, len, arg);
2711 }
2712 0 errno = EINVAL;
2713 0 return 0;
2714  
2715 not_there:
2716 errno = ENOENT;
2717 return 0;
2718 }
2719  
2720 static double
2721 0 constant__CS_XBS5_LPB(char *name, int len, int arg)
2722 {
2723 0 ▶ if (12 + 10 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (12 + 10 >= len ) { 0 0 0
2724 0 errno = EINVAL;
2725 0 return 0;
2726 }
2727 0 switch (name[12 + 10]) {
2728 0 case 'C':
2729 0 ▶ if (strEQ(name + 12, "IG_OFFBIG_CFLAGS")) { /* _CS_XBS5_LPB removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 12, "IG_OFFBIG_CFLAGS")) { /* _CS_XBS5_LPB removed */ 0 0 0
2730 #ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS
2731 0 return _CS_XBS5_LPBIG_OFFBIG_CFLAGS;
2732 #else
2733 goto not_there;
2734 #endif
2735 }
2736 case 'L':
2737 0 ▶ if (!strnEQ(name + 12,"IG_OFFBIG_", 10))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 12,"IG_OFFBIG_", 10)) 0 0 0
2738 0 break;
2739 0 return constant__CS_XBS5_LPBIG_OFFBIG_L(name, len, arg);
2740 }
2741 0 errno = EINVAL;
2742 0 return 0;
2743  
2744 not_there:
2745 errno = ENOENT;
2746 return 0;
2747 }
2748  
2749 static double
2750 0 constant__CS_XBS5_LP64_OFF64_LI(char *name, int len, int arg)
2751 {
2752 0 switch (name[22 + 0]) {
2753 0 case 'B':
2754 0 ▶ if (strEQ(name + 22, "BS")) { /* _CS_XBS5_LP64_OFF64_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 22, "BS")) { /* _CS_XBS5_LP64_OFF64_LI removed */ 0 0 0
2755 #ifdef _CS_XBS5_LP64_OFF64_LIBS
2756 0 return _CS_XBS5_LP64_OFF64_LIBS;
2757 #else
2758 goto not_there;
2759 #endif
2760 }
2761 case 'N':
2762 0 ▶ if (strEQ(name + 22, "NTFLAGS")) { /* _CS_XBS5_LP64_OFF64_LI removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 22, "NTFLAGS")) { /* _CS_XBS5_LP64_OFF64_LI removed */ 0 0 0
2763 #ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS
2764 0 return _CS_XBS5_LP64_OFF64_LINTFLAGS;
2765 #else
2766 goto not_there;
2767 #endif
2768 }
2769 }
2770 0 errno = EINVAL;
2771 0 return 0;
2772  
2773 not_there:
2774 errno = ENOENT;
2775 return 0;
2776 }
2777  
2778 static double
2779 0 constant__CS_XBS5_LP64_OFF64_L(char *name, int len, int arg)
2780 {
2781 0 switch (name[21 + 0]) {
2782 0 case 'D':
2783 0 ▶ if (strEQ(name + 21, "DFLAGS")) { /* _CS_XBS5_LP64_OFF64_L removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 21, "DFLAGS")) { /* _CS_XBS5_LP64_OFF64_L removed */ 0 0 0
2784 #ifdef _CS_XBS5_LP64_OFF64_LDFLAGS
2785 0 return _CS_XBS5_LP64_OFF64_LDFLAGS;
2786 #else
2787 goto not_there;
2788 #endif
2789 }
2790 case 'I':
2791 0 return constant__CS_XBS5_LP64_OFF64_LI(name, len, arg);
2792 }
2793 0 errno = EINVAL;
2794 0 return 0;
2795  
2796 not_there:
2797 errno = ENOENT;
2798 return 0;
2799 }
2800  
2801 static double
2802 0 constant__CS_XBS5_LP6(char *name, int len, int arg)
2803 {
2804 0 ▶ if (12 + 8 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (12 + 8 >= len ) { 0 0 0
2805 0 errno = EINVAL;
2806 0 return 0;
2807 }
2808 0 switch (name[12 + 8]) {
2809 0 case 'C':
2810 0 ▶ if (strEQ(name + 12, "4_OFF64_CFLAGS")) { /* _CS_XBS5_LP6 removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 12, "4_OFF64_CFLAGS")) { /* _CS_XBS5_LP6 removed */ 0 0 0
2811 #ifdef _CS_XBS5_LP64_OFF64_CFLAGS
2812 0 return _CS_XBS5_LP64_OFF64_CFLAGS;
2813 #else
2814 goto not_there;
2815 #endif
2816 }
2817 case 'L':
2818 0 ▶ if (!strnEQ(name + 12,"4_OFF64_", 8))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 12,"4_OFF64_", 8)) 0 0 0
2819 0 break;
2820 0 return constant__CS_XBS5_LP64_OFF64_L(name, len, arg);
2821 }
2822 0 errno = EINVAL;
2823 0 return 0;
2824  
2825 not_there:
2826 errno = ENOENT;
2827 return 0;
2828 }
2829  
2830 static double
2831 0 constant__CS_XBS5_L(char *name, int len, int arg)
2832 {
2833 0 ▶ if (10 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (10 + 1 >= len ) { 0 0 0
2834 0 errno = EINVAL;
2835 0 return 0;
2836 }
2837 0 switch (name[10 + 1]) {
2838 0 case '6':
2839 0 ▶ if (!strnEQ(name + 10,"P", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 10,"P", 1)) 0 0 0
2840 0 break;
2841 0 return constant__CS_XBS5_LP6(name, len, arg);
2842 0 case 'B':
2843 0 ▶ if (!strnEQ(name + 10,"P", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 10,"P", 1)) 0 0 0
2844 0 break;
2845 0 return constant__CS_XBS5_LPB(name, len, arg);
2846 }
2847 0 errno = EINVAL;
2848 0 return 0;
2849  
2850 not_there:
2851 errno = ENOENT;
2852 return 0;
2853 }
2854  
2855 static double
2856 0 constant__CS_X(char *name, int len, int arg)
2857 {
2858 0 ▶ if (5 + 4 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (5 + 4 >= len ) { 0 0 0
2859 0 errno = EINVAL;
2860 0 return 0;
2861 }
2862 0 switch (name[5 + 4]) {
2863 0 case 'I':
2864 0 ▶ if (!strnEQ(name + 5,"BS5_", 4))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 5,"BS5_", 4)) 0 0 0
2865 0 break;
2866 0 return constant__CS_XBS5_I(name, len, arg);
2867 0 case 'L':
2868 0 ▶ if (!strnEQ(name + 5,"BS5_", 4))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 5,"BS5_", 4)) 0 0 0
2869 0 break;
2870 0 return constant__CS_XBS5_L(name, len, arg);
2871 }
2872 0 errno = EINVAL;
2873 0 return 0;
2874  
2875 not_there:
2876 errno = ENOENT;
2877 return 0;
2878 }
2879  
2880 static double
2881 0 constant__C(char *name, int len, int arg)
2882 {
2883 0 ▶ if (2 + 2 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (2 + 2 >= len ) { 0 0 0
2884 0 errno = EINVAL;
2885 0 return 0;
2886 }
2887 0 switch (name[2 + 2]) {
2888 0 case 'L':
2889 0 ▶ if (!strnEQ(name + 2,"S_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"S_", 2)) 0 0 0
2890 0 break;
2891 0 return constant__CS_L(name, len, arg);
2892 0 case 'P':
2893 0 ▶ if (strEQ(name + 2, "S_PATH")) { /* _C removed */
Branch: 1 branch
BranchTrueFalseTotal
if (strEQ(name + 2, "S_PATH")) { /* _C removed */ 0 0 0
2894 #ifdef _CS_PATH
2895 0 return _CS_PATH;
2896 #else
2897 goto not_there;
2898 #endif
2899 }
2900 case 'X':
2901 0 ▶ if (!strnEQ(name + 2,"S_", 2))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 2,"S_", 2)) 0 0 0
2902 0 break;
2903 0 return constant__CS_X(name, len, arg);
2904 }
2905 0 errno = EINVAL;
2906 0 return 0;
2907  
2908 not_there:
2909 errno = ENOENT;
2910 return 0;
2911 }
2912  
2913 static double
2914 2 constant(char *name, int len, int arg)
2915 {
2916 2 errno = 0;
2917 2 ▶ if (0 + 1 >= len ) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 + 1 >= len ) { 0 2 2
2918 0 errno = EINVAL;
2919 0 return 0;
2920 }
2921 2 switch (name[0 + 1]) {
2922 0 case 'C':
2923 0 ▶ if (!strnEQ(name + 0,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 0,"_", 1)) 0 0 0
2924 0 break;
2925 0 return constant__C(name, len, arg);
2926 0 case 'P':
2927 0 ▶ if (!strnEQ(name + 0,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 0,"_", 1)) 0 0 0
2928 0 break;
2929 0 return constant__P(name, len, arg);
2930 2 case 'S':
2931 2 ▶ if (!strnEQ(name + 0,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 0,"_", 1)) 0 2 2
2932 0 break;
2933 2 return constant__S(name, len, arg);
2934 0 case 'X':
2935 0 ▶ if (!strnEQ(name + 0,"_", 1))
Branch: 1 branch
BranchTrueFalseTotal
if (!strnEQ(name + 0,"_", 1)) 0 0 0
2936 0 break;
2937 0 return constant__X(name, len, arg);
2938 }
2939 0 errno = EINVAL;
2940 0 return 0;
2941  
2942 not_there:
2943 errno = ENOENT;
2944 return 0;
2945 }
2946  
2947  
2948 MODULE = Solaris::Sysconf PACKAGE = Solaris::Sysconf
2949 PROTOTYPES: DISABLE
2950  
2951 long
2952 sysconf(name)
2953 int name
2954 CODE:
2955 2 RETVAL = sysconf(name);
2956 OUTPUT:
2957 RETVAL
2958  
2959 double
2960 constant(sv,arg)
2961 PREINIT:
2962 STRLEN len;
2963 INPUT:
2964 SV * sv
2965 char * s = SvPV(sv, len);
2966 int arg
2967 CODE:
2968 2 RETVAL = constant(s,len,arg);
2969 OUTPUT:
2970 RETVAL
2971  
« blib/lib/Solaris/Sysconf.pm ↑ Summary