summaryrefslogtreecommitdiffstats
path: root/Lib/plat-sunos5/TYPES.py
blob: e8e4a0074f620f15d1043e1f9eb600b06be2dda1 (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
# Generated by h2py from /usr/include/sys/types.h

# Included from sys/isa_defs.h
_CHAR_ALIGNMENT = 1
_SHORT_ALIGNMENT = 2
_INT_ALIGNMENT = 4
_LONG_ALIGNMENT = 8
_LONG_LONG_ALIGNMENT = 8
_DOUBLE_ALIGNMENT = 8
_LONG_DOUBLE_ALIGNMENT = 16
_POINTER_ALIGNMENT = 8
_MAX_ALIGNMENT = 16
_ALIGNMENT_REQUIRED = 1
_CHAR_ALIGNMENT = 1
_SHORT_ALIGNMENT = 2
_INT_ALIGNMENT = 4
_LONG_ALIGNMENT = 4
_LONG_LONG_ALIGNMENT = 4
_DOUBLE_ALIGNMENT = 4
_LONG_DOUBLE_ALIGNMENT = 4
_POINTER_ALIGNMENT = 4
_MAX_ALIGNMENT = 4
_ALIGNMENT_REQUIRED = 0
_CHAR_ALIGNMENT = 1
_SHORT_ALIGNMENT = 2
_INT_ALIGNMENT = 4
_LONG_LONG_ALIGNMENT = 8
_DOUBLE_ALIGNMENT = 8
_ALIGNMENT_REQUIRED = 1
_LONG_ALIGNMENT = 4
_LONG_DOUBLE_ALIGNMENT = 8
_POINTER_ALIGNMENT = 4
_MAX_ALIGNMENT = 8
_LONG_ALIGNMENT = 8
_LONG_DOUBLE_ALIGNMENT = 16
_POINTER_ALIGNMENT = 8
_MAX_ALIGNMENT = 16

# Included from sys/feature_tests.h
_POSIX_C_SOURCE = 1
_LARGEFILE64_SOURCE = 1
_LARGEFILE_SOURCE = 1
_FILE_OFFSET_BITS = 64
_FILE_OFFSET_BITS = 32
_POSIX_C_SOURCE = 199506L
_POSIX_PTHREAD_SEMANTICS = 1
_XOPEN_VERSION = 500
_XOPEN_VERSION = 4
_XOPEN_VERSION = 3

# Included from sys/machtypes.h

# Included from sys/inttypes.h

# Included from sys/int_types.h

# Included from sys/int_limits.h
INT8_MAX = (127)
INT16_MAX = (32767)
INT32_MAX = (2147483647)
INTMAX_MAX = INT32_MAX
INT_LEAST8_MAX = INT8_MAX
INT_LEAST16_MAX = INT16_MAX
INT_LEAST32_MAX = INT32_MAX
INT8_MIN = (-128)
INT16_MIN = (-32767-1)
INT32_MIN = (-2147483647-1)
INTMAX_MIN = INT32_MIN
INT_LEAST8_MIN = INT8_MIN
INT_LEAST16_MIN = INT16_MIN
INT_LEAST32_MIN = INT32_MIN

# Included from sys/int_const.h
def INT8_C(c): return (c)

def INT16_C(c): return (c)

def INT32_C(c): return (c)

def INT64_C(c): return __CONCAT__(c,l)

def INT64_C(c): return __CONCAT__(c,ll)

def UINT8_C(c): return __CONCAT__(c,u)

def UINT16_C(c): return __CONCAT__(c,u)

def UINT32_C(c): return __CONCAT__(c,u)

def UINT64_C(c): return __CONCAT__(c,ul)

def UINT64_C(c): return __CONCAT__(c,ull)

def INTMAX_C(c): return __CONCAT__(c,l)

def UINTMAX_C(c): return __CONCAT__(c,ul)

def INTMAX_C(c): return __CONCAT__(c,ll)

def UINTMAX_C(c): return __CONCAT__(c,ull)

def INTMAX_C(c): return (c)

def UINTMAX_C(c): return (c)


# Included from sys/int_fmtio.h
PRId8 = "d"
PRId16 = "d"
PRId32 = "d"
PRId64 = "ld"
PRId64 = "lld"
PRIdLEAST8 = "d"
PRIdLEAST16 = "d"
PRIdLEAST32 = "d"
PRIdLEAST64 = "ld"
PRIdLEAST64 = "lld"
PRIi8 = "i"
PRIi16 = "i"
PRIi32 = "i"
PRIi64 = "li"
PRIi64 = "lli"
PRIiLEAST8 = "i"
PRIiLEAST16 = "i"
PRIiLEAST32 = "i"
PRIiLEAST64 = "li"
PRIiLEAST64 = "lli"
PRIo8 = "o"
PRIo16 = "o"
PRIo32 = "o"
PRIo64 = "lo"
PRIo64 = "llo"
PRIoLEAST8 = "o"
PRIoLEAST16 = "o"
PRIoLEAST32 = "o"
PRIoLEAST64 = "lo"
PRIoLEAST64 = "llo"
PRIx8 = "x"
PRIx16 = "x"
PRIx32 = "x"
PRIx64 = "lx"
PRIx64 = "llx"
PRIxLEAST8 = "x"
PRIxLEAST16 = "x"
PRIxLEAST32 = "x"
PRIxLEAST64 = "lx"
PRIxLEAST64 = "llx"
PRIX8 = "X"
PRIX16 = "X"
PRIX32 = "X"
PRIX64 = "lX"
PRIX64 = "llX"
PRIXLEAST8 = "X"
PRIXLEAST16 = "X"
PRIXLEAST32 = "X"
PRIXLEAST64 = "lX"
PRIXLEAST64 = "llX"
PRIu8 = "u"
PRIu16 = "u"
PRIu32 = "u"
PRIu64 = "lu"
PRIu64 = "llu"
PRIuLEAST8 = "u"
PRIuLEAST16 = "u"
PRIuLEAST32 = "u"
PRIuLEAST64 = "lu"
PRIuLEAST64 = "llu"
SCNd16 = "hd"
SCNd32 = "d"
SCNd64 = "ld"
SCNd64 = "lld"
SCNi16 = "hi"
SCNi32 = "i"
SCNi64 = "li"
SCNi64 = "lli"
SCNo16 = "ho"
SCNo32 = "o"
SCNo64 = "lo"
SCNo64 = "llo"
SCNu16 = "hu"
SCNu32 = "u"
SCNu64 = "lu"
SCNu64 = "llu"
SCNx16 = "hx"
SCNx32 = "x"
SCNx64 = "lx"
SCNx64 = "llx"
PRIdMAX = "ld"
PRIoMAX = "lo"
PRIxMAX = "lx"
PRIuMAX = "lu"
PRIdMAX = "lld"
PRIoMAX = "llo"
PRIxMAX = "llx"
PRIuMAX = "llu"
PRIdMAX = "d"
PRIoMAX = "o"
PRIxMAX = "x"
PRIuMAX = "u"
SCNiMAX = "li"
SCNdMAX = "ld"
SCNoMAX = "lo"
SCNxMAX = "lx"
SCNiMAX = "lli"
SCNdMAX = "lld"
SCNoMAX = "llo"
SCNxMAX = "llx"
SCNiMAX = "i"
SCNdMAX = "d"
SCNoMAX = "o"
SCNxMAX = "x"

# Included from sys/types32.h
SHRT_MIN = (-32768)
SHRT_MAX = 32767
USHRT_MAX = 65535
INT_MIN = (-2147483647-1)
INT_MAX = 2147483647
LONG_MIN = (-9223372036854775807L-1L)
LONG_MAX = 9223372036854775807L
LONG_MIN = (-2147483647L-1L)
LONG_MAX = 2147483647L
P_MYID = (-1)

# Included from sys/select.h

# Included from sys/time.h
TIME32_MAX = INT32_MAX
TIME32_MIN = INT32_MIN
def TIMEVAL_OVERFLOW(tv): return \

from TYPES import *
DST_NONE = 0
DST_USA = 1
DST_AUST = 2
DST_WET = 3
DST_MET = 4
DST_EET = 5
DST_CAN = 6
DST_GB = 7
DST_RUM = 8
DST_TUR = 9
DST_AUSTALT = 10
ITIMER_REAL = 0
ITIMER_VIRTUAL = 1
ITIMER_PROF = 2
ITIMER_REALPROF = 3
def ITIMERVAL_OVERFLOW(itv): return \

SEC = 1
MILLISEC = 1000
MICROSEC = 1000000
NANOSEC = 1000000000

# Included from sys/time_impl.h
def TIMESPEC_OVERFLOW(ts): return \

def ITIMERSPEC_OVERFLOW(it): return \

__CLOCK_REALTIME0 = 0
CLOCK_VIRTUAL = 1
CLOCK_PROF = 2
__CLOCK_REALTIME3 = 3
CLOCK_HIGHRES = 4
CLOCK_MAX = 5
CLOCK_REALTIME = __CLOCK_REALTIME3
CLOCK_REALTIME = __CLOCK_REALTIME0
TIMER_RELTIME = 0x0
TIMER_ABSTIME = 0x1

# Included from sys/mutex.h
from TYPES import *
def MUTEX_HELD(x): return (mutex_owned(x))

def TICK_TO_SEC(tick): return ((tick) / hz)

def SEC_TO_TICK(sec): return ((sec) * hz)

def TICK_TO_MSEC(tick): return \

def MSEC_TO_TICK(msec): return \

def MSEC_TO_TICK_ROUNDUP(msec): return \

def TICK_TO_USEC(tick): return ((tick) * usec_per_tick)

def USEC_TO_TICK(usec): return ((usec) / usec_per_tick)

def USEC_TO_TICK_ROUNDUP(usec): return \

def TICK_TO_NSEC(tick): return ((tick) * nsec_per_tick)

def NSEC_TO_TICK(nsec): return ((nsec) / nsec_per_tick)

def NSEC_TO_TICK_ROUNDUP(nsec): return \

def TIMEVAL_TO_TICK(tvp): return \

def TIMESTRUC_TO_TICK(tsp): return \


# Included from time.h
from TYPES import *

# Included from iso/time_iso.h
NULL = 0L
NULL = 0
CLOCKS_PER_SEC = 1000000
FD_SETSIZE = 65536
FD_SETSIZE = 1024
_NBBY = 8
NBBY = _NBBY
def FD_ZERO(p): return bzero((p), sizeof (*(p)))