cython
1# Note that the actual size of these types is system-dependent, and
2# cannot be detected before C compile time. However, the generated C code
3# will correctly use the actual size of these types *except* for
4# determining promotion in binary arithmetic expressions involving
5# mixed types. In this case, operands are promoted to the declared
6# larger type, with a bias towards typedef types. Thus, with the
7# declarations below, long + time_t will result in a time_t whereas
8# long long + time_t will result in a long long which should be
9# acceptable for either 32-bit or 64-bit signed time_t (though admittedly
10# the POSIX standard doesn't even specify that time_t must be an integral
11# type).
12
13cdef extern from "<sys/types.h>":
14ctypedef long blkcnt_t
15ctypedef long blksize_t
16ctypedef long clockid_t
17ctypedef long dev_t
18ctypedef long gid_t
19ctypedef long id_t
20ctypedef unsigned long ino_t
21ctypedef long mode_t
22ctypedef long nlink_t
23ctypedef long off_t
24ctypedef long pid_t
25ctypedef struct sigset_t:
26pass
27ctypedef long suseconds_t
28ctypedef long time_t
29ctypedef long timer_t
30ctypedef long uid_t
31