1 pub type c_char = u8;
2 pub type wchar_t = i32;
3 
4 s! {
5     pub struct ipc_perm {
6         __key: ::key_t,
7         pub uid: ::uid_t,
8         pub gid: ::gid_t,
9         pub cuid: ::uid_t,
10         pub cgid: ::gid_t,
11         pub mode: ::mode_t,
12         __seq: ::uint32_t,
13         __pad1: ::uint32_t,
14         __glibc_reserved1: ::uint64_t,
15         __glibc_reserved2: ::uint64_t,
16     }
17 
18     pub struct stat64 {
19         pub st_dev: ::dev_t,
20         pub st_ino: ::ino64_t,
21         pub st_mode: ::mode_t,
22         pub st_nlink: ::nlink_t,
23         pub st_uid: ::uid_t,
24         pub st_gid: ::gid_t,
25         pub st_rdev: ::dev_t,
26         __pad2: ::c_ushort,
27         pub st_size: ::off64_t,
28         pub st_blksize: ::blksize_t,
29         pub st_blocks: ::blkcnt64_t,
30         pub st_atime: ::time_t,
31         pub st_atime_nsec: ::c_long,
32         pub st_mtime: ::time_t,
33         pub st_mtime_nsec: ::c_long,
34         pub st_ctime: ::time_t,
35         pub st_ctime_nsec: ::c_long,
36         __glibc_reserved4: ::c_ulong,
37         __glibc_reserved5: ::c_ulong,
38     }
39 
40     pub struct shmid_ds {
41         pub shm_perm: ::ipc_perm,
42         __glibc_reserved1: ::c_uint,
43         pub shm_atime: ::time_t,
44         __glibc_reserved2: ::c_uint,
45         pub shm_dtime: ::time_t,
46         __glibc_reserved3: ::c_uint,
47         pub shm_ctime: ::time_t,
48         __glibc_reserved4: ::c_uint,
49         pub shm_segsz: ::size_t,
50         pub shm_cpid: ::pid_t,
51         pub shm_lpid: ::pid_t,
52         pub shm_nattch: ::shmatt_t,
53         __glibc_reserved5: ::c_ulong,
54         __glibc_reserved6: ::c_ulong,
55     }
56 }
57 
58 pub const O_DIRECT: ::c_int = 0x20000;
59 pub const O_DIRECTORY: ::c_int = 0x4000;
60 pub const O_NOFOLLOW: ::c_int = 0x8000;
61 
62 pub const MAP_LOCKED: ::c_int = 0x00080;
63 pub const MAP_NORESERVE: ::c_int = 0x00040;
64 
65 pub const EDEADLOCK: ::c_int = 58;
66 
67 pub const SO_PEERCRED: ::c_int = 21;
68 pub const SO_RCVLOWAT: ::c_int = 16;
69 pub const SO_SNDLOWAT: ::c_int = 17;
70 pub const SO_RCVTIMEO: ::c_int = 18;
71 pub const SO_SNDTIMEO: ::c_int = 19;
72 
73 pub const FIOCLEX: ::c_ulong = 0x20006601;
74 pub const FIONBIO: ::c_ulong = 0x8004667e;
75 
76 pub const SYS_gettid: ::c_long = 207;
77 pub const SYS_perf_event_open: ::c_long = 319;
78 
79 pub const MCL_CURRENT: ::c_int = 0x2000;
80 pub const MCL_FUTURE: ::c_int = 0x4000;
81 
82 pub const SIGSTKSZ: ::size_t = 0x4000;
83 pub const CBAUD: ::tcflag_t = 0xff;
84 pub const TAB1: ::c_int = 0x400;
85 pub const TAB2: ::c_int = 0x800;
86 pub const TAB3: ::c_int = 0xc00;
87 pub const CR1: ::c_int  = 0x1000;
88 pub const CR2: ::c_int  = 0x2000;
89 pub const CR3: ::c_int  = 0x3000;
90 pub const FF1: ::c_int  = 0x4000;
91 pub const BS1: ::c_int  = 0x8000;
92 pub const VT1: ::c_int  = 0x10000;
93 pub const VWERASE: usize = 0xa;
94 pub const VREPRINT: usize = 0xb;
95 pub const VSUSP: usize = 0xc;
96 pub const VSTART: usize = 0xd;
97 pub const VSTOP: usize = 0xe;
98 pub const VDISCARD: usize = 0x10;
99 pub const VTIME: usize = 0x7;
100 pub const IXON: ::tcflag_t = 0x200;
101 pub const IXOFF: ::tcflag_t = 0x400;
102 pub const ONLCR: ::tcflag_t = 0x2;
103 pub const CSIZE: ::tcflag_t = 0x300;
104 pub const CS6: ::tcflag_t = 0x100;
105 pub const CS7: ::tcflag_t = 0x200;
106 pub const CS8: ::tcflag_t = 0x300;
107 pub const CSTOPB: ::tcflag_t = 0x400;
108 pub const CREAD: ::tcflag_t = 0x800;
109 pub const PARENB: ::tcflag_t = 0x1000;
110 pub const PARODD: ::tcflag_t = 0x2000;
111 pub const HUPCL: ::tcflag_t = 0x4000;
112 pub const CLOCAL: ::tcflag_t = 0x8000;
113 pub const ECHOKE: ::tcflag_t = 0x1;
114 pub const ECHOE: ::tcflag_t = 0x2;
115 pub const ECHOK: ::tcflag_t = 0x4;
116 pub const ECHONL: ::tcflag_t = 0x10;
117 pub const ECHOPRT: ::tcflag_t = 0x20;
118 pub const ECHOCTL: ::tcflag_t = 0x40;
119 pub const ISIG: ::tcflag_t = 0x80;
120 pub const ICANON: ::tcflag_t = 0x100;
121 pub const PENDIN: ::tcflag_t = 0x20000000;
122 pub const NOFLSH: ::tcflag_t = 0x80000000;
123 
124 pub const VEOL: usize = 6;
125 pub const VEOL2: usize = 8;
126 pub const VMIN: usize = 5;
127 pub const IEXTEN: ::tcflag_t = 0x400;
128 pub const TOSTOP: ::tcflag_t = 0x400000;
129 pub const FLUSHO: ::tcflag_t = 0x800000;
130 pub const EXTPROC: ::tcflag_t = 0x10000000;
131 pub const TCGETS: ::c_ulong = 0x403c7413;
132 pub const TCSETS: ::c_ulong = 0x803c7414;
133 pub const TCSETSW: ::c_ulong = 0x803c7415;
134 pub const TCSETSF: ::c_ulong = 0x803c7416;
135 pub const TCGETA: ::c_ulong = 0x40147417;
136 pub const TCSETA: ::c_ulong = 0x80147418;
137 pub const TCSETAW: ::c_ulong = 0x80147419;
138 pub const TCSETAF: ::c_ulong = 0x8014741c;
139 pub const TCSBRK: ::c_ulong = 0x2000741d;
140 pub const TCXONC: ::c_ulong = 0x2000741e;
141 pub const TCFLSH: ::c_ulong = 0x2000741f;
142 pub const TIOCINQ: ::c_ulong = 0x4004667f;
143 pub const TIOCGPGRP: ::c_ulong = 0x40047477;
144 pub const TIOCSPGRP: ::c_ulong = 0x80047476;
145 pub const TIOCOUTQ: ::c_ulong = 0x40047473;
146 pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
147 pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
148 pub const FIONREAD: ::c_ulong = 0x4004667f;
149