line |
stmt |
bran |
cond |
sub |
time |
code |
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
|
|
|
|
|
|
case 'E': |
31
|
0
|
|
|
|
|
if (memEQ(name, "SEM_A", 5)) { |
32
|
|
|
|
|
|
/* ^ */ |
33
|
|
|
|
|
|
#ifdef SEM_A |
34
|
|
|
|
|
|
*iv_return = SEM_A; |
35
|
|
|
|
|
|
return PERL_constant_ISIV; |
36
|
|
|
|
|
|
#else |
37
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
38
|
|
|
|
|
|
#endif |
39
|
|
|
|
|
|
} |
40
|
0
|
|
|
|
|
if (memEQ(name, "SEM_R", 5)) { |
41
|
|
|
|
|
|
/* ^ */ |
42
|
|
|
|
|
|
#ifdef SEM_R |
43
|
|
|
|
|
|
*iv_return = SEM_R; |
44
|
|
|
|
|
|
return PERL_constant_ISIV; |
45
|
|
|
|
|
|
#else |
46
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
47
|
|
|
|
|
|
#endif |
48
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
break; |
50
|
|
|
|
|
|
case 'H': |
51
|
0
|
|
|
|
|
if (memEQ(name, "SHM_A", 5)) { |
52
|
|
|
|
|
|
/* ^ */ |
53
|
|
|
|
|
|
#ifdef SHM_A |
54
|
|
|
|
|
|
*iv_return = SHM_A; |
55
|
|
|
|
|
|
return PERL_constant_ISIV; |
56
|
|
|
|
|
|
#else |
57
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
58
|
|
|
|
|
|
#endif |
59
|
|
|
|
|
|
} |
60
|
0
|
|
|
|
|
if (memEQ(name, "SHM_R", 5)) { |
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)) { |
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
|
|
|
|
|
|
break; |
79
|
|
|
|
|
|
case 'P': |
80
|
0
|
|
|
|
|
if (memEQ(name, "IPC_M", 5)) { |
81
|
|
|
|
|
|
/* ^ */ |
82
|
|
|
|
|
|
#ifdef IPC_M |
83
|
|
|
|
|
|
*iv_return = IPC_M; |
84
|
|
|
|
|
|
return PERL_constant_ISIV; |
85
|
|
|
|
|
|
#else |
86
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
87
|
|
|
|
|
|
#endif |
88
|
|
|
|
|
|
} |
89
|
0
|
|
|
|
|
if (memEQ(name, "IPC_R", 5)) { |
90
|
|
|
|
|
|
/* ^ */ |
91
|
|
|
|
|
|
#ifdef IPC_R |
92
|
|
|
|
|
|
*iv_return = IPC_R; |
93
|
|
|
|
|
|
return PERL_constant_ISIV; |
94
|
|
|
|
|
|
#else |
95
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
96
|
|
|
|
|
|
#endif |
97
|
|
|
|
|
|
} |
98
|
0
|
|
|
|
|
if (memEQ(name, "IPC_W", 5)) { |
99
|
|
|
|
|
|
/* ^ */ |
100
|
|
|
|
|
|
#ifdef IPC_W |
101
|
|
|
|
|
|
*iv_return = IPC_W; |
102
|
|
|
|
|
|
return PERL_constant_ISIV; |
103
|
|
|
|
|
|
#else |
104
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
105
|
|
|
|
|
|
#endif |
106
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
break; |
108
|
|
|
|
|
|
case 'S': |
109
|
0
|
|
|
|
|
if (memEQ(name, "MSG_R", 5)) { |
110
|
|
|
|
|
|
/* ^ */ |
111
|
|
|
|
|
|
#ifdef MSG_R |
112
|
|
|
|
|
|
*iv_return = MSG_R; |
113
|
|
|
|
|
|
return PERL_constant_ISIV; |
114
|
|
|
|
|
|
#else |
115
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
116
|
|
|
|
|
|
#endif |
117
|
|
|
|
|
|
} |
118
|
0
|
|
|
|
|
if (memEQ(name, "MSG_W", 5)) { |
119
|
|
|
|
|
|
/* ^ */ |
120
|
|
|
|
|
|
#ifdef MSG_W |
121
|
|
|
|
|
|
*iv_return = MSG_W; |
122
|
|
|
|
|
|
return PERL_constant_ISIV; |
123
|
|
|
|
|
|
#else |
124
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
125
|
|
|
|
|
|
#endif |
126
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
break; |
128
|
|
|
|
|
|
} |
129
|
0
|
|
|
|
|
return PERL_constant_NOTFOUND; |
130
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
132
|
|
|
|
|
|
static int |
133
|
8
|
|
|
|
|
_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
|
8
|
|
|
|
|
switch (name[3]) { |
139
|
|
|
|
|
|
case 'A': |
140
|
8
|
|
|
|
|
if (memEQ(name, "GETALL", 6)) { |
141
|
|
|
|
|
|
/* ^ */ |
142
|
|
|
|
|
|
#ifdef GETALL |
143
|
4
|
|
|
|
|
*iv_return = GETALL; |
144
|
4
|
|
|
|
|
return PERL_constant_ISIV; |
145
|
|
|
|
|
|
#else |
146
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
147
|
|
|
|
|
|
#endif |
148
|
|
|
|
|
|
} |
149
|
4
|
|
|
|
|
if (memEQ(name, "SETALL", 6)) { |
150
|
|
|
|
|
|
/* ^ */ |
151
|
|
|
|
|
|
#ifdef SETALL |
152
|
4
|
|
|
|
|
*iv_return = SETALL; |
153
|
4
|
|
|
|
|
return PERL_constant_ISIV; |
154
|
|
|
|
|
|
#else |
155
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
156
|
|
|
|
|
|
#endif |
157
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
break; |
159
|
|
|
|
|
|
case 'C': |
160
|
0
|
|
|
|
|
if (memEQ(name, "EACCES", 6)) { |
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
|
|
|
|
|
|
break; |
170
|
|
|
|
|
|
case 'L': |
171
|
0
|
|
|
|
|
if (memEQ(name, "SHMLBA", 6)) { |
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
|
|
|
|
|
|
break; |
181
|
|
|
|
|
|
case 'M': |
182
|
0
|
|
|
|
|
if (memEQ(name, "ENOMEM", 6)) { |
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
|
|
|
|
|
|
break; |
192
|
|
|
|
|
|
case 'P': |
193
|
0
|
|
|
|
|
if (memEQ(name, "GETPID", 6)) { |
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
|
|
|
|
|
|
break; |
203
|
|
|
|
|
|
case 'S': |
204
|
0
|
|
|
|
|
if (memEQ(name, "ENOSPC", 6)) { |
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)) { |
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
|
|
|
|
|
|
break; |
223
|
|
|
|
|
|
case 'V': |
224
|
0
|
|
|
|
|
if (memEQ(name, "GETVAL", 6)) { |
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)) { |
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
|
|
|
|
|
|
break; |
243
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
245
|
|
|
|
|
|
} |
246
|
|
|
|
|
|
|
247
|
|
|
|
|
|
static int |
248
|
20
|
|
|
|
|
_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
|
20
|
|
|
|
|
switch (name[4]) { |
255
|
|
|
|
|
|
case 'C': |
256
|
2
|
|
|
|
|
if (memEQ(name, "GETNCNT", 7)) { |
257
|
|
|
|
|
|
/* ^ */ |
258
|
|
|
|
|
|
#ifdef GETNCNT |
259
|
2
|
|
|
|
|
*iv_return = GETNCNT; |
260
|
2
|
|
|
|
|
return PERL_constant_ISIV; |
261
|
|
|
|
|
|
#else |
262
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
263
|
|
|
|
|
|
#endif |
264
|
|
|
|
|
|
} |
265
|
0
|
|
|
|
|
if (memEQ(name, "GETZCNT", 7)) { |
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
|
|
|
|
|
|
break; |
275
|
|
|
|
|
|
case 'E': |
276
|
0
|
|
|
|
|
if (memEQ(name, "SEM_ERR", 7)) { |
277
|
|
|
|
|
|
/* ^ */ |
278
|
|
|
|
|
|
#ifdef SEM_ERR |
279
|
|
|
|
|
|
*iv_return = SEM_ERR; |
280
|
|
|
|
|
|
return PERL_constant_ISIV; |
281
|
|
|
|
|
|
#else |
282
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
283
|
|
|
|
|
|
#endif |
284
|
|
|
|
|
|
} |
285
|
|
|
|
|
|
break; |
286
|
|
|
|
|
|
case 'G': |
287
|
0
|
|
|
|
|
if (memEQ(name, "S_IRGRP", 7)) { |
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)) { |
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)) { |
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
|
|
|
|
|
|
break; |
315
|
|
|
|
|
|
case 'M': |
316
|
0
|
|
|
|
|
if (memEQ(name, "SHM_MAP", 7)) { |
317
|
|
|
|
|
|
/* ^ */ |
318
|
|
|
|
|
|
#ifdef SHM_MAP |
319
|
|
|
|
|
|
*iv_return = SHM_MAP; |
320
|
|
|
|
|
|
return PERL_constant_ISIV; |
321
|
|
|
|
|
|
#else |
322
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
323
|
|
|
|
|
|
#endif |
324
|
|
|
|
|
|
} |
325
|
|
|
|
|
|
break; |
326
|
|
|
|
|
|
case 'O': |
327
|
0
|
|
|
|
|
if (memEQ(name, "S_IROTH", 7)) { |
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)) { |
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)) { |
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
|
|
|
|
|
|
break; |
355
|
|
|
|
|
|
case 'R': |
356
|
0
|
|
|
|
|
if (memEQ(name, "SHM_RND", 7)) { |
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
|
|
|
|
|
|
break; |
366
|
|
|
|
|
|
case 'S': |
367
|
0
|
|
|
|
|
if (memEQ(name, "IPC_SET", 7)) { |
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
|
|
|
|
|
|
break; |
377
|
|
|
|
|
|
case 'U': |
378
|
0
|
|
|
|
|
if (memEQ(name, "S_IRUSR", 7)) { |
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)) { |
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)) { |
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
|
|
|
|
|
|
break; |
406
|
|
|
|
|
|
case 'W': |
407
|
18
|
|
|
|
|
if (memEQ(name, "S_IRWXG", 7)) { |
408
|
|
|
|
|
|
/* ^ */ |
409
|
|
|
|
|
|
#ifdef S_IRWXG |
410
|
4
|
|
|
|
|
*iv_return = S_IRWXG; |
411
|
4
|
|
|
|
|
return PERL_constant_ISIV; |
412
|
|
|
|
|
|
#else |
413
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
414
|
|
|
|
|
|
#endif |
415
|
|
|
|
|
|
} |
416
|
14
|
|
|
|
|
if (memEQ(name, "S_IRWXO", 7)) { |
417
|
|
|
|
|
|
/* ^ */ |
418
|
|
|
|
|
|
#ifdef S_IRWXO |
419
|
4
|
|
|
|
|
*iv_return = S_IRWXO; |
420
|
4
|
|
|
|
|
return PERL_constant_ISIV; |
421
|
|
|
|
|
|
#else |
422
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
423
|
|
|
|
|
|
#endif |
424
|
|
|
|
|
|
} |
425
|
10
|
|
|
|
|
if (memEQ(name, "S_IRWXU", 7)) { |
426
|
|
|
|
|
|
/* ^ */ |
427
|
|
|
|
|
|
#ifdef S_IRWXU |
428
|
10
|
|
|
|
|
*iv_return = S_IRWXU; |
429
|
10
|
|
|
|
|
return PERL_constant_ISIV; |
430
|
|
|
|
|
|
#else |
431
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
432
|
|
|
|
|
|
#endif |
433
|
|
|
|
|
|
} |
434
|
|
|
|
|
|
break; |
435
|
|
|
|
|
|
} |
436
|
0
|
|
|
|
|
return PERL_constant_NOTFOUND; |
437
|
|
|
|
|
|
} |
438
|
|
|
|
|
|
|
439
|
|
|
|
|
|
static int |
440
|
18
|
|
|
|
|
_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
|
18
|
|
|
|
|
switch (name[4]) { |
448
|
|
|
|
|
|
case 'C': |
449
|
0
|
|
|
|
|
if (memEQ(name, "SHM_COPY", 8)) { |
450
|
|
|
|
|
|
/* ^ */ |
451
|
|
|
|
|
|
#ifdef SHM_COPY |
452
|
|
|
|
|
|
*iv_return = SHM_COPY; |
453
|
|
|
|
|
|
return PERL_constant_ISIV; |
454
|
|
|
|
|
|
#else |
455
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
456
|
|
|
|
|
|
#endif |
457
|
|
|
|
|
|
} |
458
|
|
|
|
|
|
break; |
459
|
|
|
|
|
|
case 'D': |
460
|
0
|
|
|
|
|
if (memEQ(name, "SEM_DEST", 8)) { |
461
|
|
|
|
|
|
/* ^ */ |
462
|
|
|
|
|
|
#ifdef SEM_DEST |
463
|
|
|
|
|
|
*iv_return = SEM_DEST; |
464
|
|
|
|
|
|
return PERL_constant_ISIV; |
465
|
|
|
|
|
|
#else |
466
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
467
|
|
|
|
|
|
#endif |
468
|
|
|
|
|
|
} |
469
|
0
|
|
|
|
|
if (memEQ(name, "SHM_DEST", 8)) { |
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
|
|
|
|
|
|
break; |
479
|
|
|
|
|
|
case 'E': |
480
|
0
|
|
|
|
|
if (memEQ(name, "IPC_EXCL", 8)) { |
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
|
|
|
|
|
|
break; |
490
|
|
|
|
|
|
case 'F': |
491
|
0
|
|
|
|
|
if (memEQ(name, "SHM_FMAP", 8)) { |
492
|
|
|
|
|
|
/* ^ */ |
493
|
|
|
|
|
|
#ifdef SHM_FMAP |
494
|
|
|
|
|
|
*iv_return = SHM_FMAP; |
495
|
|
|
|
|
|
return PERL_constant_ISIV; |
496
|
|
|
|
|
|
#else |
497
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
498
|
|
|
|
|
|
#endif |
499
|
|
|
|
|
|
} |
500
|
|
|
|
|
|
break; |
501
|
|
|
|
|
|
case 'I': |
502
|
0
|
|
|
|
|
if (memEQ(name, "IPC_INFO", 8)) { |
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)) { |
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)) { |
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)) { |
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)) { |
539
|
|
|
|
|
|
/* ^ */ |
540
|
|
|
|
|
|
#ifdef SHM_INIT |
541
|
|
|
|
|
|
*iv_return = SHM_INIT; |
542
|
|
|
|
|
|
return PERL_constant_ISIV; |
543
|
|
|
|
|
|
#else |
544
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
545
|
|
|
|
|
|
#endif |
546
|
|
|
|
|
|
} |
547
|
|
|
|
|
|
break; |
548
|
|
|
|
|
|
case 'L': |
549
|
0
|
|
|
|
|
if (memEQ(name, "SHM_LOCK", 8)) { |
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
|
|
|
|
|
|
break; |
559
|
|
|
|
|
|
case 'R': |
560
|
10
|
|
|
|
|
if (memEQ(name, "IPC_RMID", 8)) { |
561
|
|
|
|
|
|
/* ^ */ |
562
|
|
|
|
|
|
#ifdef IPC_RMID |
563
|
10
|
|
|
|
|
*iv_return = IPC_RMID; |
564
|
10
|
|
|
|
|
return PERL_constant_ISIV; |
565
|
|
|
|
|
|
#else |
566
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
567
|
|
|
|
|
|
#endif |
568
|
|
|
|
|
|
} |
569
|
|
|
|
|
|
break; |
570
|
|
|
|
|
|
case 'S': |
571
|
8
|
|
|
|
|
if (memEQ(name, "IPC_STAT", 8)) { |
572
|
|
|
|
|
|
/* ^ */ |
573
|
|
|
|
|
|
#ifdef IPC_STAT |
574
|
8
|
|
|
|
|
*iv_return = IPC_STAT; |
575
|
8
|
|
|
|
|
return PERL_constant_ISIV; |
576
|
|
|
|
|
|
#else |
577
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
578
|
|
|
|
|
|
#endif |
579
|
|
|
|
|
|
} |
580
|
0
|
|
|
|
|
if (memEQ(name, "MSG_STAT", 8)) { |
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)) { |
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)) { |
599
|
|
|
|
|
|
/* ^ */ |
600
|
|
|
|
|
|
#ifdef SHM_SIZE |
601
|
|
|
|
|
|
*iv_return = SHM_SIZE; |
602
|
|
|
|
|
|
return PERL_constant_ISIV; |
603
|
|
|
|
|
|
#else |
604
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
605
|
|
|
|
|
|
#endif |
606
|
|
|
|
|
|
} |
607
|
0
|
|
|
|
|
if (memEQ(name, "SHM_STAT", 8)) { |
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
|
|
|
|
|
|
break; |
617
|
|
|
|
|
|
case 'U': |
618
|
0
|
|
|
|
|
if (memEQ(name, "SEM_UNDO", 8)) { |
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
|
|
|
|
|
|
break; |
628
|
|
|
|
|
|
case 'W': |
629
|
0
|
|
|
|
|
if (memEQ(name, "MSG_WAIT", 8)) { |
630
|
|
|
|
|
|
/* ^ */ |
631
|
|
|
|
|
|
#ifdef MSG_WAIT |
632
|
|
|
|
|
|
*iv_return = MSG_WAIT; |
633
|
|
|
|
|
|
return PERL_constant_ISIV; |
634
|
|
|
|
|
|
#else |
635
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
636
|
|
|
|
|
|
#endif |
637
|
|
|
|
|
|
} |
638
|
|
|
|
|
|
break; |
639
|
|
|
|
|
|
} |
640
|
0
|
|
|
|
|
return PERL_constant_NOTFOUND; |
641
|
|
|
|
|
|
} |
642
|
|
|
|
|
|
|
643
|
|
|
|
|
|
static int |
644
|
4
|
|
|
|
|
_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
|
4
|
|
|
|
|
switch (name[4]) { |
651
|
|
|
|
|
|
case 'A': |
652
|
0
|
|
|
|
|
if (memEQ(name, "IPC_ALLOC", 9)) { |
653
|
|
|
|
|
|
/* ^ */ |
654
|
|
|
|
|
|
#ifdef IPC_ALLOC |
655
|
|
|
|
|
|
*iv_return = IPC_ALLOC; |
656
|
|
|
|
|
|
return PERL_constant_ISIV; |
657
|
|
|
|
|
|
#else |
658
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
659
|
|
|
|
|
|
#endif |
660
|
|
|
|
|
|
} |
661
|
0
|
|
|
|
|
if (memEQ(name, "SEM_ALLOC", 9)) { |
662
|
|
|
|
|
|
/* ^ */ |
663
|
|
|
|
|
|
#ifdef SEM_ALLOC |
664
|
|
|
|
|
|
*iv_return = SEM_ALLOC; |
665
|
|
|
|
|
|
return PERL_constant_ISIV; |
666
|
|
|
|
|
|
#else |
667
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
668
|
|
|
|
|
|
#endif |
669
|
|
|
|
|
|
} |
670
|
|
|
|
|
|
break; |
671
|
|
|
|
|
|
case 'C': |
672
|
4
|
|
|
|
|
if (memEQ(name, "IPC_CREAT", 9)) { |
673
|
|
|
|
|
|
/* ^ */ |
674
|
|
|
|
|
|
#ifdef IPC_CREAT |
675
|
4
|
|
|
|
|
*iv_return = IPC_CREAT; |
676
|
4
|
|
|
|
|
return PERL_constant_ISIV; |
677
|
|
|
|
|
|
#else |
678
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
679
|
|
|
|
|
|
#endif |
680
|
|
|
|
|
|
} |
681
|
0
|
|
|
|
|
if (memEQ(name, "SHM_CLEAR", 9)) { |
682
|
|
|
|
|
|
/* ^ */ |
683
|
|
|
|
|
|
#ifdef SHM_CLEAR |
684
|
|
|
|
|
|
*iv_return = SHM_CLEAR; |
685
|
|
|
|
|
|
return PERL_constant_ISIV; |
686
|
|
|
|
|
|
#else |
687
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
688
|
|
|
|
|
|
#endif |
689
|
|
|
|
|
|
} |
690
|
|
|
|
|
|
break; |
691
|
|
|
|
|
|
case 'F': |
692
|
0
|
|
|
|
|
if (memEQ(name, "MSG_FWAIT", 9)) { |
693
|
|
|
|
|
|
/* ^ */ |
694
|
|
|
|
|
|
#ifdef MSG_FWAIT |
695
|
|
|
|
|
|
*iv_return = MSG_FWAIT; |
696
|
|
|
|
|
|
return PERL_constant_ISIV; |
697
|
|
|
|
|
|
#else |
698
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
699
|
|
|
|
|
|
#endif |
700
|
|
|
|
|
|
} |
701
|
|
|
|
|
|
break; |
702
|
|
|
|
|
|
case 'M': |
703
|
0
|
|
|
|
|
if (memEQ(name, "MSG_MWAIT", 9)) { |
704
|
|
|
|
|
|
/* ^ */ |
705
|
|
|
|
|
|
#ifdef MSG_MWAIT |
706
|
|
|
|
|
|
*iv_return = MSG_MWAIT; |
707
|
|
|
|
|
|
return PERL_constant_ISIV; |
708
|
|
|
|
|
|
#else |
709
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
710
|
|
|
|
|
|
#endif |
711
|
|
|
|
|
|
} |
712
|
|
|
|
|
|
break; |
713
|
|
|
|
|
|
case 'O': |
714
|
0
|
|
|
|
|
if (memEQ(name, "SEM_ORDER", 9)) { |
715
|
|
|
|
|
|
/* ^ */ |
716
|
|
|
|
|
|
#ifdef SEM_ORDER |
717
|
|
|
|
|
|
*iv_return = SEM_ORDER; |
718
|
|
|
|
|
|
return PERL_constant_ISIV; |
719
|
|
|
|
|
|
#else |
720
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
721
|
|
|
|
|
|
#endif |
722
|
|
|
|
|
|
} |
723
|
|
|
|
|
|
break; |
724
|
|
|
|
|
|
case 'Q': |
725
|
0
|
|
|
|
|
if (memEQ(name, "MSG_QWAIT", 9)) { |
726
|
|
|
|
|
|
/* ^ */ |
727
|
|
|
|
|
|
#ifdef MSG_QWAIT |
728
|
|
|
|
|
|
*iv_return = MSG_QWAIT; |
729
|
|
|
|
|
|
return PERL_constant_ISIV; |
730
|
|
|
|
|
|
#else |
731
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
732
|
|
|
|
|
|
#endif |
733
|
|
|
|
|
|
} |
734
|
|
|
|
|
|
break; |
735
|
|
|
|
|
|
case 'R': |
736
|
0
|
|
|
|
|
if (memEQ(name, "MSG_RWAIT", 9)) { |
737
|
|
|
|
|
|
/* ^ */ |
738
|
|
|
|
|
|
#ifdef MSG_RWAIT |
739
|
|
|
|
|
|
*iv_return = MSG_RWAIT; |
740
|
|
|
|
|
|
return PERL_constant_ISIV; |
741
|
|
|
|
|
|
#else |
742
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
743
|
|
|
|
|
|
#endif |
744
|
|
|
|
|
|
} |
745
|
0
|
|
|
|
|
if (memEQ(name, "SHM_REMAP", 9)) { |
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
|
|
|
|
|
|
break; |
755
|
|
|
|
|
|
case 'W': |
756
|
0
|
|
|
|
|
if (memEQ(name, "MSG_WWAIT", 9)) { |
757
|
|
|
|
|
|
/* ^ */ |
758
|
|
|
|
|
|
#ifdef MSG_WWAIT |
759
|
|
|
|
|
|
*iv_return = MSG_WWAIT; |
760
|
|
|
|
|
|
return PERL_constant_ISIV; |
761
|
|
|
|
|
|
#else |
762
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
763
|
|
|
|
|
|
#endif |
764
|
|
|
|
|
|
} |
765
|
|
|
|
|
|
break; |
766
|
|
|
|
|
|
} |
767
|
0
|
|
|
|
|
return PERL_constant_NOTFOUND; |
768
|
|
|
|
|
|
} |
769
|
|
|
|
|
|
|
770
|
|
|
|
|
|
static int |
771
|
6
|
|
|
|
|
_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
|
6
|
|
|
|
|
switch (name[4]) { |
779
|
|
|
|
|
|
case 'D': |
780
|
0
|
|
|
|
|
if (memEQ(name, "SHM_DCACHE", 10)) { |
781
|
|
|
|
|
|
/* ^ */ |
782
|
|
|
|
|
|
#ifdef SHM_DCACHE |
783
|
|
|
|
|
|
*iv_return = SHM_DCACHE; |
784
|
|
|
|
|
|
return PERL_constant_ISIV; |
785
|
|
|
|
|
|
#else |
786
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
787
|
|
|
|
|
|
#endif |
788
|
|
|
|
|
|
} |
789
|
|
|
|
|
|
break; |
790
|
|
|
|
|
|
case 'E': |
791
|
0
|
|
|
|
|
if (memEQ(name, "MSG_EXCEPT", 10)) { |
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)) { |
801
|
|
|
|
|
|
/* ^ */ |
802
|
|
|
|
|
|
#ifdef SHM_ECACHE |
803
|
|
|
|
|
|
*iv_return = SHM_ECACHE; |
804
|
|
|
|
|
|
return PERL_constant_ISIV; |
805
|
|
|
|
|
|
#else |
806
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
807
|
|
|
|
|
|
#endif |
808
|
|
|
|
|
|
} |
809
|
|
|
|
|
|
break; |
810
|
|
|
|
|
|
case 'G': |
811
|
0
|
|
|
|
|
if (memEQ(name, "IPC_GETACL", 10)) { |
812
|
|
|
|
|
|
/* ^ */ |
813
|
|
|
|
|
|
#ifdef IPC_GETACL |
814
|
|
|
|
|
|
*iv_return = IPC_GETACL; |
815
|
|
|
|
|
|
return PERL_constant_ISIV; |
816
|
|
|
|
|
|
#else |
817
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
818
|
|
|
|
|
|
#endif |
819
|
|
|
|
|
|
} |
820
|
|
|
|
|
|
break; |
821
|
|
|
|
|
|
case 'I': |
822
|
0
|
|
|
|
|
if (memEQ(name, "SHM_ICACHE", 10)) { |
823
|
|
|
|
|
|
/* ^ */ |
824
|
|
|
|
|
|
#ifdef SHM_ICACHE |
825
|
|
|
|
|
|
*iv_return = SHM_ICACHE; |
826
|
|
|
|
|
|
return PERL_constant_ISIV; |
827
|
|
|
|
|
|
#else |
828
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
829
|
|
|
|
|
|
#endif |
830
|
|
|
|
|
|
} |
831
|
|
|
|
|
|
break; |
832
|
|
|
|
|
|
case 'L': |
833
|
0
|
|
|
|
|
if (memEQ(name, "IPC_LOCKED", 10)) { |
834
|
|
|
|
|
|
/* ^ */ |
835
|
|
|
|
|
|
#ifdef IPC_LOCKED |
836
|
|
|
|
|
|
*iv_return = IPC_LOCKED; |
837
|
|
|
|
|
|
return PERL_constant_ISIV; |
838
|
|
|
|
|
|
#else |
839
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
840
|
|
|
|
|
|
#endif |
841
|
|
|
|
|
|
} |
842
|
0
|
|
|
|
|
if (memEQ(name, "MSG_LOCKED", 10)) { |
843
|
|
|
|
|
|
/* ^ */ |
844
|
|
|
|
|
|
#ifdef MSG_LOCKED |
845
|
|
|
|
|
|
*iv_return = MSG_LOCKED; |
846
|
|
|
|
|
|
return PERL_constant_ISIV; |
847
|
|
|
|
|
|
#else |
848
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
849
|
|
|
|
|
|
#endif |
850
|
|
|
|
|
|
} |
851
|
0
|
|
|
|
|
if (memEQ(name, "SHM_LOCKED", 10)) { |
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
|
|
|
|
|
|
break; |
861
|
|
|
|
|
|
case 'N': |
862
|
6
|
|
|
|
|
if (memEQ(name, "IPC_NOWAIT", 10)) { |
863
|
|
|
|
|
|
/* ^ */ |
864
|
|
|
|
|
|
#ifdef IPC_NOWAIT |
865
|
6
|
|
|
|
|
*iv_return = IPC_NOWAIT; |
866
|
6
|
|
|
|
|
return PERL_constant_ISIV; |
867
|
|
|
|
|
|
#else |
868
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
869
|
|
|
|
|
|
#endif |
870
|
|
|
|
|
|
} |
871
|
0
|
|
|
|
|
if (memEQ(name, "SHM_NOSWAP", 10)) { |
872
|
|
|
|
|
|
/* ^ */ |
873
|
|
|
|
|
|
#ifdef SHM_NOSWAP |
874
|
|
|
|
|
|
*iv_return = SHM_NOSWAP; |
875
|
|
|
|
|
|
return PERL_constant_ISIV; |
876
|
|
|
|
|
|
#else |
877
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
878
|
|
|
|
|
|
#endif |
879
|
|
|
|
|
|
} |
880
|
|
|
|
|
|
break; |
881
|
|
|
|
|
|
case 'R': |
882
|
0
|
|
|
|
|
if (memEQ(name, "SHM_RDONLY", 10)) { |
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
|
|
|
|
|
|
break; |
892
|
|
|
|
|
|
case 'S': |
893
|
0
|
|
|
|
|
if (memEQ(name, "IPC_SETACL", 10)) { |
894
|
|
|
|
|
|
/* ^ */ |
895
|
|
|
|
|
|
#ifdef IPC_SETACL |
896
|
|
|
|
|
|
*iv_return = IPC_SETACL; |
897
|
|
|
|
|
|
return PERL_constant_ISIV; |
898
|
|
|
|
|
|
#else |
899
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
900
|
|
|
|
|
|
#endif |
901
|
|
|
|
|
|
} |
902
|
0
|
|
|
|
|
if (memEQ(name, "SHM_SHATTR", 10)) { |
903
|
|
|
|
|
|
/* ^ */ |
904
|
|
|
|
|
|
#ifdef SHM_SHATTR |
905
|
|
|
|
|
|
*iv_return = SHM_SHATTR; |
906
|
|
|
|
|
|
return PERL_constant_ISIV; |
907
|
|
|
|
|
|
#else |
908
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
909
|
|
|
|
|
|
#endif |
910
|
|
|
|
|
|
} |
911
|
|
|
|
|
|
break; |
912
|
|
|
|
|
|
case 'U': |
913
|
0
|
|
|
|
|
if (memEQ(name, "SHM_UNLOCK", 10)) { |
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
|
|
|
|
|
|
break; |
923
|
|
|
|
|
|
case 'W': |
924
|
0
|
|
|
|
|
if (memEQ(name, "IPC_WANTED", 10)) { |
925
|
|
|
|
|
|
/* ^ */ |
926
|
|
|
|
|
|
#ifdef IPC_WANTED |
927
|
|
|
|
|
|
*iv_return = IPC_WANTED; |
928
|
|
|
|
|
|
return PERL_constant_ISIV; |
929
|
|
|
|
|
|
#else |
930
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
931
|
|
|
|
|
|
#endif |
932
|
|
|
|
|
|
} |
933
|
|
|
|
|
|
break; |
934
|
|
|
|
|
|
} |
935
|
0
|
|
|
|
|
return PERL_constant_NOTFOUND; |
936
|
|
|
|
|
|
} |
937
|
|
|
|
|
|
|
938
|
|
|
|
|
|
static int |
939
|
10
|
|
|
|
|
_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
|
10
|
|
|
|
|
switch (name[6]) { |
945
|
|
|
|
|
|
case 'E': |
946
|
0
|
|
|
|
|
if (memEQ(name, "IPC_NOERROR", 11)) { |
947
|
|
|
|
|
|
/* ^ */ |
948
|
|
|
|
|
|
#ifdef IPC_NOERROR |
949
|
|
|
|
|
|
*iv_return = IPC_NOERROR; |
950
|
|
|
|
|
|
return PERL_constant_ISIV; |
951
|
|
|
|
|
|
#else |
952
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
953
|
|
|
|
|
|
#endif |
954
|
|
|
|
|
|
} |
955
|
0
|
|
|
|
|
if (memEQ(name, "MSG_NOERROR", 11)) { |
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
|
|
|
|
|
|
break; |
965
|
|
|
|
|
|
case 'G': |
966
|
0
|
|
|
|
|
if (memEQ(name, "SHM_HUGETLB", 11)) { |
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
|
|
|
|
|
|
break; |
976
|
|
|
|
|
|
case 'I': |
977
|
10
|
|
|
|
|
if (memEQ(name, "IPC_PRIVATE", 11)) { |
978
|
|
|
|
|
|
/* ^ */ |
979
|
|
|
|
|
|
#ifdef IPC_PRIVATE |
980
|
10
|
|
|
|
|
*iv_return = IPC_PRIVATE; |
981
|
10
|
|
|
|
|
return PERL_constant_ISIV; |
982
|
|
|
|
|
|
#else |
983
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
984
|
|
|
|
|
|
#endif |
985
|
|
|
|
|
|
} |
986
|
|
|
|
|
|
break; |
987
|
|
|
|
|
|
case 'M': |
988
|
0
|
|
|
|
|
if (memEQ(name, "SHM_REMOVED", 11)) { |
989
|
|
|
|
|
|
/* ^ */ |
990
|
|
|
|
|
|
#ifdef SHM_REMOVED |
991
|
|
|
|
|
|
*iv_return = SHM_REMOVED; |
992
|
|
|
|
|
|
return PERL_constant_ISIV; |
993
|
|
|
|
|
|
#else |
994
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
995
|
|
|
|
|
|
#endif |
996
|
|
|
|
|
|
} |
997
|
|
|
|
|
|
break; |
998
|
|
|
|
|
|
} |
999
|
0
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1000
|
|
|
|
|
|
} |
1001
|
|
|
|
|
|
|
1002
|
|
|
|
|
|
static int |
1003
|
66
|
|
|
|
|
_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
|
|
|
|
|
|
#!/home/pjcj/g/Test-Smoke/perl-current-gcov/miniperl -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__ |