blob: c6b9c0f528ba6237e3bc51731f031d9c7b999f69 [file] [log] [blame]
Guido van Rossum893a8cb1997-12-02 03:42:17 +00001# Generated by h2py from /usr/include/fcntl.h
2
3# Included from sys/types.h
4
5# Included from machine/types.h
6
7# Included from sys/cdefs.h
8
9# Included from machine/cdefs.h
10def __P(protos): return protos
11
12def __STRING(x): return #x
13
14def __P(protos): return ()
15
16def __STRING(x): return "x"
17
18def __attribute__(x): return
19
20def __kprintf_attribute__(a): return __attribute__(a)
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_CLOCKID_T_ = int
28_BSD_TIMER_T_ = int
29_BSD_WCHAR_T_ = int
30_BSD_WINT_T_ = int
31_BSD_RUNE_T_ = int
32
33# Included from machine/endian.h
34_QUAD_HIGHWORD = 1
35_QUAD_LOWWORD = 0
36LITTLE_ENDIAN = 1234
37BIG_ENDIAN = 4321
38PDP_ENDIAN = 3412
39BYTE_ORDER = LITTLE_ENDIAN
40def __byte_swap_long_variable(x): return \
41
42def __byte_swap_long_variable(x): return \
43
44def __byte_swap_word_variable(x): return \
45
46def __byte_swap_long_constant(x): return \
47
48def __byte_swap_word_constant(x): return \
49
50def __byte_swap_long(x): return \
51
52def __byte_swap_word(x): return \
53
54def __byte_swap_long(x): return __byte_swap_long_variable(x)
55
56def __byte_swap_word(x): return __byte_swap_word_variable(x)
57
58def ntohl(x): return __byte_swap_long(x)
59
60def ntohs(x): return __byte_swap_word(x)
61
62def htonl(x): return __byte_swap_long(x)
63
64def htons(x): return __byte_swap_word(x)
65
66def major(x): return ((int32_t)(((u_int32_t)(x) >> 8) & 0xff))
67
68def minor(x): return ((int32_t)((x) & 0xff))
69
70NBBY = 8
71FD_SETSIZE = 256
72O_RDONLY = 0x0000
73O_WRONLY = 0x0001
74O_RDWR = 0x0002
75O_ACCMODE = 0x0003
76FREAD = 0x0001
77FWRITE = 0x0002
78O_NONBLOCK = 0x0004
79O_APPEND = 0x0008
80O_SHLOCK = 0x0010
81O_EXLOCK = 0x0020
82O_ASYNC = 0x0040
83O_FSYNC = 0x0080
84O_CREAT = 0x0200
85O_TRUNC = 0x0400
86O_EXCL = 0x0800
87FMARK = 0x1000
88FDEFER = 0x2000
89FHASLOCK = 0x4000
90O_NOCTTY = 0
91def FFLAGS(oflags): return ((oflags) + 1)
92
93def OFLAGS(fflags): return ((fflags) - 1)
94
95FAPPEND = O_APPEND
96FASYNC = O_ASYNC
97FFSYNC = O_FSYNC
98FNONBLOCK = O_NONBLOCK
99FNDELAY = O_NONBLOCK
100O_NDELAY = O_NONBLOCK
101F_DUPFD = 0
102F_GETFD = 1
103F_SETFD = 2
104F_GETFL = 3
105F_SETFL = 4
106F_GETOWN = 5
107F_SETOWN = 6
108F_GETLK = 7
109F_SETLK = 8
110F_SETLKW = 9
111FD_CLOEXEC = 1
112F_RDLCK = 1
113F_UNLCK = 2
114F_WRLCK = 3
115F_WAIT = 0x010
116F_FLOCK = 0x020
117F_POSIX = 0x040
118LOCK_SH = 0x01
119LOCK_EX = 0x02
120LOCK_NB = 0x04
121LOCK_UN = 0x08