line |
stmt |
bran |
cond |
sub |
time |
code |
1
|
|
|
|
|
|
BOOT: |
2
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
#ifdef dTHX |
4
|
|
|
|
|
|
dTHX; |
5
|
|
|
|
|
|
#endif |
6
|
5200
|
|
|
|
|
HV *symbol_table = get_hv("Fcntl::", GV_ADD); |
7
|
|
|
|
|
|
|
8
|
|
|
|
|
|
static const struct iv_s values_for_iv[] = |
9
|
|
|
|
|
|
{ |
10
|
|
|
|
|
|
#ifdef DN_ACCESS |
11
|
|
|
|
|
|
{ "DN_ACCESS", 9, DN_ACCESS }, |
12
|
|
|
|
|
|
#endif |
13
|
|
|
|
|
|
#ifdef DN_MODIFY |
14
|
|
|
|
|
|
{ "DN_MODIFY", 9, DN_MODIFY }, |
15
|
|
|
|
|
|
#endif |
16
|
|
|
|
|
|
#ifdef DN_CREATE |
17
|
|
|
|
|
|
{ "DN_CREATE", 9, DN_CREATE }, |
18
|
|
|
|
|
|
#endif |
19
|
|
|
|
|
|
#ifdef DN_DELETE |
20
|
|
|
|
|
|
{ "DN_DELETE", 9, DN_DELETE }, |
21
|
|
|
|
|
|
#endif |
22
|
|
|
|
|
|
#ifdef DN_RENAME |
23
|
|
|
|
|
|
{ "DN_RENAME", 9, DN_RENAME }, |
24
|
|
|
|
|
|
#endif |
25
|
|
|
|
|
|
#ifdef DN_ATTRIB |
26
|
|
|
|
|
|
{ "DN_ATTRIB", 9, DN_ATTRIB }, |
27
|
|
|
|
|
|
#endif |
28
|
|
|
|
|
|
#ifdef DN_MULTISHOT |
29
|
|
|
|
|
|
{ "DN_MULTISHOT", 12, DN_MULTISHOT }, |
30
|
|
|
|
|
|
#endif |
31
|
|
|
|
|
|
#ifdef FAPPEND |
32
|
|
|
|
|
|
{ "FAPPEND", 7, FAPPEND }, |
33
|
|
|
|
|
|
#endif |
34
|
|
|
|
|
|
#ifdef FASYNC |
35
|
|
|
|
|
|
{ "FASYNC", 6, FASYNC }, |
36
|
|
|
|
|
|
#endif |
37
|
|
|
|
|
|
#ifdef FCREAT |
38
|
|
|
|
|
|
{ "FCREAT", 6, FCREAT }, |
39
|
|
|
|
|
|
#endif |
40
|
|
|
|
|
|
#ifdef FDEFER |
41
|
|
|
|
|
|
{ "FDEFER", 6, FDEFER }, |
42
|
|
|
|
|
|
#endif |
43
|
|
|
|
|
|
#ifdef FDSYNC |
44
|
|
|
|
|
|
{ "FDSYNC", 6, FDSYNC }, |
45
|
|
|
|
|
|
#endif |
46
|
|
|
|
|
|
#ifdef FD_CLOEXEC |
47
|
|
|
|
|
|
{ "FD_CLOEXEC", 10, FD_CLOEXEC }, |
48
|
|
|
|
|
|
#endif |
49
|
|
|
|
|
|
#ifdef FEXCL |
50
|
|
|
|
|
|
{ "FEXCL", 5, FEXCL }, |
51
|
|
|
|
|
|
#endif |
52
|
|
|
|
|
|
#ifdef FLARGEFILE |
53
|
|
|
|
|
|
{ "FLARGEFILE", 10, FLARGEFILE }, |
54
|
|
|
|
|
|
#endif |
55
|
|
|
|
|
|
#ifdef FNDELAY |
56
|
|
|
|
|
|
{ "FNDELAY", 7, FNDELAY }, |
57
|
|
|
|
|
|
#endif |
58
|
|
|
|
|
|
#ifdef FNONBLOCK |
59
|
|
|
|
|
|
{ "FNONBLOCK", 9, FNONBLOCK }, |
60
|
|
|
|
|
|
#endif |
61
|
|
|
|
|
|
#ifdef FRSYNC |
62
|
|
|
|
|
|
{ "FRSYNC", 6, FRSYNC }, |
63
|
|
|
|
|
|
#endif |
64
|
|
|
|
|
|
#ifdef FSYNC |
65
|
|
|
|
|
|
{ "FSYNC", 5, FSYNC }, |
66
|
|
|
|
|
|
#endif |
67
|
|
|
|
|
|
#ifdef FTRUNC |
68
|
|
|
|
|
|
{ "FTRUNC", 6, FTRUNC }, |
69
|
|
|
|
|
|
#endif |
70
|
|
|
|
|
|
#ifdef F_ALLOCSP |
71
|
|
|
|
|
|
{ "F_ALLOCSP", 9, F_ALLOCSP }, |
72
|
|
|
|
|
|
#endif |
73
|
|
|
|
|
|
#ifdef F_ALLOCSP64 |
74
|
|
|
|
|
|
{ "F_ALLOCSP64", 11, F_ALLOCSP64 }, |
75
|
|
|
|
|
|
#endif |
76
|
|
|
|
|
|
#ifdef F_COMPAT |
77
|
|
|
|
|
|
{ "F_COMPAT", 8, F_COMPAT }, |
78
|
|
|
|
|
|
#endif |
79
|
|
|
|
|
|
#ifdef F_DUP2FD |
80
|
|
|
|
|
|
{ "F_DUP2FD", 8, F_DUP2FD }, |
81
|
|
|
|
|
|
#endif |
82
|
|
|
|
|
|
#ifdef F_DUPFD |
83
|
|
|
|
|
|
{ "F_DUPFD", 7, F_DUPFD }, |
84
|
|
|
|
|
|
#endif |
85
|
|
|
|
|
|
#ifdef F_EXLCK |
86
|
|
|
|
|
|
{ "F_EXLCK", 7, F_EXLCK }, |
87
|
|
|
|
|
|
#endif |
88
|
|
|
|
|
|
#ifdef F_FREESP |
89
|
|
|
|
|
|
{ "F_FREESP", 8, F_FREESP }, |
90
|
|
|
|
|
|
#endif |
91
|
|
|
|
|
|
#ifdef F_FREESP64 |
92
|
|
|
|
|
|
{ "F_FREESP64", 10, F_FREESP64 }, |
93
|
|
|
|
|
|
#endif |
94
|
|
|
|
|
|
#ifdef F_FSYNC |
95
|
|
|
|
|
|
{ "F_FSYNC", 7, F_FSYNC }, |
96
|
|
|
|
|
|
#endif |
97
|
|
|
|
|
|
#ifdef F_FSYNC64 |
98
|
|
|
|
|
|
{ "F_FSYNC64", 9, F_FSYNC64 }, |
99
|
|
|
|
|
|
#endif |
100
|
|
|
|
|
|
#ifdef F_GETFD |
101
|
|
|
|
|
|
{ "F_GETFD", 7, F_GETFD }, |
102
|
|
|
|
|
|
#endif |
103
|
|
|
|
|
|
#ifdef F_GETFL |
104
|
|
|
|
|
|
{ "F_GETFL", 7, F_GETFL }, |
105
|
|
|
|
|
|
#endif |
106
|
|
|
|
|
|
#ifdef F_GETLEASE |
107
|
|
|
|
|
|
{ "F_GETLEASE", 10, F_GETLEASE }, |
108
|
|
|
|
|
|
#endif |
109
|
|
|
|
|
|
#ifdef F_GETLK |
110
|
|
|
|
|
|
{ "F_GETLK", 7, F_GETLK }, |
111
|
|
|
|
|
|
#endif |
112
|
|
|
|
|
|
#ifdef F_GETLK64 |
113
|
|
|
|
|
|
{ "F_GETLK64", 9, F_GETLK64 }, |
114
|
|
|
|
|
|
#endif |
115
|
|
|
|
|
|
#ifdef F_GETOWN |
116
|
|
|
|
|
|
{ "F_GETOWN", 8, F_GETOWN }, |
117
|
|
|
|
|
|
#endif |
118
|
|
|
|
|
|
#ifdef F_GETSIG |
119
|
|
|
|
|
|
{ "F_GETSIG", 8, F_GETSIG }, |
120
|
|
|
|
|
|
#endif |
121
|
|
|
|
|
|
#ifdef F_NODNY |
122
|
|
|
|
|
|
{ "F_NODNY", 7, F_NODNY }, |
123
|
|
|
|
|
|
#endif |
124
|
|
|
|
|
|
#ifdef F_NOTIFY |
125
|
|
|
|
|
|
{ "F_NOTIFY", 8, F_NOTIFY }, |
126
|
|
|
|
|
|
#endif |
127
|
|
|
|
|
|
#ifdef F_POSIX |
128
|
|
|
|
|
|
{ "F_POSIX", 7, F_POSIX }, |
129
|
|
|
|
|
|
#endif |
130
|
|
|
|
|
|
#ifdef F_RDACC |
131
|
|
|
|
|
|
{ "F_RDACC", 7, F_RDACC }, |
132
|
|
|
|
|
|
#endif |
133
|
|
|
|
|
|
#ifdef F_RDDNY |
134
|
|
|
|
|
|
{ "F_RDDNY", 7, F_RDDNY }, |
135
|
|
|
|
|
|
#endif |
136
|
|
|
|
|
|
#ifdef F_RDLCK |
137
|
|
|
|
|
|
{ "F_RDLCK", 7, F_RDLCK }, |
138
|
|
|
|
|
|
#endif |
139
|
|
|
|
|
|
#ifdef F_RWACC |
140
|
|
|
|
|
|
{ "F_RWACC", 7, F_RWACC }, |
141
|
|
|
|
|
|
#endif |
142
|
|
|
|
|
|
#ifdef F_RWDNY |
143
|
|
|
|
|
|
{ "F_RWDNY", 7, F_RWDNY }, |
144
|
|
|
|
|
|
#endif |
145
|
|
|
|
|
|
#ifdef F_SETFD |
146
|
|
|
|
|
|
{ "F_SETFD", 7, F_SETFD }, |
147
|
|
|
|
|
|
#endif |
148
|
|
|
|
|
|
#ifdef F_SETFL |
149
|
|
|
|
|
|
{ "F_SETFL", 7, F_SETFL }, |
150
|
|
|
|
|
|
#endif |
151
|
|
|
|
|
|
#ifdef F_SETLEASE |
152
|
|
|
|
|
|
{ "F_SETLEASE", 10, F_SETLEASE }, |
153
|
|
|
|
|
|
#endif |
154
|
|
|
|
|
|
#ifdef F_SETLK |
155
|
|
|
|
|
|
{ "F_SETLK", 7, F_SETLK }, |
156
|
|
|
|
|
|
#endif |
157
|
|
|
|
|
|
#ifdef F_SETLK64 |
158
|
|
|
|
|
|
{ "F_SETLK64", 9, F_SETLK64 }, |
159
|
|
|
|
|
|
#endif |
160
|
|
|
|
|
|
#ifdef F_SETLKW |
161
|
|
|
|
|
|
{ "F_SETLKW", 8, F_SETLKW }, |
162
|
|
|
|
|
|
#endif |
163
|
|
|
|
|
|
#ifdef F_SETLKW64 |
164
|
|
|
|
|
|
{ "F_SETLKW64", 10, F_SETLKW64 }, |
165
|
|
|
|
|
|
#endif |
166
|
|
|
|
|
|
#ifdef F_SETOWN |
167
|
|
|
|
|
|
{ "F_SETOWN", 8, F_SETOWN }, |
168
|
|
|
|
|
|
#endif |
169
|
|
|
|
|
|
#ifdef F_SETSIG |
170
|
|
|
|
|
|
{ "F_SETSIG", 8, F_SETSIG }, |
171
|
|
|
|
|
|
#endif |
172
|
|
|
|
|
|
#ifdef F_SHARE |
173
|
|
|
|
|
|
{ "F_SHARE", 7, F_SHARE }, |
174
|
|
|
|
|
|
#endif |
175
|
|
|
|
|
|
#ifdef F_SHLCK |
176
|
|
|
|
|
|
{ "F_SHLCK", 7, F_SHLCK }, |
177
|
|
|
|
|
|
#endif |
178
|
|
|
|
|
|
#ifdef F_UNLCK |
179
|
|
|
|
|
|
{ "F_UNLCK", 7, F_UNLCK }, |
180
|
|
|
|
|
|
#endif |
181
|
|
|
|
|
|
#ifdef F_UNSHARE |
182
|
|
|
|
|
|
{ "F_UNSHARE", 9, F_UNSHARE }, |
183
|
|
|
|
|
|
#endif |
184
|
|
|
|
|
|
#ifdef F_WRACC |
185
|
|
|
|
|
|
{ "F_WRACC", 7, F_WRACC }, |
186
|
|
|
|
|
|
#endif |
187
|
|
|
|
|
|
#ifdef F_WRDNY |
188
|
|
|
|
|
|
{ "F_WRDNY", 7, F_WRDNY }, |
189
|
|
|
|
|
|
#endif |
190
|
|
|
|
|
|
#ifdef F_WRLCK |
191
|
|
|
|
|
|
{ "F_WRLCK", 7, F_WRLCK }, |
192
|
|
|
|
|
|
#endif |
193
|
|
|
|
|
|
#ifdef LOCK_MAND |
194
|
|
|
|
|
|
{ "LOCK_MAND", 9, LOCK_MAND }, |
195
|
|
|
|
|
|
#endif |
196
|
|
|
|
|
|
#ifdef LOCK_READ |
197
|
|
|
|
|
|
{ "LOCK_READ", 9, LOCK_READ }, |
198
|
|
|
|
|
|
#endif |
199
|
|
|
|
|
|
#ifdef LOCK_WRITE |
200
|
|
|
|
|
|
{ "LOCK_WRITE", 10, LOCK_WRITE }, |
201
|
|
|
|
|
|
#endif |
202
|
|
|
|
|
|
#ifdef LOCK_RW |
203
|
|
|
|
|
|
{ "LOCK_RW", 7, LOCK_RW }, |
204
|
|
|
|
|
|
#endif |
205
|
|
|
|
|
|
#ifdef O_ACCMODE |
206
|
|
|
|
|
|
{ "O_ACCMODE", 9, O_ACCMODE }, |
207
|
|
|
|
|
|
#endif |
208
|
|
|
|
|
|
#ifdef O_ALIAS |
209
|
|
|
|
|
|
{ "O_ALIAS", 7, O_ALIAS }, |
210
|
|
|
|
|
|
#endif |
211
|
|
|
|
|
|
#ifdef O_APPEND |
212
|
|
|
|
|
|
{ "O_APPEND", 8, O_APPEND }, |
213
|
|
|
|
|
|
#endif |
214
|
|
|
|
|
|
#ifdef O_ASYNC |
215
|
|
|
|
|
|
{ "O_ASYNC", 7, O_ASYNC }, |
216
|
|
|
|
|
|
#endif |
217
|
|
|
|
|
|
#ifdef O_BINARY |
218
|
|
|
|
|
|
{ "O_BINARY", 8, O_BINARY }, |
219
|
|
|
|
|
|
#endif |
220
|
|
|
|
|
|
#ifdef O_CREAT |
221
|
|
|
|
|
|
{ "O_CREAT", 7, O_CREAT }, |
222
|
|
|
|
|
|
#endif |
223
|
|
|
|
|
|
#ifdef O_DEFER |
224
|
|
|
|
|
|
{ "O_DEFER", 7, O_DEFER }, |
225
|
|
|
|
|
|
#endif |
226
|
|
|
|
|
|
#ifdef O_DIRECT |
227
|
|
|
|
|
|
{ "O_DIRECT", 8, O_DIRECT }, |
228
|
|
|
|
|
|
#endif |
229
|
|
|
|
|
|
#ifdef O_DIRECTORY |
230
|
|
|
|
|
|
{ "O_DIRECTORY", 11, O_DIRECTORY }, |
231
|
|
|
|
|
|
#endif |
232
|
|
|
|
|
|
#ifdef O_DSYNC |
233
|
|
|
|
|
|
{ "O_DSYNC", 7, O_DSYNC }, |
234
|
|
|
|
|
|
#endif |
235
|
|
|
|
|
|
#ifdef O_EXCL |
236
|
|
|
|
|
|
{ "O_EXCL", 6, O_EXCL }, |
237
|
|
|
|
|
|
#endif |
238
|
|
|
|
|
|
#ifdef O_EXLOCK |
239
|
|
|
|
|
|
{ "O_EXLOCK", 8, O_EXLOCK }, |
240
|
|
|
|
|
|
#endif |
241
|
|
|
|
|
|
#ifdef O_IGNORE_CTTY |
242
|
|
|
|
|
|
{ "O_IGNORE_CTTY", 13, O_IGNORE_CTTY }, |
243
|
|
|
|
|
|
#endif |
244
|
|
|
|
|
|
#ifdef O_LARGEFILE |
245
|
|
|
|
|
|
{ "O_LARGEFILE", 11, O_LARGEFILE }, |
246
|
|
|
|
|
|
#endif |
247
|
|
|
|
|
|
#ifdef O_NDELAY |
248
|
|
|
|
|
|
{ "O_NDELAY", 8, O_NDELAY }, |
249
|
|
|
|
|
|
#endif |
250
|
|
|
|
|
|
#ifdef O_NOATIME |
251
|
|
|
|
|
|
{ "O_NOATIME", 9, O_NOATIME }, |
252
|
|
|
|
|
|
#endif |
253
|
|
|
|
|
|
#ifdef O_NOCTTY |
254
|
|
|
|
|
|
{ "O_NOCTTY", 8, O_NOCTTY }, |
255
|
|
|
|
|
|
#endif |
256
|
|
|
|
|
|
#ifdef O_NOFOLLOW |
257
|
|
|
|
|
|
{ "O_NOFOLLOW", 10, O_NOFOLLOW }, |
258
|
|
|
|
|
|
#endif |
259
|
|
|
|
|
|
#ifdef O_NOINHERIT |
260
|
|
|
|
|
|
{ "O_NOINHERIT", 11, O_NOINHERIT }, |
261
|
|
|
|
|
|
#endif |
262
|
|
|
|
|
|
#ifdef O_NOLINK |
263
|
|
|
|
|
|
{ "O_NOLINK", 8, O_NOLINK }, |
264
|
|
|
|
|
|
#endif |
265
|
|
|
|
|
|
#ifdef O_NONBLOCK |
266
|
|
|
|
|
|
{ "O_NONBLOCK", 10, O_NONBLOCK }, |
267
|
|
|
|
|
|
#endif |
268
|
|
|
|
|
|
#ifdef O_NOTRANS |
269
|
|
|
|
|
|
{ "O_NOTRANS", 9, O_NOTRANS }, |
270
|
|
|
|
|
|
#endif |
271
|
|
|
|
|
|
#ifdef O_RANDOM |
272
|
|
|
|
|
|
{ "O_RANDOM", 8, O_RANDOM }, |
273
|
|
|
|
|
|
#endif |
274
|
|
|
|
|
|
#ifdef O_RAW |
275
|
|
|
|
|
|
{ "O_RAW", 5, O_RAW }, |
276
|
|
|
|
|
|
#endif |
277
|
|
|
|
|
|
#ifdef O_RDONLY |
278
|
|
|
|
|
|
{ "O_RDONLY", 8, O_RDONLY }, |
279
|
|
|
|
|
|
#endif |
280
|
|
|
|
|
|
#ifdef O_RDWR |
281
|
|
|
|
|
|
{ "O_RDWR", 6, O_RDWR }, |
282
|
|
|
|
|
|
#endif |
283
|
|
|
|
|
|
#ifdef O_RSRC |
284
|
|
|
|
|
|
{ "O_RSRC", 6, O_RSRC }, |
285
|
|
|
|
|
|
#endif |
286
|
|
|
|
|
|
#ifdef O_RSYNC |
287
|
|
|
|
|
|
{ "O_RSYNC", 7, O_RSYNC }, |
288
|
|
|
|
|
|
#endif |
289
|
|
|
|
|
|
#ifdef O_SEQUENTIAL |
290
|
|
|
|
|
|
{ "O_SEQUENTIAL", 12, O_SEQUENTIAL }, |
291
|
|
|
|
|
|
#endif |
292
|
|
|
|
|
|
#ifdef O_SHLOCK |
293
|
|
|
|
|
|
{ "O_SHLOCK", 8, O_SHLOCK }, |
294
|
|
|
|
|
|
#endif |
295
|
|
|
|
|
|
#ifdef O_SYNC |
296
|
|
|
|
|
|
{ "O_SYNC", 6, O_SYNC }, |
297
|
|
|
|
|
|
#endif |
298
|
|
|
|
|
|
#ifdef O_TEMPORARY |
299
|
|
|
|
|
|
{ "O_TEMPORARY", 11, O_TEMPORARY }, |
300
|
|
|
|
|
|
#endif |
301
|
|
|
|
|
|
#ifdef O_TEXT |
302
|
|
|
|
|
|
{ "O_TEXT", 6, O_TEXT }, |
303
|
|
|
|
|
|
#endif |
304
|
|
|
|
|
|
#ifdef O_TRUNC |
305
|
|
|
|
|
|
{ "O_TRUNC", 7, O_TRUNC }, |
306
|
|
|
|
|
|
#endif |
307
|
|
|
|
|
|
#ifdef O_WRONLY |
308
|
|
|
|
|
|
{ "O_WRONLY", 8, O_WRONLY }, |
309
|
|
|
|
|
|
#endif |
310
|
|
|
|
|
|
#ifdef S_ENFMT |
311
|
|
|
|
|
|
{ "S_ENFMT", 7, S_ENFMT }, |
312
|
|
|
|
|
|
#endif |
313
|
|
|
|
|
|
#ifdef S_IEXEC |
314
|
|
|
|
|
|
{ "S_IEXEC", 7, S_IEXEC }, |
315
|
|
|
|
|
|
#endif |
316
|
|
|
|
|
|
#ifdef S_IFBLK |
317
|
|
|
|
|
|
{ "S_IFBLK", 7, S_IFBLK }, |
318
|
|
|
|
|
|
#endif |
319
|
|
|
|
|
|
#ifdef S_IFCHR |
320
|
|
|
|
|
|
{ "S_IFCHR", 7, S_IFCHR }, |
321
|
|
|
|
|
|
#endif |
322
|
|
|
|
|
|
#ifdef S_IFDIR |
323
|
|
|
|
|
|
{ "S_IFDIR", 7, S_IFDIR }, |
324
|
|
|
|
|
|
#endif |
325
|
|
|
|
|
|
#ifdef S_IFIFO |
326
|
|
|
|
|
|
{ "S_IFIFO", 7, S_IFIFO }, |
327
|
|
|
|
|
|
#endif |
328
|
|
|
|
|
|
#ifdef S_IFLNK |
329
|
|
|
|
|
|
{ "S_IFLNK", 7, S_IFLNK }, |
330
|
|
|
|
|
|
#endif |
331
|
|
|
|
|
|
#ifdef S_IFREG |
332
|
|
|
|
|
|
{ "S_IFREG", 7, S_IFREG }, |
333
|
|
|
|
|
|
#endif |
334
|
|
|
|
|
|
#ifdef S_IFSOCK |
335
|
|
|
|
|
|
{ "S_IFSOCK", 8, S_IFSOCK }, |
336
|
|
|
|
|
|
#endif |
337
|
|
|
|
|
|
#ifdef S_IFWHT |
338
|
|
|
|
|
|
{ "S_IFWHT", 7, S_IFWHT }, |
339
|
|
|
|
|
|
#endif |
340
|
|
|
|
|
|
#ifdef S_IREAD |
341
|
|
|
|
|
|
{ "S_IREAD", 7, S_IREAD }, |
342
|
|
|
|
|
|
#endif |
343
|
|
|
|
|
|
#ifdef S_IRGRP |
344
|
|
|
|
|
|
{ "S_IRGRP", 7, S_IRGRP }, |
345
|
|
|
|
|
|
#endif |
346
|
|
|
|
|
|
#ifdef S_IROTH |
347
|
|
|
|
|
|
{ "S_IROTH", 7, S_IROTH }, |
348
|
|
|
|
|
|
#endif |
349
|
|
|
|
|
|
#ifdef S_IRUSR |
350
|
|
|
|
|
|
{ "S_IRUSR", 7, S_IRUSR }, |
351
|
|
|
|
|
|
#endif |
352
|
|
|
|
|
|
#ifdef S_IRWXG |
353
|
|
|
|
|
|
{ "S_IRWXG", 7, S_IRWXG }, |
354
|
|
|
|
|
|
#endif |
355
|
|
|
|
|
|
#ifdef S_IRWXO |
356
|
|
|
|
|
|
{ "S_IRWXO", 7, S_IRWXO }, |
357
|
|
|
|
|
|
#endif |
358
|
|
|
|
|
|
#ifdef S_IRWXU |
359
|
|
|
|
|
|
{ "S_IRWXU", 7, S_IRWXU }, |
360
|
|
|
|
|
|
#endif |
361
|
|
|
|
|
|
#ifdef S_ISGID |
362
|
|
|
|
|
|
{ "S_ISGID", 7, S_ISGID }, |
363
|
|
|
|
|
|
#endif |
364
|
|
|
|
|
|
#ifdef S_ISTXT |
365
|
|
|
|
|
|
{ "S_ISTXT", 7, S_ISTXT }, |
366
|
|
|
|
|
|
#endif |
367
|
|
|
|
|
|
#ifdef S_ISUID |
368
|
|
|
|
|
|
{ "S_ISUID", 7, S_ISUID }, |
369
|
|
|
|
|
|
#endif |
370
|
|
|
|
|
|
#ifdef S_ISVTX |
371
|
|
|
|
|
|
{ "S_ISVTX", 7, S_ISVTX }, |
372
|
|
|
|
|
|
#endif |
373
|
|
|
|
|
|
#ifdef S_IWGRP |
374
|
|
|
|
|
|
{ "S_IWGRP", 7, S_IWGRP }, |
375
|
|
|
|
|
|
#endif |
376
|
|
|
|
|
|
#ifdef S_IWOTH |
377
|
|
|
|
|
|
{ "S_IWOTH", 7, S_IWOTH }, |
378
|
|
|
|
|
|
#endif |
379
|
|
|
|
|
|
#ifdef S_IWRITE |
380
|
|
|
|
|
|
{ "S_IWRITE", 8, S_IWRITE }, |
381
|
|
|
|
|
|
#endif |
382
|
|
|
|
|
|
#ifdef S_IWUSR |
383
|
|
|
|
|
|
{ "S_IWUSR", 7, S_IWUSR }, |
384
|
|
|
|
|
|
#endif |
385
|
|
|
|
|
|
#ifdef S_IXGRP |
386
|
|
|
|
|
|
{ "S_IXGRP", 7, S_IXGRP }, |
387
|
|
|
|
|
|
#endif |
388
|
|
|
|
|
|
#ifdef S_IXOTH |
389
|
|
|
|
|
|
{ "S_IXOTH", 7, S_IXOTH }, |
390
|
|
|
|
|
|
#endif |
391
|
|
|
|
|
|
#ifdef S_IXUSR |
392
|
|
|
|
|
|
{ "S_IXUSR", 7, S_IXUSR }, |
393
|
|
|
|
|
|
#endif |
394
|
|
|
|
|
|
#ifdef LOCK_SH |
395
|
|
|
|
|
|
{ "LOCK_SH", 7, LOCK_SH }, |
396
|
|
|
|
|
|
#endif |
397
|
|
|
|
|
|
#ifdef LOCK_EX |
398
|
|
|
|
|
|
{ "LOCK_EX", 7, LOCK_EX }, |
399
|
|
|
|
|
|
#endif |
400
|
|
|
|
|
|
#ifdef LOCK_NB |
401
|
|
|
|
|
|
{ "LOCK_NB", 7, LOCK_NB }, |
402
|
|
|
|
|
|
#endif |
403
|
|
|
|
|
|
#ifdef LOCK_UN |
404
|
|
|
|
|
|
{ "LOCK_UN", 7, LOCK_UN }, |
405
|
|
|
|
|
|
#endif |
406
|
|
|
|
|
|
#ifdef SEEK_SET |
407
|
|
|
|
|
|
{ "SEEK_SET", 8, SEEK_SET }, |
408
|
|
|
|
|
|
#endif |
409
|
|
|
|
|
|
#ifdef SEEK_CUR |
410
|
|
|
|
|
|
{ "SEEK_CUR", 8, SEEK_CUR }, |
411
|
|
|
|
|
|
#endif |
412
|
|
|
|
|
|
#ifdef SEEK_END |
413
|
|
|
|
|
|
{ "SEEK_END", 8, SEEK_END }, |
414
|
|
|
|
|
|
#endif |
415
|
|
|
|
|
|
#ifdef S_IFMT |
416
|
|
|
|
|
|
{ "_S_IFMT", 7, S_IFMT }, |
417
|
|
|
|
|
|
#endif |
418
|
|
|
|
|
|
#ifndef LOCK_SH |
419
|
|
|
|
|
|
/* This is the default value: */ |
420
|
|
|
|
|
|
{ "LOCK_SH", 7, 1 }, |
421
|
|
|
|
|
|
#endif |
422
|
|
|
|
|
|
#ifndef LOCK_EX |
423
|
|
|
|
|
|
/* This is the default value: */ |
424
|
|
|
|
|
|
{ "LOCK_EX", 7, 2 }, |
425
|
|
|
|
|
|
#endif |
426
|
|
|
|
|
|
#ifndef LOCK_NB |
427
|
|
|
|
|
|
/* This is the default value: */ |
428
|
|
|
|
|
|
{ "LOCK_NB", 7, 4 }, |
429
|
|
|
|
|
|
#endif |
430
|
|
|
|
|
|
#ifndef LOCK_UN |
431
|
|
|
|
|
|
/* This is the default value: */ |
432
|
|
|
|
|
|
{ "LOCK_UN", 7, 8 }, |
433
|
|
|
|
|
|
#endif |
434
|
|
|
|
|
|
#ifndef SEEK_SET |
435
|
|
|
|
|
|
/* This is the default value: */ |
436
|
|
|
|
|
|
{ "SEEK_SET", 8, 0 }, |
437
|
|
|
|
|
|
#endif |
438
|
|
|
|
|
|
#ifndef SEEK_CUR |
439
|
|
|
|
|
|
/* This is the default value: */ |
440
|
|
|
|
|
|
{ "SEEK_CUR", 8, 1 }, |
441
|
|
|
|
|
|
#endif |
442
|
|
|
|
|
|
#ifndef SEEK_END |
443
|
|
|
|
|
|
/* This is the default value: */ |
444
|
|
|
|
|
|
{ "SEEK_END", 8, 2 }, |
445
|
|
|
|
|
|
#endif |
446
|
|
|
|
|
|
{ NULL, 0, 0 } }; |
447
|
|
|
|
|
|
const struct iv_s *value_for_iv = values_for_iv; |
448
|
499200
|
|
|
|
|
while (value_for_iv->name) { |
449
|
488800
|
|
|
|
|
constant_add_symbol(aTHX_ symbol_table, value_for_iv->name, |
450
|
|
|
|
|
|
value_for_iv->namelen, newSViv(value_for_iv->value)); |
451
|
488800
|
|
|
|
|
++value_for_iv; |
452
|
|
|
|
|
|
} |
453
|
|
|
|
|
|
if (C_ARRAY_LENGTH(values_for_notfound) > 1) { |
454
|
|
|
|
|
|
#ifndef SYMBIAN |
455
|
5200
|
|
|
|
|
HV *const constant_missing = get_missing_hash(aTHX); |
456
|
|
|
|
|
|
#endif |
457
|
|
|
|
|
|
const struct notfound_s *value_for_notfound = values_for_notfound; |
458
|
|
|
|
|
|
do { |
459
|
|
|
|
|
|
|
460
|
|
|
|
|
|
/* Need to add prototypes, else parsing will vary by platform. */ |
461
|
218400
|
|
|
|
|
HE *he = (HE*) hv_common_key_len(symbol_table, |
462
|
|
|
|
|
|
value_for_notfound->name, |
463
|
|
|
|
|
|
value_for_notfound->namelen, |
464
|
|
|
|
|
|
HV_FETCH_LVALUE, NULL, 0); |
465
|
|
|
|
|
|
SV *sv; |
466
|
|
|
|
|
|
#ifndef SYMBIAN |
467
|
|
|
|
|
|
HEK *hek; |
468
|
|
|
|
|
|
#endif |
469
|
218400
|
|
|
|
|
if (!he) { |
470
|
0
|
|
|
|
|
Perl_croak(aTHX_ |
471
|
|
|
|
|
|
"Couldn't add key '%s' to %%Fcntl::", |
472
|
|
|
|
|
|
value_for_notfound->name); |
473
|
|
|
|
|
|
} |
474
|
218400
|
|
|
|
|
sv = HeVAL(he); |
475
|
218400
|
|
|
|
|
if (!SvOK(sv) && SvTYPE(sv) != SVt_PVGV) { |
476
|
|
|
|
|
|
/* Nothing was here before, so mark a prototype of "" */ |
477
|
218400
|
|
|
|
|
sv_setpvn(sv, "", 0); |
478
|
0
|
|
|
|
|
} else if (SvPOK(sv) && SvCUR(sv) == 0) { |
479
|
|
|
|
|
|
/* There is already a prototype of "" - do nothing */ |
480
|
|
|
|
|
|
} else { |
481
|
|
|
|
|
|
/* Someone has been here before us - have to make a real |
482
|
|
|
|
|
|
typeglob. */ |
483
|
|
|
|
|
|
/* It turns out to be incredibly hard to deal with all the |
484
|
|
|
|
|
|
corner cases of sub foo (); and reporting errors correctly, |
485
|
|
|
|
|
|
so lets cheat a bit. Start with a constant subroutine */ |
486
|
0
|
|
|
|
|
CV *cv = newCONSTSUB(symbol_table, |
487
|
|
|
|
|
|
value_for_notfound->name, |
488
|
|
|
|
|
|
&PL_sv_yes); |
489
|
|
|
|
|
|
/* and then turn it into a non constant declaration only. */ |
490
|
0
|
|
|
|
|
SvREFCNT_dec(CvXSUBANY(cv).any_ptr); |
491
|
0
|
|
|
|
|
CvCONST_off(cv); |
492
|
0
|
|
|
|
|
CvXSUB(cv) = NULL; |
493
|
0
|
|
|
|
|
CvXSUBANY(cv).any_ptr = NULL; |
494
|
|
|
|
|
|
} |
495
|
|
|
|
|
|
#ifndef SYMBIAN |
496
|
218400
|
|
|
|
|
hek = HeKEY_hek(he); |
497
|
218400
|
|
|
|
|
if (!hv_common(constant_missing, NULL, HEK_KEY(hek), |
498
|
|
|
|
|
|
HEK_LEN(hek), HEK_FLAGS(hek), HV_FETCH_ISSTORE, |
499
|
|
|
|
|
|
&PL_sv_yes, HEK_HASH(hek))) |
500
|
0
|
|
|
|
|
Perl_croak(aTHX_ "Couldn't add key '%s' to missing_hash", |
501
|
|
|
|
|
|
value_for_notfound->name); |
502
|
|
|
|
|
|
#endif |
503
|
218400
|
|
|
|
|
} while ((++value_for_notfound)->name); |
504
|
|
|
|
|
|
} |
505
|
|
|
|
|
|
/* As we've been creating subroutines, we better invalidate any cached |
506
|
|
|
|
|
|
methods */ |
507
|
5200
|
|
|
|
|
mro_method_changed_in(symbol_table); |
508
|
|
|
|
|
|
} |
509
|
|
|
|
|
|
|
510
|
|
|
|
|
|
void |
511
|
|
|
|
|
|
AUTOLOAD() |
512
|
|
|
|
|
|
PROTOTYPE: DISABLE |
513
|
|
|
|
|
|
PREINIT: |
514
|
2330
|
|
|
|
|
SV *sv = newSVpvn_flags(SvPVX(cv), SvCUR(cv), SVs_TEMP | SvUTF8(cv)); |
515
|
2330
|
|
|
|
|
const COP *cop = PL_curcop; |
516
|
|
|
|
|
|
PPCODE: |
517
|
|
|
|
|
|
#ifndef SYMBIAN |
518
|
|
|
|
|
|
/* It's not obvious how to calculate this at C pre-processor time. |
519
|
|
|
|
|
|
However, any compiler optimiser worth its salt should be able to |
520
|
|
|
|
|
|
remove the dead code, and hopefully the now-obviously-unused static |
521
|
|
|
|
|
|
function too. */ |
522
|
2330
|
|
|
|
|
HV *constant_missing = (C_ARRAY_LENGTH(values_for_notfound) > 1) |
523
|
|
|
|
|
|
? get_missing_hash(aTHX) : NULL; |
524
|
2330
|
|
|
|
|
if ((C_ARRAY_LENGTH(values_for_notfound) > 1) |
525
|
2330
|
|
|
|
|
? hv_exists_ent(constant_missing, sv, 0) : 0) { |
526
|
6990
|
|
|
|
|
sv = newSVpvf("Your vendor has not defined Fcntl macro %" SVf |
527
|
|
|
|
|
|
", used at %" COP_FILE_F " line %d\n", sv, |
528
|
4660
|
|
|
|
|
COP_FILE(cop), CopLINE(cop)); |
529
|
|
|
|
|
|
} else |
530
|
|
|
|
|
|
#endif |
531
|
|
|
|
|
|
{ |
532
|
0
|
|
|
|
|
sv = newSVpvf("%"SVf" is not a valid Fcntl macro at %" |
533
|
0
|
|
|
|
|
COP_FILE_F " line %d\n", sv, COP_FILE(cop), CopLINE(cop)); |
534
|
|
|
|
|
|
} |
535
|
2330
|
|
|
|
|
croak_sv(sv_2mortal(sv)); |