blob: 4d5db422ad11288dda63f58f7c60658d3a09bdff [file] [log] [blame]
Guido van Rossume7b6e391998-05-06 15:14:36 +00001# Generated by h2py from /usr/include/fcntl.h
2
3# Included from sys/types.h
4
5# Included from sys/cdefs.h
6def __P(protos): return protos
7
8def __STRING(x): return #x
9
10def __XSTRING(x): return __STRING(x)
11
12def __P(protos): return ()
13
14def __STRING(x): return "x"
15
16def __RCSID(s): return __IDSTRING(rcsid,s)
17
18def __RCSID_SOURCE(s): return __IDSTRING(rcsid_source,s)
19
20def __COPYRIGHT(s): return __IDSTRING(copyright,s)
21
22
23# Included from machine/ansi.h
24_BSD_PTRDIFF_T_ = int
25_BSD_SSIZE_T_ = int
26_BSD_TIME_T_ = long
27_BSD_CT_RUNE_T_ = int
28_BSD_PID_T_ = int
29_BSD_CLK_TCK_ = 128
30_BSD_CLOCKS_PER_SEC_ = 128
31
32# Included from machine/types.h
33def major(x): return ((int)(((u_int)(x) >> 8)&0xff))
34
35def minor(x): return ((int)((x)&0xffff00ff))
Guido van Rossum24cf88d1996-07-30 21:05:10 +000036
37
38# Included from machine/endian.h
Guido van Rossum24cf88d1996-07-30 21:05:10 +000039_QUAD_HIGHWORD = 1
40_QUAD_LOWWORD = 0
41LITTLE_ENDIAN = 1234
42BIG_ENDIAN = 4321
43PDP_ENDIAN = 3412
44BYTE_ORDER = LITTLE_ENDIAN
Guido van Rossume7b6e391998-05-06 15:14:36 +000045def __word_swap_long(x): return \
Guido van Rossum24cf88d1996-07-30 21:05:10 +000046
Guido van Rossume7b6e391998-05-06 15:14:36 +000047def __byte_swap_long(x): return \
48
49def __byte_swap_word(x): return \
50
51def __byte_swap_long(x): return \
52
53def __byte_swap_word(x): return \
54
55ntohl = __byte_swap_long
56ntohs = __byte_swap_word
57htonl = __byte_swap_long
58htons = __byte_swap_word
Guido van Rossum24cf88d1996-07-30 21:05:10 +000059NBBY = 8
60FD_SETSIZE = 256
61O_RDONLY = 0x0000
62O_WRONLY = 0x0001
63O_RDWR = 0x0002
64O_ACCMODE = 0x0003
65FREAD = 0x0001
66FWRITE = 0x0002
67O_NONBLOCK = 0x0004
68O_APPEND = 0x0008
69O_SHLOCK = 0x0010
70O_EXLOCK = 0x0020
71O_ASYNC = 0x0040
72O_FSYNC = 0x0080
73O_CREAT = 0x0200
74O_TRUNC = 0x0400
75O_EXCL = 0x0800
76FMARK = 0x1000
77FDEFER = 0x2000
78FHASLOCK = 0x4000
Guido van Rossume7b6e391998-05-06 15:14:36 +000079O_NOCTTY = 0x8000
80def FFLAGS(oflags): return ((oflags) + 1)
81
82def OFLAGS(fflags): return ((fflags) - 1)
Guido van Rossum24cf88d1996-07-30 21:05:10 +000083
84FAPPEND = O_APPEND
85FASYNC = O_ASYNC
86FFSYNC = O_FSYNC
87FNONBLOCK = O_NONBLOCK
88FNDELAY = O_NONBLOCK
89O_NDELAY = O_NONBLOCK
90F_DUPFD = 0
91F_GETFD = 1
92F_SETFD = 2
93F_GETFL = 3
94F_SETFL = 4
95F_GETOWN = 5
96F_SETOWN = 6
97F_GETLK = 7
98F_SETLK = 8
99F_SETLKW = 9
100FD_CLOEXEC = 1
101F_RDLCK = 1
102F_UNLCK = 2
103F_WRLCK = 3
104F_WAIT = 0x010
105F_FLOCK = 0x020
106F_POSIX = 0x040
107LOCK_SH = 0x01
108LOCK_EX = 0x02
109LOCK_NB = 0x04
110LOCK_UN = 0x08