blob: a1ac4f5389ded0479d6fdc8507964a2466b524be [file] [log] [blame]
Kelvin Ly6e4beb62017-04-24 21:08:24 -04001//! SPARC64-specific definitions for 64-bit linux-like values
2
3pub type c_char = i8;
4pub type wchar_t = i32;
5pub type nlink_t = u32;
6pub type blksize_t = i64;
7pub type suseconds_t = i32;
8
9s! {
10 pub struct stat {
11 pub st_dev: ::dev_t,
12 __pad0: u64,
13 pub st_ino: ::ino_t,
14 pub st_mode: ::mode_t,
15 pub st_nlink: ::nlink_t,
16 pub st_uid: ::uid_t,
17 pub st_gid: ::gid_t,
18 pub st_rdev: ::dev_t,
19 __pad1: u64,
20 pub st_size: ::off_t,
21 pub st_blksize: ::blksize_t,
22 pub st_blocks: ::blkcnt_t,
23 pub st_atime: ::time_t,
24 pub st_atime_nsec: ::c_long,
25 pub st_mtime: ::time_t,
26 pub st_mtime_nsec: ::c_long,
27 pub st_ctime: ::time_t,
28 pub st_ctime_nsec: ::c_long,
29 __unused: [::c_long; 2],
30 }
31
32 pub struct stat64 {
33 pub st_dev: ::dev_t,
34 __pad0: u64,
35 pub st_ino: ::ino64_t,
36 pub st_mode: ::mode_t,
37 pub st_nlink: ::nlink_t,
38 pub st_uid: ::uid_t,
39 pub st_gid: ::gid_t,
40 pub st_rdev: ::dev_t,
41 __pad2: ::c_int,
42 pub st_size: ::off64_t,
43 pub st_blksize: ::blksize_t,
44 pub st_blocks: ::blkcnt64_t,
45 pub st_atime: ::time_t,
46 pub st_atime_nsec: ::c_long,
47 pub st_mtime: ::time_t,
48 pub st_mtime_nsec: ::c_long,
49 pub st_ctime: ::time_t,
50 pub st_ctime_nsec: ::c_long,
51 __reserved: [::c_long; 2],
52 }
53
54 pub struct pthread_attr_t {
55 __size: [u64; 7]
56 }
57
58 pub struct ipc_perm {
59 pub __key: ::key_t,
60 pub uid: ::uid_t,
61 pub gid: ::gid_t,
62 pub cuid: ::uid_t,
63 pub cgid: ::gid_t,
64 pub mode: ::mode_t,
65 __pad0: u16,
66 pub __seq: ::c_ushort,
67 __unused1: ::c_ulonglong,
68 __unused2: ::c_ulonglong,
69 }
70
71 pub struct shmid_ds {
72 pub shm_perm: ::ipc_perm,
73 pub shm_atime: ::time_t,
74 pub shm_dtime: ::time_t,
75 pub shm_ctime: ::time_t,
76 pub shm_segsz: ::size_t,
77 pub shm_cpid: ::pid_t,
78 pub shm_lpid: ::pid_t,
79 pub shm_nattch: ::shmatt_t,
80 __reserved1: ::c_ulong,
81 __reserved2: ::c_ulong
82 }
83}
84
85pub const TIOCGSOFTCAR: ::c_ulong = 0x40047464;
86pub const TIOCSSOFTCAR: ::c_ulong = 0x80047465;
87
88pub const RLIMIT_NOFILE: ::c_int = 6;
89pub const RLIMIT_NPROC: ::c_int = 7;
90
91pub const O_APPEND: ::c_int = 0x8;
92pub const O_CREAT: ::c_int = 0x200;
93pub const O_EXCL: ::c_int = 0x800;
94pub const O_NOCTTY: ::c_int = 0x8000;
95pub const O_NONBLOCK: ::c_int = 0x4000;
96pub const O_SYNC: ::c_int = 0x802000;
97pub const O_RSYNC: ::c_int = 0x802000;
98pub const O_DSYNC: ::c_int = 0x2000;
99pub const O_FSYNC: ::c_int = 0x802000;
100
101pub const MAP_GROWSDOWN: ::c_int = 0x0200;
102
103pub const EDEADLK: ::c_int = 78;
104pub const ENAMETOOLONG: ::c_int = 63;
105pub const ENOLCK: ::c_int = 79;
106pub const ENOSYS: ::c_int = 90;
107pub const ENOTEMPTY: ::c_int = 66;
108pub const ELOOP: ::c_int = 62;
109pub const ENOMSG: ::c_int = 75;
110pub const EIDRM: ::c_int = 77;
111pub const ECHRNG: ::c_int = 94;
112pub const EL2NSYNC: ::c_int = 95;
113pub const EL3HLT: ::c_int = 96;
114pub const EL3RST: ::c_int = 97;
115pub const ELNRNG: ::c_int = 98;
116pub const EUNATCH: ::c_int = 99;
117pub const ENOCSI: ::c_int = 100;
118pub const EL2HLT: ::c_int = 101;
119pub const EBADE: ::c_int = 102;
120pub const EBADR: ::c_int = 103;
121pub const EXFULL: ::c_int = 104;
122pub const ENOANO: ::c_int = 105;
123pub const EBADRQC: ::c_int = 106;
124pub const EBADSLT: ::c_int = 107;
125pub const EMULTIHOP: ::c_int = 87;
126pub const EOVERFLOW: ::c_int = 92;
127pub const ENOTUNIQ: ::c_int = 115;
128pub const EBADFD: ::c_int = 93;
129pub const EBADMSG: ::c_int = 76;
130pub const EREMCHG: ::c_int = 89;
131pub const ELIBACC: ::c_int = 114;
132pub const ELIBBAD: ::c_int = 112;
133pub const ELIBSCN: ::c_int = 124;
134pub const ELIBMAX: ::c_int = 123;
135pub const ELIBEXEC: ::c_int = 110;
136pub const EILSEQ: ::c_int = 122;
137pub const ERESTART: ::c_int = 116;
138pub const ESTRPIPE: ::c_int = 91;
139pub const EUSERS: ::c_int = 68;
140pub const ENOTSOCK: ::c_int = 38;
141pub const EDESTADDRREQ: ::c_int = 39;
142pub const EMSGSIZE: ::c_int = 40;
143pub const EPROTOTYPE: ::c_int = 41;
144pub const ENOPROTOOPT: ::c_int = 42;
145pub const EPROTONOSUPPORT: ::c_int = 43;
146pub const ESOCKTNOSUPPORT: ::c_int = 44;
147pub const EOPNOTSUPP: ::c_int = 45;
148pub const EPFNOSUPPORT: ::c_int = 46;
149pub const EAFNOSUPPORT: ::c_int = 47;
150pub const EADDRINUSE: ::c_int = 48;
151pub const EADDRNOTAVAIL: ::c_int = 49;
152pub const ENETDOWN: ::c_int = 50;
153pub const ENETUNREACH: ::c_int = 51;
154pub const ENETRESET: ::c_int = 52;
155pub const ECONNABORTED: ::c_int = 53;
156pub const ECONNRESET: ::c_int = 54;
157pub const ENOBUFS: ::c_int = 55;
158pub const EISCONN: ::c_int = 56;
159pub const ENOTCONN: ::c_int = 57;
160pub const ESHUTDOWN: ::c_int = 58;
161pub const ETOOMANYREFS: ::c_int = 59;
162pub const ETIMEDOUT: ::c_int = 60;
163pub const ECONNREFUSED: ::c_int = 61;
164pub const EHOSTDOWN: ::c_int = 64;
165pub const EHOSTUNREACH: ::c_int = 65;
166pub const EALREADY: ::c_int = 37;
167pub const EINPROGRESS: ::c_int = 36;
168pub const ESTALE: ::c_int = 70;
169pub const EDQUOT: ::c_int = 69;
170pub const ENOMEDIUM: ::c_int = 125;
171pub const EMEDIUMTYPE: ::c_int = 126;
172pub const ECANCELED: ::c_int = 127;
173pub const ENOKEY: ::c_int = 128;
174pub const EKEYEXPIRED: ::c_int = 129;
175pub const EKEYREVOKED: ::c_int = 130;
176pub const EKEYREJECTED: ::c_int = 131;
177pub const EOWNERDEAD: ::c_int = 132;
178pub const ENOTRECOVERABLE: ::c_int = 133;
179pub const EHWPOISON: ::c_int = 135;
180pub const ERFKILL: ::c_int = 134;
181
182pub const SOL_SOCKET: ::c_int = 0xffff;
183
184pub const SO_REUSEADDR: ::c_int = 4;
185pub const SO_TYPE: ::c_int = 0x1008;
186pub const SO_ERROR: ::c_int = 0x1007;
187pub const SO_DONTROUTE: ::c_int = 16;
188pub const SO_BROADCAST: ::c_int = 32;
189pub const SO_SNDBUF: ::c_int = 0x1001;
190pub const SO_RCVBUF: ::c_int = 0x1002;
191pub const SO_KEEPALIVE: ::c_int = 8;
192pub const SO_OOBINLINE: ::c_int = 0x100;
193pub const SO_LINGER: ::c_int = 128;
194pub const SO_REUSEPORT: ::c_int = 0x200;
195pub const SO_ACCEPTCONN: ::c_int = 0x8000;
196
197pub const SA_ONSTACK: ::c_int = 1;
198pub const SA_SIGINFO: ::c_int = 0x200;
199pub const SA_NOCLDWAIT: ::c_int = 0x100;
200
201pub const SIGCHLD: ::c_int = 20;
202pub const SIGBUS: ::c_int = 10;
203pub const SIGUSR1: ::c_int = 30;
204pub const SIGUSR2: ::c_int = 31;
205pub const SIGCONT: ::c_int = 19;
206pub const SIGSTOP: ::c_int = 17;
207pub const SIGTSTP: ::c_int = 18;
208pub const SIGURG: ::c_int = 16;
209pub const SIGIO: ::c_int = 23;
210pub const SIGSYS: ::c_int = 12;
211pub const SIGPOLL: ::c_int = 23;
212pub const SIGPWR: ::c_int = 29;
213pub const SIG_SETMASK: ::c_int = 4;
214pub const SIG_BLOCK: ::c_int = 1;
215pub const SIG_UNBLOCK: ::c_int = 2;
216
217pub const POLLWRNORM: ::c_short = 4;
218pub const POLLWRBAND: ::c_short = 0x100;
219
220pub const O_ASYNC: ::c_int = 0x40;
221pub const O_NDELAY: ::c_int = 0x4004;
222
223pub const PTRACE_DETACH: ::c_uint = 11;
224
225pub const EFD_NONBLOCK: ::c_int = 0x4000;
226
227pub const F_GETLK: ::c_int = 7;
228pub const F_GETOWN: ::c_int = 5;
229pub const F_SETOWN: ::c_int = 6;
230pub const F_SETLK: ::c_int = 8;
231pub const F_SETLKW: ::c_int = 9;
232
233pub const SFD_NONBLOCK: ::c_int = 0x4000;
234
235pub const TIOCEXCL: ::c_ulong = 0x2000740d;
236pub const TIOCNXCL: ::c_ulong = 0x2000740e;
237pub const TIOCSCTTY: ::c_ulong = 0x20007484;
238pub const TIOCSTI: ::c_ulong = 0x80017472;
239pub const TIOCMGET: ::c_ulong = 0x4004746a;
240pub const TIOCMBIS: ::c_ulong = 0x8004746c;
241pub const TIOCMBIC: ::c_ulong = 0x8004746b;
242pub const TIOCMSET: ::c_ulong = 0x8004746d;
243pub const TIOCCONS: ::c_ulong = 0x20007424;
244
245pub const SFD_CLOEXEC: ::c_int = 0x400000;
246
247pub const NCCS: usize = 17;
248pub const O_TRUNC: ::c_int = 0x400;
249
250pub const O_CLOEXEC: ::c_int = 0x400000;
251
252pub const EBFONT: ::c_int = 109;
253pub const ENOSTR: ::c_int = 72;
254pub const ENODATA: ::c_int = 111;
255pub const ETIME: ::c_int = 73;
256pub const ENOSR: ::c_int = 74;
257pub const ENONET: ::c_int = 80;
258pub const ENOPKG: ::c_int = 113;
259pub const EREMOTE: ::c_int = 71;
260pub const ENOLINK: ::c_int = 82;
261pub const EADV: ::c_int = 83;
262pub const ESRMNT: ::c_int = 84;
263pub const ECOMM: ::c_int = 85;
264pub const EPROTO: ::c_int = 86;
265pub const EDOTDOT: ::c_int = 88;
266
267pub const SA_NODEFER: ::c_int = 0x20;
268pub const SA_RESETHAND: ::c_int = 0x4;
269pub const SA_RESTART: ::c_int = 0x2;
270pub const SA_NOCLDSTOP: ::c_int = 0x00000008;
271
272pub const EPOLL_CLOEXEC: ::c_int = 0x400000;
273
274pub const EFD_CLOEXEC: ::c_int = 0x400000;
275pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
276pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
277pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
278
279pub const O_DIRECTORY: ::c_int = 0o200000;
280pub const O_NOFOLLOW: ::c_int = 0o400000;
281pub const O_DIRECT: ::c_int = 0x100000;
282
283pub const MAP_LOCKED: ::c_int = 0x0100;
284pub const MAP_NORESERVE: ::c_int = 0x00040;
285
286pub const EDEADLOCK: ::c_int = 108;
287
288pub const SO_PEERCRED: ::c_int = 0x40;
289pub const SO_RCVLOWAT: ::c_int = 0x800;
290pub const SO_SNDLOWAT: ::c_int = 0x1000;
291pub const SO_RCVTIMEO: ::c_int = 0x2000;
292pub const SO_SNDTIMEO: ::c_int = 0x4000;
293
294pub const FIOCLEX: ::c_ulong = 0x20006601;
295pub const FIONBIO: ::c_ulong = 0x8004667e;
296
297pub const SYS_gettid: ::c_long = 143;
298pub const SYS_perf_event_open: ::c_long = 327;
299
300pub const MCL_CURRENT: ::c_int = 0x2000;
301pub const MCL_FUTURE: ::c_int = 0x4000;
302
303pub const SIGSTKSZ: ::size_t = 16384;
304pub const CBAUD: ::tcflag_t = 0x0000100f;
305pub const TAB1: ::c_int = 0x800;
306pub const TAB2: ::c_int = 0x1000;
307pub const TAB3: ::c_int = 0x1800;
308pub const CR1: ::c_int = 0x200;
309pub const CR2: ::c_int = 0x400;
310pub const CR3: ::c_int = 0x600;
311pub const FF1: ::c_int = 0x8000;
312pub const BS1: ::c_int = 0x2000;
313pub const VT1: ::c_int = 0x4000;
314pub const VWERASE: usize = 0xe;
315pub const VREPRINT: usize = 0xc;
316pub const VSUSP: usize = 0xa;
317pub const VSTART: usize = 0x8;
318pub const VSTOP: usize = 0x9;
319pub const VDISCARD: usize = 0xd;
320pub const VTIME: usize = 0x5;
321pub const IXON: ::tcflag_t = 0x400;
322pub const IXOFF: ::tcflag_t = 0x1000;
323pub const ONLCR: ::tcflag_t = 0x4;
324pub const CSIZE: ::tcflag_t = 0x30;
325pub const CS6: ::tcflag_t = 0x10;
326pub const CS7: ::tcflag_t = 0x20;
327pub const CS8: ::tcflag_t = 0x30;
328pub const CSTOPB: ::tcflag_t = 0x40;
329pub const CREAD: ::tcflag_t = 0x80;
330pub const PARENB: ::tcflag_t = 0x100;
331pub const PARODD: ::tcflag_t = 0x200;
332pub const HUPCL: ::tcflag_t = 0x400;
333pub const CLOCAL: ::tcflag_t = 0x800;
334pub const ECHOKE: ::tcflag_t = 0x800;
335pub const ECHOE: ::tcflag_t = 0x10;
336pub const ECHOK: ::tcflag_t = 0x20;
337pub const ECHONL: ::tcflag_t = 0x40;
338pub const ECHOPRT: ::tcflag_t = 0x400;
339pub const ECHOCTL: ::tcflag_t = 0x200;
340pub const ISIG: ::tcflag_t = 0x1;
341pub const ICANON: ::tcflag_t = 0x2;
342pub const PENDIN: ::tcflag_t = 0x4000;
343pub const NOFLSH: ::tcflag_t = 0x80;
344
345pub const VEOL: usize = 5;
346pub const VEOL2: usize = 6;
347pub const VMIN: usize = 4;
348pub const IEXTEN: ::tcflag_t = 0x8000;
349pub const TOSTOP: ::tcflag_t = 0x100;
350pub const FLUSHO: ::tcflag_t = 0x2000;
351pub const EXTPROC: ::tcflag_t = 0x10000;
352pub const TCGETS: ::c_ulong = 0x40245408;
353pub const TCSETS: ::c_ulong = 0x80245409;
354pub const TCSETSW: ::c_ulong = 0x8024540a;
355pub const TCSETSF: ::c_ulong = 0x8024540b;
356pub const TCGETA: ::c_ulong = 0x40125401;
357pub const TCSETA: ::c_ulong = 0x80125402;
358pub const TCSETAW: ::c_ulong = 0x80125403;
359pub const TCSETAF: ::c_ulong = 0x80125404;
360pub const TCSBRK: ::c_ulong = 0x20005405;
361pub const TCXONC: ::c_ulong = 0x20005406;
362pub const TCFLSH: ::c_ulong = 0x20005407;
363pub const TIOCINQ: ::c_ulong = 0x4004667f;
364pub const TIOCGPGRP: ::c_ulong = 0x40047483;
365pub const TIOCSPGRP: ::c_ulong = 0x80047482;
366pub const TIOCOUTQ: ::c_ulong = 0x40047473;
367pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
368pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
369pub const FIONREAD: ::c_ulong = 0x4004667f;