summaryrefslogtreecommitdiffstats
path: root/Lib/aix4/FCNTL.py
blob: 739ada40fcd864784e016ea3d53b9e4baf1c3bdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# Generated by h2py from /usr/include/fcntl.h

# Included from standards.h

# Included from sys/types.h

# Included from sys/m_types.h
NULL = 0
TRUE = 1
FALSE = 0
NBBY = 8
FHSIZE = 32

# Included from sys/select.h

# Included from sys/time.h
ITIMER_REAL = 0
ITIMER_VIRTUAL = 1
ITIMER_PROF = 2
ITIMER_VIRT = 3
ITIMER_REAL1 = 20
TIMEOFDAY = 9
TIMERID_ALRM = (ITIMER_REAL)
TIMERID_REAL = (ITIMER_REAL)
TIMERID_VIRTUAL = (ITIMER_VIRTUAL)
TIMERID_PROF = (ITIMER_PROF)
TIMERID_VIRT = (ITIMER_VIRT)
TIMERID_TOD = (TIMERID_VIRT+1)
TIMERID_REAL1 = (ITIMER_REAL1)
NALRM = 1
NPROF = 1
NVIRTUAL = 2
NTIMEOFDAY = 5
NTIMERS = (NALRM + NPROF + NVIRTUAL + NTIMEOFDAY)
NALRM_THREAD = 1
NTIMERS_THREAD = (NALRM_THREAD)
MIN_SECS_SINCE_EPOCH = 0
uS_PER_SECOND = (1000000)
NS_PER_uS = (1000)
MAX_SECS_TO_uS = 4000
MAX_NS_TO_uS = 294967296
NS_PER_SEC = 1000000000
uS_PER_SEC = (NS_PER_SEC / 1000)
NS_PER_MSEC = (NS_PER_SEC / 1000)
MAX_DEC_SECS = 2
MAX_DEC_NS = 147483647
DST_NONE = 0
DST_USA = 1
DST_AUST = 2
DST_WET = 3
DST_MET = 4
DST_EET = 5
DST_CAN = 6

# Included from time.h
NULL = 0
CLOCKS_PER_SEC = 1000000
CLK_TCK = 100

# Included from stddef.h
NULL = 0
TIMELEN = 26
NLTBMAX = 64
NO_TIMEOUT = 0
INF_TIMEOUT = -1
def NFDS(x): return ((x) & 0x0000FFFF)

def LOW_HALF(x): return NFDS(x)

def NMSGS(x): return (((x) >> 16) & 0x0000FFFF)

def HIGH_HALF(x): return NMSGS(x)

FD_SETSIZE = 2048
def major(__x): return (int)((unsigned)(__x)>>16)

def minor(__x): return (int)((__x)&0xFFFF)


# Included from sys/flock.h
F_RDLCK = 01
F_WRLCK = 02
F_UNLCK = 03
INOFLCK = 1
SETFLCK = 2
SLPFLCK = 4
LCK_UNBLOCK = 0
LCK_BLOCKER = 1
LCK_BLOCKED = 2
LCK_WASBLOCK = 4
MAXEND = 017777777777
RMTLOCK = 1
def ENF_LOCK(mode): return (((mode) & (ISGID | IEXEC | (IEXEC >> 3) | (IEXEC >> 6))) == ISGID)

O_RDONLY = 00000000
O_WRONLY = 00000001
O_RDWR = 00000002
O_ACCMODE = 3
O_NONBLOCK = 00000004
O_APPEND = 00000010
O_CREAT = 00000400
O_TRUNC = 00001000
O_EXCL = 00002000
O_NOCTTY = 00004000
F_DUPFD = 0
F_GETFD = 1
F_SETFD = 2
F_GETFL = 3
F_SETFL = 4
F_GETLK = 5
F_SETLK = 6
F_SETLKW = 7
FD_CLOEXEC = 1

# Included from unistd.h

# Included from sys/access.h
F_OK = 00
X_OK = 01
W_OK = 02
R_OK = 04
R_ACC = 04
W_ACC = 02
X_ACC = 01
E_ACC = 00
NO_ACC = 00
ACC_SELF = 0x00
ACC_INVOKER = 0x01
ACC_OBJ_OWNER = 0x02
ACC_OBJ_GROUP = 0x04
ACC_OTHERS = 0x08
ACC_ANY = 0x10
ACC_ALL = 0x20
ACC_PERMIT = 0x01
ACC_DENY = 0x02
ACC_SPECIFY = 0x03
SEEK_SET = 0
SEEK_CUR = 1
SEEK_END = 2
STDIN_FILENO = 0
STDOUT_FILENO = 1
STDERR_FILENO = 2
_POSIX_JOB_CONTROL = 1
_POSIX_SAVED_IDS = 1
_POSIX_VERSION = 199009L
_POSIX2_VERSION = 199209L
_POSIX2_C_VERSION = 199209L
_POSIX_REENTRANT_FUNCTIONS = 1
_POSIX_THREADS = 1
_POSIX_THREAD_ATTR_STACKSIZE = 1
_POSIX_THREAD_PRIORITY_SCHEDULING = 1
_POSIX_CHOWN_RESTRICTED = 0
_POSIX_VDISABLE = 0xFF
_POSIX_NO_TRUNC = 0
NULL = 0
_CS_PATH = 1
_CSPATH = "/usr/bin"
_PC_CHOWN_RESTRICTED = 10
_PC_LINK_MAX = 11
_PC_MAX_CANON = 12
_PC_MAX_INPUT = 13
_PC_NAME_MAX = 14
_PC_NO_TRUNC = 15
_PC_PATH_MAX = 16
_PC_PIPE_BUF = 17
_PC_VDISABLE = 18
_SC_ARG_MAX = 0
_SC_CHILD_MAX = 1
_SC_CLK_TCK = 2
_SC_NGROUPS_MAX = 3
_SC_OPEN_MAX = 4
_SC_STREAM_MAX = 5
_SC_TZNAME_MAX = 6
_SC_JOB_CONTROL = 7
_SC_SAVED_IDS = 8
_SC_VERSION = 9
_SC_POSIX_ARG_MAX = 10
_SC_POSIX_CHILD_MAX = 11
_SC_POSIX_LINK_MAX = 12
_SC_POSIX_MAX_CANON = 13
_SC_POSIX_MAX_INPUT = 14
_SC_POSIX_NAME_MAX = 15
_SC_POSIX_NGROUPS_MAX = 16
_SC_POSIX_OPEN_MAX = 17
_SC_POSIX_PATH_MAX = 18
_SC_POSIX_PIPE_BUF = 19
_SC_POSIX_SSIZE_MAX = 20
_SC_POSIX_STREAM_MAX = 21
_SC_POSIX_TZNAME_MAX = 22
_SC_BC_BASE_MAX = 23
_SC_BC_DIM_MAX = 24
_SC_BC_SCALE_MAX = 25
_SC_BC_STRING_MAX = 26
_SC_EQUIV_CLASS_MAX = 27
_SC_EXPR_NEST_MAX = 28
_SC_LINE_MAX = 29
_SC_RE_DUP_MAX = 30
_SC_2_VERSION = 31
_SC_2_C_DEV = 32
_SC_2_FORT_DEV = 33
_SC_2_FORT_RUN = 34
_SC_2_LOCALEDEF = 35
_SC_2_SW_DEV = 36
_SC_POSIX2_BC_BASE_MAX = 37
_SC_POSIX2_BC_DIM_MAX = 38
_SC_POSIX2_BC_SCALE_MAX = 39
_SC_POSIX2_BC_STRING_MAX = 40
_SC_POSIX2_EQUIV_CLASS_MAX = 41
_SC_POSIX2_EXPR_NEST_MAX = 42
_SC_POSIX2_LINE_MAX = 43
_SC_POSIX2_RE_DUP_MAX = 44
_SC_PASS_MAX = 45
_SC_XOPEN_VERSION = 46
_SC_ATEXIT_MAX = 47
_SC_PAGE_SIZE = 48
_SC_AES_OS_VERSION = 49
_SC_COLL_WEIGHTS_MAX = 50
_SC_2_C_BIND = 51
_SC_2_C_VERSION = 52
_SC_2_UPE = 53
_SC_2_CHAR_TERM = 54
_SC_XOPEN_SHM = 55
_SC_XOPEN_CRYPT = 56
_SC_XOPEN_ENH_I18N = 57
_SC_PAGESIZE = _SC_PAGE_SIZE
_SC_IOV_MAX = 58
_SC_REENTRANT_FUNCTIONS = 59
_SC_THREADS = 60
_SC_THREAD_ATTR_STACKADDR = 61
_SC_THREAD_ATTR_STACKSIZE = 62
_SC_THREAD_FORKALL = 63
_SC_THREAD_PRIORITY_SCHEDULING = 64
_SC_THREAD_PRIO_INHERIT = 65
_SC_THREAD_PRIO_PROTECT = 66
_SC_THREAD_PROCESS_SHARED = 67
_SC_THREAD_DATAKEYS_MAX = 68
_SC_THREAD_STACK_MIN = 69
_SC_THREAD_THREADS_MAX = 70
_SC_NPROCESSORS_CONF = 71
_SC_NPROCESSORS_ONLN = 72
_XOPEN_VERSION = 4
_XOPEN_XCU_VERSION = 4
_XOPEN_XPG3 = 1
_XOPEN_XPG4 = 1
_POSIX2_C_BIND = 1
_POSIX2_C_DEV = 1
_POSIX2_CHAR_TERM = 1
_POSIX2_LOCALEDEF = 1
_POSIX2_UPE = 1
_POSIX2_FORT_DEV = (-1)
_POSIX2_FORT_RUN = (-1)
_POSIX2_SW_DEV = 1
_XOPEN_CRYPT = 1
_XOPEN_SHM = 1
_XOPEN_ENH_I18N = 1

# Included from sys/lockf.h

# Included from sys/stat.h

# Included from sys/mode.h
_S_IFMT = 0170000
_S_IFREG = 0100000
_S_IFDIR = 0040000
_S_IFBLK = 0060000
_S_IFCHR = 0020000
_S_IFIFO = 0010000
S_ISUID = 0004000
S_ISGID = 0002000
S_IRWXU = 0000700
S_IRUSR = 0000400
S_IWUSR = 0000200
S_IXUSR = 0000100
S_IRWXG = 0000070
S_IRGRP = 0000040
S_IWGRP = 0000020
S_IXGRP = 0000010
S_IRWXO = 0000007
S_IROTH = 0000004
S_IWOTH = 0000002
S_IXOTH = 0000001
def S_ISFIFO(m): return (((m)&(_S_IFMT)) == (_S_IFIFO))

def S_ISDIR(m): return (((m)&(_S_IFMT)) == (_S_IFDIR))

def S_ISCHR(m): return (((m)&(_S_IFMT)) == (_S_IFCHR))

def S_ISBLK(m): return (((m)&(_S_IFMT)) == (_S_IFBLK))

def S_ISREG(m): return (((m)&(_S_IFMT)) == (_S_IFREG))

S_ISVTX = 0001000
S_IFMT = _S_IFMT
S_IFREG = _S_IFREG
S_IFDIR = _S_IFDIR
S_IFBLK = _S_IFBLK
S_IFCHR = _S_IFCHR
S_IFIFO = _S_IFIFO
S_IFSOCK = 0140000
S_IFLNK = 0120000
S_IREAD = 0000400
S_IWRITE = 0000200
S_IEXEC = 0000100
S_ENFMT = S_ISGID
S_IFMPX = (S_IFCHR|S_ISVTX)
def S_ISMPX(m): return (((m)&(S_IFMT|S_ISVTX)) == (S_IFMPX))

def S_ISLNK(m): return (((m)&(S_IFMT)) == (S_IFLNK))

def S_ISSOCK(m): return (((m)&(S_IFMT)) == (S_IFSOCK))

IFMT = S_IFMT
IFDIR = S_IFDIR
IFCHR = S_IFCHR
IFBLK = S_IFBLK
IFREG = S_IFREG
IFIFO = S_IFIFO
IFSOCK = S_IFSOCK
IFLNK = S_IFLNK
ISUID = S_ISUID
ISGID = S_ISGID
ISVTX = S_ISVTX
IREAD = S_IREAD
IWRITE = S_IWRITE
IEXEC = S_IEXEC
S_INMOD = 0xC0000000
S_IXMOD = 0x40000000
S_IJRNL = 0x04000000
S_IXACL = 0x02000000
S_ITCB = 0x01000000
S_ITP = 0x00800000
FS_VMP = 01
FS_MOUNT = FS_VMP
FS_REMOTE = 02
SDEV_REMOTE = 0x80000000
STX_NORMAL = 0x00
STX_LINK = 0x01
STX_MOUNT = 0x02
STX_HIDDEN = 0x04
S_ENFMT = S_ISGID
F_ULOCK = 0
F_LOCK = 1
F_TLOCK = 2
F_TEST = 3
_AES_OS_VERSION = 1
O_SYNC = 00000020
O_NONE = 00000003
O_EXEC = 00000040
O_RSHARE = 00010000
O_DEFER = 00020000
O_DELAY = 00040000
O_NDELAY = 00100000
O_NSHARE = 00200000
F_GETOWN = 8
F_SETOWN = 9
F_CLOSEM = 10
FNDELAY = O_NONBLOCK
O_NDELAY = O_NONBLOCK
FNDELAY = O_NDELAY
FNONBLOCK = O_NONBLOCK
FAPPEND = O_APPEND
FSYNC = O_SYNC
FASYNC = 00400000
FSYNCALL = 02000000
FOPEN = (-1)
FREAD = (O_RDONLY-FOPEN)
FWRITE = (O_WRONLY-FOPEN)
FMPX = 00000200
FMASK = 00374377
FFCNTL = (FNONBLOCK|FNDELAY|FAPPEND|FSYNC|FASYNC)
FCREAT = O_CREAT
FTRUNC = O_TRUNC
FEXCL = O_EXCL
FRSHARE = O_RSHARE
FDEFER = O_DEFER
FDELAY = O_DELAY
FNDELAY = O_NDELAY
FNSHARE = O_NSHARE
FEXEC = O_EXEC
FNOCTTY = O_NOCTTY
FMOUNT = 01000000
FREVOKED = 0x20000000
FKERNEL = 0x40000000
FAIO = 00000100
FDOCLONE = 0x10000000
GCFMARK = 0x00100000
GCFDEFER = 0x00200000