const-c.inc

filter: Statementstmt 17.4% 67 / 385 Branchbran 7.6% 14 / 182 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 14.2% 81 / 567 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/IPC/SysV.pm ↑ Summary SysV.xs »
1 #define PERL_constant_NOTFOUND 1
2 #define PERL_constant_NOTDEF 2
3 #define PERL_constant_ISIV 3
4 #define PERL_constant_ISNO 4
5 #define PERL_constant_ISNV 5
6 #define PERL_constant_ISPV 6
7 #define PERL_constant_ISPVN 7
8 #define PERL_constant_ISSV 8
9 #define PERL_constant_ISUNDEF 9
10 #define PERL_constant_ISUV 10
11 #define PERL_constant_ISYES 11
12  
13 #ifndef NVTYPE
14 typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */
15 #endif
16 #ifndef aTHX_
17 #define aTHX_ /* 5.6 or later define this for threading support. */
18 #endif
19 #ifndef pTHX_
20 #define pTHX_ /* 5.6 or later define this for threading support. */
21 #endif
22  
23 static int
24 0 _constant_5 (pTHX_ const char *name, IV *iv_return) {
25 /* When generated this function returned values for the list of names given
26 here. However, subsequent manual editing may have added or removed some.
27 IPC_M IPC_R IPC_W MSG_R MSG_W SEM_A SEM_R SHM_A SHM_R SHM_W */
28 /* Offset 1 gives the best switch position. */
29 0 switch (name[1]) {
30 0 case 'E':
31 0 ▶ if (memEQ(name, "SEM_A", 5)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SEM_A", 5)) { 0 0 0
32 /* ^ */
33 #ifdef SEM_A
34 *iv_return = SEM_A;
35 return PERL_constant_ISIV;
36 #else
37 0 return PERL_constant_NOTDEF;
38 #endif
39 }
40 0 ▶ if (memEQ(name, "SEM_R", 5)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SEM_R", 5)) { 0 0 0
41 /* ^ */
42 #ifdef SEM_R
43 *iv_return = SEM_R;
44 return PERL_constant_ISIV;
45 #else
46 0 return PERL_constant_NOTDEF;
47 #endif
48 }
49 0 break;
50 0 case 'H':
51 0 ▶ if (memEQ(name, "SHM_A", 5)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_A", 5)) { 0 0 0
52 /* ^ */
53 #ifdef SHM_A
54 *iv_return = SHM_A;
55 return PERL_constant_ISIV;
56 #else
57 0 return PERL_constant_NOTDEF;
58 #endif
59 }
60 0 ▶ if (memEQ(name, "SHM_R", 5)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_R", 5)) { 0 0 0
61 /* ^ */
62 #ifdef SHM_R
63 0 *iv_return = SHM_R;
64 0 return PERL_constant_ISIV;
65 #else
66 return PERL_constant_NOTDEF;
67 #endif
68 }
69 0 ▶ if (memEQ(name, "SHM_W", 5)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_W", 5)) { 0 0 0
70 /* ^ */
71 #ifdef SHM_W
72 0 *iv_return = SHM_W;
73 0 return PERL_constant_ISIV;
74 #else
75 return PERL_constant_NOTDEF;
76 #endif
77 }
78 0 break;
79 0 case 'P':
80 0 ▶ if (memEQ(name, "IPC_M", 5)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_M", 5)) { 0 0 0
81 /* ^ */
82 #ifdef IPC_M
83 *iv_return = IPC_M;
84 return PERL_constant_ISIV;
85 #else
86 0 return PERL_constant_NOTDEF;
87 #endif
88 }
89 0 ▶ if (memEQ(name, "IPC_R", 5)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_R", 5)) { 0 0 0
90 /* ^ */
91 #ifdef IPC_R
92 *iv_return = IPC_R;
93 return PERL_constant_ISIV;
94 #else
95 0 return PERL_constant_NOTDEF;
96 #endif
97 }
98 0 ▶ if (memEQ(name, "IPC_W", 5)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_W", 5)) { 0 0 0
99 /* ^ */
100 #ifdef IPC_W
101 *iv_return = IPC_W;
102 return PERL_constant_ISIV;
103 #else
104 0 return PERL_constant_NOTDEF;
105 #endif
106 }
107 0 break;
108 0 case 'S':
109 0 ▶ if (memEQ(name, "MSG_R", 5)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_R", 5)) { 0 0 0
110 /* ^ */
111 #ifdef MSG_R
112 *iv_return = MSG_R;
113 return PERL_constant_ISIV;
114 #else
115 0 return PERL_constant_NOTDEF;
116 #endif
117 }
118 0 ▶ if (memEQ(name, "MSG_W", 5)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_W", 5)) { 0 0 0
119 /* ^ */
120 #ifdef MSG_W
121 *iv_return = MSG_W;
122 return PERL_constant_ISIV;
123 #else
124 0 return PERL_constant_NOTDEF;
125 #endif
126 }
127 0 break;
128 }
129 0 return PERL_constant_NOTFOUND;
130 }
131  
132 static int
133 4 _constant_6 (pTHX_ const char *name, IV *iv_return) {
134 /* When generated this function returned values for the list of names given
135 here. However, subsequent manual editing may have added or removed some.
136 EACCES ENOMEM ENOSPC ENOSYS GETALL GETPID GETVAL SETALL SETVAL SHMLBA */
137 /* Offset 3 gives the best switch position. */
138 4 switch (name[3]) {
139 4 case 'A':
140 4 ▶ if (memEQ(name, "GETALL", 6)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "GETALL", 6)) { 2 2 4
141 /* ^ */
142 #ifdef GETALL
143 2 *iv_return = GETALL;
144 2 return PERL_constant_ISIV;
145 #else
146 return PERL_constant_NOTDEF;
147 #endif
148 }
149 2 ▶ if (memEQ(name, "SETALL", 6)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SETALL", 6)) { 2 0 2
150 /* ^ */
151 #ifdef SETALL
152 2 *iv_return = SETALL;
153 2 return PERL_constant_ISIV;
154 #else
155 return PERL_constant_NOTDEF;
156 #endif
157 }
158 0 break;
159 0 case 'C':
160 0 ▶ if (memEQ(name, "EACCES", 6)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "EACCES", 6)) { 0 0 0
161 /* ^ */
162 #ifdef EACCES
163 0 *iv_return = EACCES;
164 0 return PERL_constant_ISIV;
165 #else
166 return PERL_constant_NOTDEF;
167 #endif
168 }
169 0 break;
170 0 case 'L':
171 0 ▶ if (memEQ(name, "SHMLBA", 6)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHMLBA", 6)) { 0 0 0
172 /* ^ */
173 #ifdef SHMLBA
174 0 *iv_return = SHMLBA;
175 0 return PERL_constant_ISIV;
176 #else
177 return PERL_constant_NOTDEF;
178 #endif
179 }
180 0 break;
181 0 case 'M':
182 0 ▶ if (memEQ(name, "ENOMEM", 6)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "ENOMEM", 6)) { 0 0 0
183 /* ^ */
184 #ifdef ENOMEM
185 0 *iv_return = ENOMEM;
186 0 return PERL_constant_ISIV;
187 #else
188 return PERL_constant_NOTDEF;
189 #endif
190 }
191 0 break;
192 0 case 'P':
193 0 ▶ if (memEQ(name, "GETPID", 6)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "GETPID", 6)) { 0 0 0
194 /* ^ */
195 #ifdef GETPID
196 0 *iv_return = GETPID;
197 0 return PERL_constant_ISIV;
198 #else
199 return PERL_constant_NOTDEF;
200 #endif
201 }
202 0 break;
203 0 case 'S':
204 0 ▶ if (memEQ(name, "ENOSPC", 6)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "ENOSPC", 6)) { 0 0 0
205 /* ^ */
206 #ifdef ENOSPC
207 0 *iv_return = ENOSPC;
208 0 return PERL_constant_ISIV;
209 #else
210 return PERL_constant_NOTDEF;
211 #endif
212 }
213 0 ▶ if (memEQ(name, "ENOSYS", 6)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "ENOSYS", 6)) { 0 0 0
214 /* ^ */
215 #ifdef ENOSYS
216 0 *iv_return = ENOSYS;
217 0 return PERL_constant_ISIV;
218 #else
219 return PERL_constant_NOTDEF;
220 #endif
221 }
222 0 break;
223 0 case 'V':
224 0 ▶ if (memEQ(name, "GETVAL", 6)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "GETVAL", 6)) { 0 0 0
225 /* ^ */
226 #ifdef GETVAL
227 0 *iv_return = GETVAL;
228 0 return PERL_constant_ISIV;
229 #else
230 return PERL_constant_NOTDEF;
231 #endif
232 }
233 0 ▶ if (memEQ(name, "SETVAL", 6)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SETVAL", 6)) { 0 0 0
234 /* ^ */
235 #ifdef SETVAL
236 0 *iv_return = SETVAL;
237 0 return PERL_constant_ISIV;
238 #else
239 return PERL_constant_NOTDEF;
240 #endif
241 }
242 0 break;
243 }
244 0 return PERL_constant_NOTFOUND;
245 }
246  
247 static int
248 9 _constant_7 (pTHX_ const char *name, IV *iv_return) {
249 /* When generated this function returned values for the list of names given
250 here. However, subsequent manual editing may have added or removed some.
251 GETNCNT GETZCNT IPC_SET SEM_ERR SHM_MAP SHM_RND S_IRGRP S_IROTH S_IRUSR
252 S_IRWXG S_IRWXO S_IRWXU S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR */
253 /* Offset 4 gives the best switch position. */
254 9 switch (name[4]) {
255 1 case 'C':
256 1 ▶ if (memEQ(name, "GETNCNT", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "GETNCNT", 7)) { 1 0 1
257 /* ^ */
258 #ifdef GETNCNT
259 1 *iv_return = GETNCNT;
260 1 return PERL_constant_ISIV;
261 #else
262 return PERL_constant_NOTDEF;
263 #endif
264 }
265 0 ▶ if (memEQ(name, "GETZCNT", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "GETZCNT", 7)) { 0 0 0
266 /* ^ */
267 #ifdef GETZCNT
268 0 *iv_return = GETZCNT;
269 0 return PERL_constant_ISIV;
270 #else
271 return PERL_constant_NOTDEF;
272 #endif
273 }
274 0 break;
275 0 case 'E':
276 0 ▶ if (memEQ(name, "SEM_ERR", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SEM_ERR", 7)) { 0 0 0
277 /* ^ */
278 #ifdef SEM_ERR
279 *iv_return = SEM_ERR;
280 return PERL_constant_ISIV;
281 #else
282 0 return PERL_constant_NOTDEF;
283 #endif
284 }
285 0 break;
286 0 case 'G':
287 0 ▶ if (memEQ(name, "S_IRGRP", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IRGRP", 7)) { 0 0 0
288 /* ^ */
289 #ifdef S_IRGRP
290 0 *iv_return = S_IRGRP;
291 0 return PERL_constant_ISIV;
292 #else
293 return PERL_constant_NOTDEF;
294 #endif
295 }
296 0 ▶ if (memEQ(name, "S_IWGRP", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IWGRP", 7)) { 0 0 0
297 /* ^ */
298 #ifdef S_IWGRP
299 0 *iv_return = S_IWGRP;
300 0 return PERL_constant_ISIV;
301 #else
302 return PERL_constant_NOTDEF;
303 #endif
304 }
305 0 ▶ if (memEQ(name, "S_IXGRP", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IXGRP", 7)) { 0 0 0
306 /* ^ */
307 #ifdef S_IXGRP
308 0 *iv_return = S_IXGRP;
309 0 return PERL_constant_ISIV;
310 #else
311 return PERL_constant_NOTDEF;
312 #endif
313 }
314 0 break;
315 0 case 'M':
316 0 ▶ if (memEQ(name, "SHM_MAP", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_MAP", 7)) { 0 0 0
317 /* ^ */
318 #ifdef SHM_MAP
319 *iv_return = SHM_MAP;
320 return PERL_constant_ISIV;
321 #else
322 0 return PERL_constant_NOTDEF;
323 #endif
324 }
325 0 break;
326 0 case 'O':
327 0 ▶ if (memEQ(name, "S_IROTH", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IROTH", 7)) { 0 0 0
328 /* ^ */
329 #ifdef S_IROTH
330 0 *iv_return = S_IROTH;
331 0 return PERL_constant_ISIV;
332 #else
333 return PERL_constant_NOTDEF;
334 #endif
335 }
336 0 ▶ if (memEQ(name, "S_IWOTH", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IWOTH", 7)) { 0 0 0
337 /* ^ */
338 #ifdef S_IWOTH
339 0 *iv_return = S_IWOTH;
340 0 return PERL_constant_ISIV;
341 #else
342 return PERL_constant_NOTDEF;
343 #endif
344 }
345 0 ▶ if (memEQ(name, "S_IXOTH", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IXOTH", 7)) { 0 0 0
346 /* ^ */
347 #ifdef S_IXOTH
348 0 *iv_return = S_IXOTH;
349 0 return PERL_constant_ISIV;
350 #else
351 return PERL_constant_NOTDEF;
352 #endif
353 }
354 0 break;
355 0 case 'R':
356 0 ▶ if (memEQ(name, "SHM_RND", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_RND", 7)) { 0 0 0
357 /* ^ */
358 #ifdef SHM_RND
359 0 *iv_return = SHM_RND;
360 0 return PERL_constant_ISIV;
361 #else
362 return PERL_constant_NOTDEF;
363 #endif
364 }
365 0 break;
366 0 case 'S':
367 0 ▶ if (memEQ(name, "IPC_SET", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_SET", 7)) { 0 0 0
368 /* ^ */
369 #ifdef IPC_SET
370 0 *iv_return = IPC_SET;
371 0 return PERL_constant_ISIV;
372 #else
373 return PERL_constant_NOTDEF;
374 #endif
375 }
376 0 break;
377 0 case 'U':
378 0 ▶ if (memEQ(name, "S_IRUSR", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IRUSR", 7)) { 0 0 0
379 /* ^ */
380 #ifdef S_IRUSR
381 0 *iv_return = S_IRUSR;
382 0 return PERL_constant_ISIV;
383 #else
384 return PERL_constant_NOTDEF;
385 #endif
386 }
387 0 ▶ if (memEQ(name, "S_IWUSR", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IWUSR", 7)) { 0 0 0
388 /* ^ */
389 #ifdef S_IWUSR
390 0 *iv_return = S_IWUSR;
391 0 return PERL_constant_ISIV;
392 #else
393 return PERL_constant_NOTDEF;
394 #endif
395 }
396 0 ▶ if (memEQ(name, "S_IXUSR", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IXUSR", 7)) { 0 0 0
397 /* ^ */
398 #ifdef S_IXUSR
399 0 *iv_return = S_IXUSR;
400 0 return PERL_constant_ISIV;
401 #else
402 return PERL_constant_NOTDEF;
403 #endif
404 }
405 0 break;
406 8 case 'W':
407 8 ▶ if (memEQ(name, "S_IRWXG", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IRWXG", 7)) { 2 6 8
408 /* ^ */
409 #ifdef S_IRWXG
410 2 *iv_return = S_IRWXG;
411 2 return PERL_constant_ISIV;
412 #else
413 return PERL_constant_NOTDEF;
414 #endif
415 }
416 6 ▶ if (memEQ(name, "S_IRWXO", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IRWXO", 7)) { 2 4 6
417 /* ^ */
418 #ifdef S_IRWXO
419 2 *iv_return = S_IRWXO;
420 2 return PERL_constant_ISIV;
421 #else
422 return PERL_constant_NOTDEF;
423 #endif
424 }
425 4 ▶ if (memEQ(name, "S_IRWXU", 7)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "S_IRWXU", 7)) { 4 0 4
426 /* ^ */
427 #ifdef S_IRWXU
428 4 *iv_return = S_IRWXU;
429 4 return PERL_constant_ISIV;
430 #else
431 return PERL_constant_NOTDEF;
432 #endif
433 }
434 0 break;
435 }
436 0 return PERL_constant_NOTFOUND;
437 }
438  
439 static int
440 8 _constant_8 (pTHX_ const char *name, IV *iv_return) {
441 /* When generated this function returned values for the list of names given
442 here. However, subsequent manual editing may have added or removed some.
443 IPC_EXCL IPC_INFO IPC_RMID IPC_STAT MSG_INFO MSG_STAT MSG_WAIT SEM_DEST
444 SEM_INFO SEM_STAT SEM_UNDO SHM_COPY SHM_DEST SHM_FMAP SHM_INFO SHM_INIT
445 SHM_LOCK SHM_SIZE SHM_STAT */
446 /* Offset 4 gives the best switch position. */
447 8 switch (name[4]) {
448 0 case 'C':
449 0 ▶ if (memEQ(name, "SHM_COPY", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_COPY", 8)) { 0 0 0
450 /* ^ */
451 #ifdef SHM_COPY
452 *iv_return = SHM_COPY;
453 return PERL_constant_ISIV;
454 #else
455 0 return PERL_constant_NOTDEF;
456 #endif
457 }
458 0 break;
459 0 case 'D':
460 0 ▶ if (memEQ(name, "SEM_DEST", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SEM_DEST", 8)) { 0 0 0
461 /* ^ */
462 #ifdef SEM_DEST
463 *iv_return = SEM_DEST;
464 return PERL_constant_ISIV;
465 #else
466 0 return PERL_constant_NOTDEF;
467 #endif
468 }
469 0 ▶ if (memEQ(name, "SHM_DEST", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_DEST", 8)) { 0 0 0
470 /* ^ */
471 #ifdef SHM_DEST
472 0 *iv_return = SHM_DEST;
473 0 return PERL_constant_ISIV;
474 #else
475 return PERL_constant_NOTDEF;
476 #endif
477 }
478 0 break;
479 0 case 'E':
480 0 ▶ if (memEQ(name, "IPC_EXCL", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_EXCL", 8)) { 0 0 0
481 /* ^ */
482 #ifdef IPC_EXCL
483 0 *iv_return = IPC_EXCL;
484 0 return PERL_constant_ISIV;
485 #else
486 return PERL_constant_NOTDEF;
487 #endif
488 }
489 0 break;
490 0 case 'F':
491 0 ▶ if (memEQ(name, "SHM_FMAP", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_FMAP", 8)) { 0 0 0
492 /* ^ */
493 #ifdef SHM_FMAP
494 *iv_return = SHM_FMAP;
495 return PERL_constant_ISIV;
496 #else
497 0 return PERL_constant_NOTDEF;
498 #endif
499 }
500 0 break;
501 0 case 'I':
502 0 ▶ if (memEQ(name, "IPC_INFO", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_INFO", 8)) { 0 0 0
503 /* ^ */
504 #ifdef IPC_INFO
505 0 *iv_return = IPC_INFO;
506 0 return PERL_constant_ISIV;
507 #else
508 return PERL_constant_NOTDEF;
509 #endif
510 }
511 0 ▶ if (memEQ(name, "MSG_INFO", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_INFO", 8)) { 0 0 0
512 /* ^ */
513 #ifdef MSG_INFO
514 0 *iv_return = MSG_INFO;
515 0 return PERL_constant_ISIV;
516 #else
517 return PERL_constant_NOTDEF;
518 #endif
519 }
520 0 ▶ if (memEQ(name, "SEM_INFO", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SEM_INFO", 8)) { 0 0 0
521 /* ^ */
522 #ifdef SEM_INFO
523 0 *iv_return = SEM_INFO;
524 0 return PERL_constant_ISIV;
525 #else
526 return PERL_constant_NOTDEF;
527 #endif
528 }
529 0 ▶ if (memEQ(name, "SHM_INFO", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_INFO", 8)) { 0 0 0
530 /* ^ */
531 #ifdef SHM_INFO
532 0 *iv_return = SHM_INFO;
533 0 return PERL_constant_ISIV;
534 #else
535 return PERL_constant_NOTDEF;
536 #endif
537 }
538 0 ▶ if (memEQ(name, "SHM_INIT", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_INIT", 8)) { 0 0 0
539 /* ^ */
540 #ifdef SHM_INIT
541 *iv_return = SHM_INIT;
542 return PERL_constant_ISIV;
543 #else
544 0 return PERL_constant_NOTDEF;
545 #endif
546 }
547 0 break;
548 0 case 'L':
549 0 ▶ if (memEQ(name, "SHM_LOCK", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_LOCK", 8)) { 0 0 0
550 /* ^ */
551 #ifdef SHM_LOCK
552 0 *iv_return = SHM_LOCK;
553 0 return PERL_constant_ISIV;
554 #else
555 return PERL_constant_NOTDEF;
556 #endif
557 }
558 0 break;
559 4 case 'R':
560 4 ▶ if (memEQ(name, "IPC_RMID", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_RMID", 8)) { 4 0 4
561 /* ^ */
562 #ifdef IPC_RMID
563 4 *iv_return = IPC_RMID;
564 4 return PERL_constant_ISIV;
565 #else
566 return PERL_constant_NOTDEF;
567 #endif
568 }
569 0 break;
570 4 case 'S':
571 4 ▶ if (memEQ(name, "IPC_STAT", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_STAT", 8)) { 4 0 4
572 /* ^ */
573 #ifdef IPC_STAT
574 4 *iv_return = IPC_STAT;
575 4 return PERL_constant_ISIV;
576 #else
577 return PERL_constant_NOTDEF;
578 #endif
579 }
580 0 ▶ if (memEQ(name, "MSG_STAT", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_STAT", 8)) { 0 0 0
581 /* ^ */
582 #ifdef MSG_STAT
583 0 *iv_return = MSG_STAT;
584 0 return PERL_constant_ISIV;
585 #else
586 return PERL_constant_NOTDEF;
587 #endif
588 }
589 0 ▶ if (memEQ(name, "SEM_STAT", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SEM_STAT", 8)) { 0 0 0
590 /* ^ */
591 #ifdef SEM_STAT
592 0 *iv_return = SEM_STAT;
593 0 return PERL_constant_ISIV;
594 #else
595 return PERL_constant_NOTDEF;
596 #endif
597 }
598 0 ▶ if (memEQ(name, "SHM_SIZE", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_SIZE", 8)) { 0 0 0
599 /* ^ */
600 #ifdef SHM_SIZE
601 *iv_return = SHM_SIZE;
602 return PERL_constant_ISIV;
603 #else
604 0 return PERL_constant_NOTDEF;
605 #endif
606 }
607 0 ▶ if (memEQ(name, "SHM_STAT", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_STAT", 8)) { 0 0 0
608 /* ^ */
609 #ifdef SHM_STAT
610 0 *iv_return = SHM_STAT;
611 0 return PERL_constant_ISIV;
612 #else
613 return PERL_constant_NOTDEF;
614 #endif
615 }
616 0 break;
617 0 case 'U':
618 0 ▶ if (memEQ(name, "SEM_UNDO", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SEM_UNDO", 8)) { 0 0 0
619 /* ^ */
620 #ifdef SEM_UNDO
621 0 *iv_return = SEM_UNDO;
622 0 return PERL_constant_ISIV;
623 #else
624 return PERL_constant_NOTDEF;
625 #endif
626 }
627 0 break;
628 0 case 'W':
629 0 ▶ if (memEQ(name, "MSG_WAIT", 8)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_WAIT", 8)) { 0 0 0
630 /* ^ */
631 #ifdef MSG_WAIT
632 *iv_return = MSG_WAIT;
633 return PERL_constant_ISIV;
634 #else
635 0 return PERL_constant_NOTDEF;
636 #endif
637 }
638 0 break;
639 }
640 0 return PERL_constant_NOTFOUND;
641 }
642  
643 static int
644 2 _constant_9 (pTHX_ const char *name, IV *iv_return) {
645 /* When generated this function returned values for the list of names given
646 here. However, subsequent manual editing may have added or removed some.
647 IPC_ALLOC IPC_CREAT MSG_FWAIT MSG_MWAIT MSG_QWAIT MSG_RWAIT MSG_WWAIT
648 SEM_ALLOC SEM_ORDER SHM_CLEAR SHM_REMAP */
649 /* Offset 4 gives the best switch position. */
650 2 switch (name[4]) {
651 0 case 'A':
652 0 ▶ if (memEQ(name, "IPC_ALLOC", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_ALLOC", 9)) { 0 0 0
653 /* ^ */
654 #ifdef IPC_ALLOC
655 *iv_return = IPC_ALLOC;
656 return PERL_constant_ISIV;
657 #else
658 0 return PERL_constant_NOTDEF;
659 #endif
660 }
661 0 ▶ if (memEQ(name, "SEM_ALLOC", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SEM_ALLOC", 9)) { 0 0 0
662 /* ^ */
663 #ifdef SEM_ALLOC
664 *iv_return = SEM_ALLOC;
665 return PERL_constant_ISIV;
666 #else
667 0 return PERL_constant_NOTDEF;
668 #endif
669 }
670 0 break;
671 2 case 'C':
672 2 ▶ if (memEQ(name, "IPC_CREAT", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_CREAT", 9)) { 2 0 2
673 /* ^ */
674 #ifdef IPC_CREAT
675 2 *iv_return = IPC_CREAT;
676 2 return PERL_constant_ISIV;
677 #else
678 return PERL_constant_NOTDEF;
679 #endif
680 }
681 0 ▶ if (memEQ(name, "SHM_CLEAR", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_CLEAR", 9)) { 0 0 0
682 /* ^ */
683 #ifdef SHM_CLEAR
684 *iv_return = SHM_CLEAR;
685 return PERL_constant_ISIV;
686 #else
687 0 return PERL_constant_NOTDEF;
688 #endif
689 }
690 0 break;
691 0 case 'F':
692 0 ▶ if (memEQ(name, "MSG_FWAIT", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_FWAIT", 9)) { 0 0 0
693 /* ^ */
694 #ifdef MSG_FWAIT
695 *iv_return = MSG_FWAIT;
696 return PERL_constant_ISIV;
697 #else
698 0 return PERL_constant_NOTDEF;
699 #endif
700 }
701 0 break;
702 0 case 'M':
703 0 ▶ if (memEQ(name, "MSG_MWAIT", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_MWAIT", 9)) { 0 0 0
704 /* ^ */
705 #ifdef MSG_MWAIT
706 *iv_return = MSG_MWAIT;
707 return PERL_constant_ISIV;
708 #else
709 0 return PERL_constant_NOTDEF;
710 #endif
711 }
712 0 break;
713 0 case 'O':
714 0 ▶ if (memEQ(name, "SEM_ORDER", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SEM_ORDER", 9)) { 0 0 0
715 /* ^ */
716 #ifdef SEM_ORDER
717 *iv_return = SEM_ORDER;
718 return PERL_constant_ISIV;
719 #else
720 0 return PERL_constant_NOTDEF;
721 #endif
722 }
723 0 break;
724 0 case 'Q':
725 0 ▶ if (memEQ(name, "MSG_QWAIT", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_QWAIT", 9)) { 0 0 0
726 /* ^ */
727 #ifdef MSG_QWAIT
728 *iv_return = MSG_QWAIT;
729 return PERL_constant_ISIV;
730 #else
731 0 return PERL_constant_NOTDEF;
732 #endif
733 }
734 0 break;
735 0 case 'R':
736 0 ▶ if (memEQ(name, "MSG_RWAIT", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_RWAIT", 9)) { 0 0 0
737 /* ^ */
738 #ifdef MSG_RWAIT
739 *iv_return = MSG_RWAIT;
740 return PERL_constant_ISIV;
741 #else
742 0 return PERL_constant_NOTDEF;
743 #endif
744 }
745 0 ▶ if (memEQ(name, "SHM_REMAP", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_REMAP", 9)) { 0 0 0
746 /* ^ */
747 #ifdef SHM_REMAP
748 0 *iv_return = SHM_REMAP;
749 0 return PERL_constant_ISIV;
750 #else
751 return PERL_constant_NOTDEF;
752 #endif
753 }
754 0 break;
755 0 case 'W':
756 0 ▶ if (memEQ(name, "MSG_WWAIT", 9)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_WWAIT", 9)) { 0 0 0
757 /* ^ */
758 #ifdef MSG_WWAIT
759 *iv_return = MSG_WWAIT;
760 return PERL_constant_ISIV;
761 #else
762 0 return PERL_constant_NOTDEF;
763 #endif
764 }
765 0 break;
766 }
767 0 return PERL_constant_NOTFOUND;
768 }
769  
770 static int
771 3 _constant_10 (pTHX_ const char *name, IV *iv_return) {
772 /* When generated this function returned values for the list of names given
773 here. However, subsequent manual editing may have added or removed some.
774 IPC_GETACL IPC_LOCKED IPC_NOWAIT IPC_SETACL IPC_WANTED MSG_EXCEPT
775 MSG_LOCKED SHM_DCACHE SHM_ECACHE SHM_ICACHE SHM_LOCKED SHM_NOSWAP
776 SHM_RDONLY SHM_SHATTR SHM_UNLOCK */
777 /* Offset 4 gives the best switch position. */
778 3 switch (name[4]) {
779 0 case 'D':
780 0 ▶ if (memEQ(name, "SHM_DCACHE", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_DCACHE", 10)) { 0 0 0
781 /* ^ */
782 #ifdef SHM_DCACHE
783 *iv_return = SHM_DCACHE;
784 return PERL_constant_ISIV;
785 #else
786 0 return PERL_constant_NOTDEF;
787 #endif
788 }
789 0 break;
790 0 case 'E':
791 0 ▶ if (memEQ(name, "MSG_EXCEPT", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_EXCEPT", 10)) { 0 0 0
792 /* ^ */
793 #ifdef MSG_EXCEPT
794 0 *iv_return = MSG_EXCEPT;
795 0 return PERL_constant_ISIV;
796 #else
797 return PERL_constant_NOTDEF;
798 #endif
799 }
800 0 ▶ if (memEQ(name, "SHM_ECACHE", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_ECACHE", 10)) { 0 0 0
801 /* ^ */
802 #ifdef SHM_ECACHE
803 *iv_return = SHM_ECACHE;
804 return PERL_constant_ISIV;
805 #else
806 0 return PERL_constant_NOTDEF;
807 #endif
808 }
809 0 break;
810 0 case 'G':
811 0 ▶ if (memEQ(name, "IPC_GETACL", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_GETACL", 10)) { 0 0 0
812 /* ^ */
813 #ifdef IPC_GETACL
814 *iv_return = IPC_GETACL;
815 return PERL_constant_ISIV;
816 #else
817 0 return PERL_constant_NOTDEF;
818 #endif
819 }
820 0 break;
821 0 case 'I':
822 0 ▶ if (memEQ(name, "SHM_ICACHE", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_ICACHE", 10)) { 0 0 0
823 /* ^ */
824 #ifdef SHM_ICACHE
825 *iv_return = SHM_ICACHE;
826 return PERL_constant_ISIV;
827 #else
828 0 return PERL_constant_NOTDEF;
829 #endif
830 }
831 0 break;
832 0 case 'L':
833 0 ▶ if (memEQ(name, "IPC_LOCKED", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_LOCKED", 10)) { 0 0 0
834 /* ^ */
835 #ifdef IPC_LOCKED
836 *iv_return = IPC_LOCKED;
837 return PERL_constant_ISIV;
838 #else
839 0 return PERL_constant_NOTDEF;
840 #endif
841 }
842 0 ▶ if (memEQ(name, "MSG_LOCKED", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_LOCKED", 10)) { 0 0 0
843 /* ^ */
844 #ifdef MSG_LOCKED
845 *iv_return = MSG_LOCKED;
846 return PERL_constant_ISIV;
847 #else
848 0 return PERL_constant_NOTDEF;
849 #endif
850 }
851 0 ▶ if (memEQ(name, "SHM_LOCKED", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_LOCKED", 10)) { 0 0 0
852 /* ^ */
853 #ifdef SHM_LOCKED
854 0 *iv_return = SHM_LOCKED;
855 0 return PERL_constant_ISIV;
856 #else
857 return PERL_constant_NOTDEF;
858 #endif
859 }
860 0 break;
861 3 case 'N':
862 3 ▶ if (memEQ(name, "IPC_NOWAIT", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_NOWAIT", 10)) { 3 0 3
863 /* ^ */
864 #ifdef IPC_NOWAIT
865 3 *iv_return = IPC_NOWAIT;
866 3 return PERL_constant_ISIV;
867 #else
868 return PERL_constant_NOTDEF;
869 #endif
870 }
871 0 ▶ if (memEQ(name, "SHM_NOSWAP", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_NOSWAP", 10)) { 0 0 0
872 /* ^ */
873 #ifdef SHM_NOSWAP
874 *iv_return = SHM_NOSWAP;
875 return PERL_constant_ISIV;
876 #else
877 0 return PERL_constant_NOTDEF;
878 #endif
879 }
880 0 break;
881 0 case 'R':
882 0 ▶ if (memEQ(name, "SHM_RDONLY", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_RDONLY", 10)) { 0 0 0
883 /* ^ */
884 #ifdef SHM_RDONLY
885 0 *iv_return = SHM_RDONLY;
886 0 return PERL_constant_ISIV;
887 #else
888 return PERL_constant_NOTDEF;
889 #endif
890 }
891 0 break;
892 0 case 'S':
893 0 ▶ if (memEQ(name, "IPC_SETACL", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_SETACL", 10)) { 0 0 0
894 /* ^ */
895 #ifdef IPC_SETACL
896 *iv_return = IPC_SETACL;
897 return PERL_constant_ISIV;
898 #else
899 0 return PERL_constant_NOTDEF;
900 #endif
901 }
902 0 ▶ if (memEQ(name, "SHM_SHATTR", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_SHATTR", 10)) { 0 0 0
903 /* ^ */
904 #ifdef SHM_SHATTR
905 *iv_return = SHM_SHATTR;
906 return PERL_constant_ISIV;
907 #else
908 0 return PERL_constant_NOTDEF;
909 #endif
910 }
911 0 break;
912 0 case 'U':
913 0 ▶ if (memEQ(name, "SHM_UNLOCK", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_UNLOCK", 10)) { 0 0 0
914 /* ^ */
915 #ifdef SHM_UNLOCK
916 0 *iv_return = SHM_UNLOCK;
917 0 return PERL_constant_ISIV;
918 #else
919 return PERL_constant_NOTDEF;
920 #endif
921 }
922 0 break;
923 0 case 'W':
924 0 ▶ if (memEQ(name, "IPC_WANTED", 10)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_WANTED", 10)) { 0 0 0
925 /* ^ */
926 #ifdef IPC_WANTED
927 *iv_return = IPC_WANTED;
928 return PERL_constant_ISIV;
929 #else
930 0 return PERL_constant_NOTDEF;
931 #endif
932 }
933 0 break;
934 }
935 0 return PERL_constant_NOTFOUND;
936 }
937  
938 static int
939 4 _constant_11 (pTHX_ const char *name, IV *iv_return) {
940 /* When generated this function returned values for the list of names given
941 here. However, subsequent manual editing may have added or removed some.
942 IPC_NOERROR IPC_PRIVATE MSG_NOERROR SHM_HUGETLB SHM_REMOVED */
943 /* Offset 6 gives the best switch position. */
944 4 switch (name[6]) {
945 0 case 'E':
946 0 ▶ if (memEQ(name, "IPC_NOERROR", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_NOERROR", 11)) { 0 0 0
947 /* ^ */
948 #ifdef IPC_NOERROR
949 *iv_return = IPC_NOERROR;
950 return PERL_constant_ISIV;
951 #else
952 0 return PERL_constant_NOTDEF;
953 #endif
954 }
955 0 ▶ if (memEQ(name, "MSG_NOERROR", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "MSG_NOERROR", 11)) { 0 0 0
956 /* ^ */
957 #ifdef MSG_NOERROR
958 0 *iv_return = MSG_NOERROR;
959 0 return PERL_constant_ISIV;
960 #else
961 return PERL_constant_NOTDEF;
962 #endif
963 }
964 0 break;
965 0 case 'G':
966 0 ▶ if (memEQ(name, "SHM_HUGETLB", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_HUGETLB", 11)) { 0 0 0
967 /* ^ */
968 #ifdef SHM_HUGETLB
969 0 *iv_return = SHM_HUGETLB;
970 0 return PERL_constant_ISIV;
971 #else
972 return PERL_constant_NOTDEF;
973 #endif
974 }
975 0 break;
976 4 case 'I':
977 4 ▶ if (memEQ(name, "IPC_PRIVATE", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "IPC_PRIVATE", 11)) { 4 0 4
978 /* ^ */
979 #ifdef IPC_PRIVATE
980 4 *iv_return = IPC_PRIVATE;
981 4 return PERL_constant_ISIV;
982 #else
983 return PERL_constant_NOTDEF;
984 #endif
985 }
986 0 break;
987 0 case 'M':
988 0 ▶ if (memEQ(name, "SHM_REMOVED", 11)) {
Branch: 1 branch
BranchTrueFalseTotal
if (memEQ(name, "SHM_REMOVED", 11)) { 0 0 0
989 /* ^ */
990 #ifdef SHM_REMOVED
991 *iv_return = SHM_REMOVED;
992 return PERL_constant_ISIV;
993 #else
994 0 return PERL_constant_NOTDEF;
995 #endif
996 }
997 0 break;
998 }
999 0 return PERL_constant_NOTFOUND;
1000 }
1001  
1002 static int
1003 30 _constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
1004 /* Initially switch on the length of the name. */
1005 /* When generated this function returned values for the list of names given
1006 in this section of perl code. Rather than manually editing these functions
1007 to add or remove constants, which would result in this comment and section
1008 of code becoming inaccurate, we recommend that you edit this section of
1009 code, and use it to regenerate a new set of constant functions which you
1010 then use to replace the originals.
1011  
1012 Regenerate these constant functions by feeding this entire source file to
1013 perl -x
1014  
1015 #!/usr/bin/perl -w
1016 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
1017  
1018 my $types = {map {($_, 1)} qw(IV)};
1019 my @names = (qw(EACCES ENOMEM ENOSPC ENOSYS GETALL GETNCNT GETPID GETVAL
1020 GETZCNT IPC_ALLOC IPC_CREAT IPC_EXCL IPC_GETACL IPC_INFO
1021 IPC_LOCKED IPC_M IPC_NOERROR IPC_NOWAIT IPC_PRIVATE IPC_R
1022 IPC_RMID IPC_SET IPC_SETACL IPC_SETLABEL IPC_STAT IPC_W
1023 IPC_WANTED MSG_EXCEPT MSG_FWAIT MSG_INFO MSG_LOCKED MSG_MWAIT
1024 MSG_NOERROR MSG_QWAIT MSG_R MSG_RWAIT MSG_STAT MSG_W MSG_WAIT
1025 MSG_WWAIT SEM_A SEM_ALLOC SEM_DEST SEM_ERR SEM_INFO SEM_ORDER
1026 SEM_R SEM_STAT SEM_UNDO SETALL SETVAL SHMLBA SHM_A SHM_CLEAR
1027 SHM_COPY SHM_DCACHE SHM_DEST SHM_ECACHE SHM_FMAP SHM_HUGETLB
1028 SHM_ICACHE SHM_INFO SHM_INIT SHM_LOCK SHM_LOCKED SHM_MAP
1029 SHM_NORESERVE SHM_NOSWAP SHM_R SHM_RDONLY SHM_REMAP SHM_REMOVED
1030 SHM_RND SHM_SHARE_MMU SHM_SHATTR SHM_SIZE SHM_STAT SHM_UNLOCK
1031 SHM_W S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_IWGRP
1032 S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR));
1033  
1034 print constant_types(), "\n"; # macro defs
1035 foreach (C_constant ("IPC::SysV", '_constant', 'IV', $types, undef, 3, @names) ) {
1036 print $_, "\n"; # C constant subs
1037 }
1038 print "\n#### XS Section:\n";
1039 print XS_constant ("IPC::SysV", $types);
1040 __END__
« blib/lib/IPC/SysV.pm ↑ Summary SysV.xs »