]> git.proxmox.com Git - rustc.git/blame - src/liblibc/src/unix/notbsd/linux/musl/b64/mod.rs
New upstream version 1.13.0+dfsg1
[rustc.git] / src / liblibc / src / unix / notbsd / linux / musl / b64 / mod.rs
CommitLineData
92a42be0 1pub type wchar_t = i32;
7453a54e
SL
2pub type c_long = i64;
3pub type c_ulong = u64;
92a42be0 4pub type nlink_t = u64;
9cc50fc6 5
54a0048b
SL
6s! {
7 pub struct stat {
8 pub st_dev: ::dev_t,
9 pub st_ino: ::ino_t,
10 pub st_nlink: ::nlink_t,
11 pub st_mode: ::mode_t,
12 pub st_uid: ::uid_t,
13 pub st_gid: ::gid_t,
14 __pad0: ::c_int,
15 pub st_rdev: ::dev_t,
16 pub st_size: ::off_t,
17 pub st_blksize: ::blksize_t,
18 pub st_blocks: ::blkcnt_t,
19 pub st_atime: ::time_t,
20 pub st_atime_nsec: ::c_long,
21 pub st_mtime: ::time_t,
22 pub st_mtime_nsec: ::c_long,
23 pub st_ctime: ::time_t,
24 pub st_ctime_nsec: ::c_long,
25 __unused: [::c_long; 3],
26 }
27
28 pub struct stat64 {
29 pub st_dev: ::dev_t,
30 pub st_ino: ::ino64_t,
31 pub st_nlink: ::nlink_t,
32 pub st_mode: ::mode_t,
33 pub st_uid: ::uid_t,
34 pub st_gid: ::gid_t,
35 __pad0: ::c_int,
36 pub st_rdev: ::dev_t,
37 pub st_size: ::off_t,
38 pub st_blksize: ::blksize_t,
39 pub st_blocks: ::blkcnt64_t,
40 pub st_atime: ::time_t,
41 pub st_atime_nsec: ::c_long,
42 pub st_mtime: ::time_t,
43 pub st_mtime_nsec: ::c_long,
44 pub st_ctime: ::time_t,
45 pub st_ctime_nsec: ::c_long,
46 __reserved: [::c_long; 3],
47 }
48
49 pub struct stack_t {
50 pub ss_sp: *mut ::c_void,
51 pub ss_flags: ::c_int,
52 pub ss_size: ::size_t
53 }
54
55 pub struct pthread_attr_t {
56 __size: [u64; 7]
57 }
58
59 pub struct sigset_t {
60 __val: [::c_ulong; 16],
61 }
62
63 pub struct shmid_ds {
64 pub shm_perm: ::ipc_perm,
65 pub shm_segsz: ::size_t,
66 pub shm_atime: ::time_t,
67 pub shm_dtime: ::time_t,
68 pub shm_ctime: ::time_t,
69 pub shm_cpid: ::pid_t,
70 pub shm_lpid: ::pid_t,
71 pub shm_nattch: ::c_ulong,
72 __pad1: ::c_ulong,
73 __pad2: ::c_ulong,
74 }
75
9e0c209e
SL
76 pub struct msqid_ds {
77 pub msg_perm: ::ipc_perm,
78 pub msg_stime: ::time_t,
79 pub msg_rtime: ::time_t,
80 pub msg_ctime: ::time_t,
81 __msg_cbytes: ::c_ulong,
82 pub msg_qnum: ::msgqnum_t,
83 pub msg_qbytes: ::msglen_t,
84 pub msg_lspid: ::pid_t,
85 pub msg_lrpid: ::pid_t,
86 __pad1: ::c_ulong,
87 __pad2: ::c_ulong,
88 }
89
54a0048b
SL
90 pub struct statfs {
91 pub f_type: ::c_ulong,
92 pub f_bsize: ::c_ulong,
93 pub f_blocks: ::fsblkcnt_t,
94 pub f_bfree: ::fsblkcnt_t,
95 pub f_bavail: ::fsblkcnt_t,
96 pub f_files: ::fsfilcnt_t,
97 pub f_ffree: ::fsfilcnt_t,
98 pub f_fsid: ::fsid_t,
99 pub f_namelen: ::c_ulong,
100 pub f_frsize: ::c_ulong,
101 pub f_flags: ::c_ulong,
102 pub f_spare: [::c_ulong; 4],
103 }
104
105 pub struct msghdr {
106 pub msg_name: *mut ::c_void,
107 pub msg_namelen: ::socklen_t,
108 pub msg_iov: *mut ::iovec,
109 pub msg_iovlen: ::c_int,
110 __pad1: ::c_int,
111 pub msg_control: *mut ::c_void,
112 pub msg_controllen: ::socklen_t,
113 __pad2: ::socklen_t,
114 pub msg_flags: ::c_int,
115 }
5bcae85e
SL
116
117 pub struct sem_t {
118 __val: [::c_int; 8],
119 }
9e0c209e
SL
120
121 pub struct siginfo_t {
122 pub si_signo: ::c_int,
123 pub si_errno: ::c_int,
124 pub si_code: ::c_int,
125 pub _pad: [::c_int; 29],
126 _align: [usize; 0],
127 }
54a0048b
SL
128}
129
7453a54e
SL
130pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
131pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
92a42be0 132
9cc50fc6
SL
133pub const O_DIRECT: ::c_int = 0x4000;
134pub const O_DIRECTORY: ::c_int = 0x10000;
135pub const O_NOFOLLOW: ::c_int = 0x20000;
136pub const O_ASYNC: ::c_int = 0x2000;
92a42be0
SL
137
138pub const FIOCLEX: ::c_int = 0x5451;
139pub const FIONBIO: ::c_int = 0x5421;
140
141pub const RLIMIT_RSS: ::c_int = 5;
142pub const RLIMIT_NOFILE: ::c_int = 7;
143pub const RLIMIT_AS: ::c_int = 9;
144pub const RLIMIT_NPROC: ::c_int = 6;
145pub const RLIMIT_MEMLOCK: ::c_int = 8;
92a42be0
SL
146
147pub const O_APPEND: ::c_int = 1024;
148pub const O_CREAT: ::c_int = 64;
149pub const O_EXCL: ::c_int = 128;
150pub const O_NOCTTY: ::c_int = 256;
151pub const O_NONBLOCK: ::c_int = 2048;
152pub const O_SYNC: ::c_int = 1052672;
153pub const O_RSYNC: ::c_int = 1052672;
154pub const O_DSYNC: ::c_int = 4096;
155
7453a54e
SL
156pub const SOCK_NONBLOCK: ::c_int = 2048;
157
92a42be0 158pub const MAP_ANON: ::c_int = 0x0020;
92a42be0
SL
159pub const MAP_GROWSDOWN: ::c_int = 0x0100;
160pub const MAP_DENYWRITE: ::c_int = 0x0800;
161pub const MAP_EXECUTABLE: ::c_int = 0x01000;
162pub const MAP_LOCKED: ::c_int = 0x02000;
163pub const MAP_NORESERVE: ::c_int = 0x04000;
164pub const MAP_POPULATE: ::c_int = 0x08000;
165pub const MAP_NONBLOCK: ::c_int = 0x010000;
166pub const MAP_STACK: ::c_int = 0x020000;
54a0048b 167pub const MAP_32BIT: ::c_int = 0x0040;
92a42be0 168
7453a54e
SL
169pub const SOCK_STREAM: ::c_int = 1;
170pub const SOCK_DGRAM: ::c_int = 2;
3157f602 171pub const SOCK_SEQPACKET: ::c_int = 5;
7453a54e
SL
172
173pub const SOL_SOCKET: ::c_int = 1;
174
92a42be0
SL
175pub const EDEADLK: ::c_int = 35;
176pub const ENAMETOOLONG: ::c_int = 36;
177pub const ENOLCK: ::c_int = 37;
178pub const ENOSYS: ::c_int = 38;
179pub const ENOTEMPTY: ::c_int = 39;
180pub const ELOOP: ::c_int = 40;
181pub const ENOMSG: ::c_int = 42;
182pub const EIDRM: ::c_int = 43;
183pub const ECHRNG: ::c_int = 44;
184pub const EL2NSYNC: ::c_int = 45;
185pub const EL3HLT: ::c_int = 46;
186pub const EL3RST: ::c_int = 47;
187pub const ELNRNG: ::c_int = 48;
188pub const EUNATCH: ::c_int = 49;
189pub const ENOCSI: ::c_int = 50;
190pub const EL2HLT: ::c_int = 51;
191pub const EBADE: ::c_int = 52;
192pub const EBADR: ::c_int = 53;
193pub const EXFULL: ::c_int = 54;
194pub const ENOANO: ::c_int = 55;
195pub const EBADRQC: ::c_int = 56;
196pub const EBADSLT: ::c_int = 57;
197pub const EDEADLOCK: ::c_int = EDEADLK;
198pub const EMULTIHOP: ::c_int = 72;
7453a54e 199pub const EBADMSG: ::c_int = 74;
92a42be0
SL
200pub const EOVERFLOW: ::c_int = 75;
201pub const ENOTUNIQ: ::c_int = 76;
202pub const EBADFD: ::c_int = 77;
92a42be0
SL
203pub const EREMCHG: ::c_int = 78;
204pub const ELIBACC: ::c_int = 79;
205pub const ELIBBAD: ::c_int = 80;
206pub const ELIBSCN: ::c_int = 81;
207pub const ELIBMAX: ::c_int = 82;
208pub const ELIBEXEC: ::c_int = 83;
209pub const EILSEQ: ::c_int = 84;
210pub const ERESTART: ::c_int = 85;
211pub const ESTRPIPE: ::c_int = 86;
212pub const EUSERS: ::c_int = 87;
213pub const ENOTSOCK: ::c_int = 88;
214pub const EDESTADDRREQ: ::c_int = 89;
215pub const EMSGSIZE: ::c_int = 90;
216pub const EPROTOTYPE: ::c_int = 91;
217pub const ENOPROTOOPT: ::c_int = 92;
218pub const EPROTONOSUPPORT: ::c_int = 93;
219pub const ESOCKTNOSUPPORT: ::c_int = 94;
220pub const EOPNOTSUPP: ::c_int = 95;
221pub const EPFNOSUPPORT: ::c_int = 96;
222pub const EAFNOSUPPORT: ::c_int = 97;
223pub const EADDRINUSE: ::c_int = 98;
224pub const EADDRNOTAVAIL: ::c_int = 99;
225pub const ENETDOWN: ::c_int = 100;
226pub const ENETUNREACH: ::c_int = 101;
227pub const ENETRESET: ::c_int = 102;
228pub const ECONNABORTED: ::c_int = 103;
229pub const ECONNRESET: ::c_int = 104;
230pub const ENOBUFS: ::c_int = 105;
231pub const EISCONN: ::c_int = 106;
232pub const ENOTCONN: ::c_int = 107;
233pub const ESHUTDOWN: ::c_int = 108;
234pub const ETOOMANYREFS: ::c_int = 109;
235pub const ETIMEDOUT: ::c_int = 110;
236pub const ECONNREFUSED: ::c_int = 111;
237pub const EHOSTDOWN: ::c_int = 112;
238pub const EHOSTUNREACH: ::c_int = 113;
239pub const EALREADY: ::c_int = 114;
240pub const EINPROGRESS: ::c_int = 115;
241pub const ESTALE: ::c_int = 116;
242pub const EUCLEAN: ::c_int = 117;
243pub const ENOTNAM: ::c_int = 118;
244pub const ENAVAIL: ::c_int = 119;
245pub const EISNAM: ::c_int = 120;
246pub const EREMOTEIO: ::c_int = 121;
247pub const EDQUOT: ::c_int = 122;
248pub const ENOMEDIUM: ::c_int = 123;
249pub const EMEDIUMTYPE: ::c_int = 124;
250pub const ECANCELED: ::c_int = 125;
251pub const ENOKEY: ::c_int = 126;
252pub const EKEYEXPIRED: ::c_int = 127;
253pub const EKEYREVOKED: ::c_int = 128;
254pub const EKEYREJECTED: ::c_int = 129;
255pub const EOWNERDEAD: ::c_int = 130;
256pub const ENOTRECOVERABLE: ::c_int = 131;
92a42be0 257pub const ERFKILL: ::c_int = 132;
7453a54e 258pub const EHWPOISON: ::c_int = 133;
92a42be0
SL
259
260pub const SO_REUSEADDR: ::c_int = 2;
261pub const SO_TYPE: ::c_int = 3;
262pub const SO_ERROR: ::c_int = 4;
263pub const SO_DONTROUTE: ::c_int = 5;
264pub const SO_BROADCAST: ::c_int = 6;
265pub const SO_SNDBUF: ::c_int = 7;
266pub const SO_RCVBUF: ::c_int = 8;
267pub const SO_KEEPALIVE: ::c_int = 9;
268pub const SO_OOBINLINE: ::c_int = 10;
269pub const SO_LINGER: ::c_int = 13;
270pub const SO_REUSEPORT: ::c_int = 15;
271pub const SO_RCVLOWAT: ::c_int = 18;
272pub const SO_SNDLOWAT: ::c_int = 19;
273pub const SO_RCVTIMEO: ::c_int = 20;
274pub const SO_SNDTIMEO: ::c_int = 21;
275pub const SO_ACCEPTCONN: ::c_int = 30;
276
92a42be0
SL
277pub const SA_ONSTACK: ::c_int = 0x08000000;
278pub const SA_SIGINFO: ::c_int = 0x00000004;
279pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
280
281pub const SIGCHLD: ::c_int = 17;
282pub const SIGBUS: ::c_int = 7;
9cc50fc6
SL
283pub const SIGTTIN: ::c_int = 21;
284pub const SIGTTOU: ::c_int = 22;
285pub const SIGXCPU: ::c_int = 24;
286pub const SIGXFSZ: ::c_int = 25;
287pub const SIGVTALRM: ::c_int = 26;
288pub const SIGPROF: ::c_int = 27;
289pub const SIGWINCH: ::c_int = 28;
290pub const SIGUSR1: ::c_int = 10;
291pub const SIGUSR2: ::c_int = 12;
292pub const SIGCONT: ::c_int = 18;
293pub const SIGSTOP: ::c_int = 19;
294pub const SIGTSTP: ::c_int = 20;
295pub const SIGURG: ::c_int = 23;
296pub const SIGIO: ::c_int = 29;
297pub const SIGSYS: ::c_int = 31;
298pub const SIGSTKFLT: ::c_int = 16;
9cc50fc6
SL
299pub const SIGPOLL: ::c_int = 29;
300pub const SIGPWR: ::c_int = 30;
92a42be0 301pub const SIG_SETMASK: ::c_int = 2;
9cc50fc6
SL
302pub const SIG_BLOCK: ::c_int = 0x000000;
303pub const SIG_UNBLOCK: ::c_int = 0x01;
92a42be0 304
9cc50fc6
SL
305pub const EXTPROC: ::tcflag_t = 0x00010000;
306
9cc50fc6
SL
307pub const MAP_HUGETLB: ::c_int = 0x040000;
308
9cc50fc6
SL
309pub const F_GETLK: ::c_int = 5;
310pub const F_GETOWN: ::c_int = 9;
7453a54e
SL
311pub const F_SETLK: ::c_int = 6;
312pub const F_SETLKW: ::c_int = 7;
9cc50fc6
SL
313pub const F_SETOWN: ::c_int = 8;
314
315pub const VEOF: usize = 4;
316pub const VEOL: usize = 11;
317pub const VEOL2: usize = 16;
318pub const VMIN: usize = 6;
319pub const IEXTEN: ::tcflag_t = 0x00008000;
320pub const TOSTOP: ::tcflag_t = 0x00000100;
321pub const FLUSHO: ::tcflag_t = 0x00001000;
322
3157f602
XL
323pub const TCGETS: ::c_int = 0x5401;
324pub const TCSETS: ::c_int = 0x5402;
325pub const TCSETSW: ::c_int = 0x5403;
326pub const TCSETSF: ::c_int = 0x5404;
327pub const TCGETA: ::c_int = 0x5405;
328pub const TCSETA: ::c_int = 0x5406;
329pub const TCSETAW: ::c_int = 0x5407;
330pub const TCSETAF: ::c_int = 0x5408;
331pub const TCSBRK: ::c_int = 0x5409;
332pub const TCXONC: ::c_int = 0x540A;
333pub const TCFLSH: ::c_int = 0x540B;
334pub const TIOCGSOFTCAR: ::c_int = 0x5419;
335pub const TIOCSSOFTCAR: ::c_int = 0x541A;
336pub const TIOCLINUX: ::c_int = 0x541C;
337pub const TIOCGSERIAL: ::c_int = 0x541E;
338pub const TIOCEXCL: ::c_int = 0x540C;
339pub const TIOCNXCL: ::c_int = 0x540D;
340pub const TIOCSCTTY: ::c_int = 0x540E;
341pub const TIOCGPGRP: ::c_int = 0x540F;
342pub const TIOCSPGRP: ::c_int = 0x5410;
343pub const TIOCOUTQ: ::c_int = 0x5411;
344pub const TIOCSTI: ::c_int = 0x5412;
345pub const TIOCGWINSZ: ::c_int = 0x5413;
346pub const TIOCSWINSZ: ::c_int = 0x5414;
347pub const TIOCMGET: ::c_int = 0x5415;
348pub const TIOCMBIS: ::c_int = 0x5416;
349pub const TIOCMBIC: ::c_int = 0x5417;
350pub const TIOCMSET: ::c_int = 0x5418;
351pub const FIONREAD: ::c_int = 0x541B;
352pub const TIOCCONS: ::c_int = 0x541D;
9cc50fc6 353
9e0c209e
SL
354pub const POLLWRNORM: ::c_short = 0x100;
355pub const POLLWRBAND: ::c_short = 0x200;
356
54a0048b
SL
357cfg_if! {
358 if #[cfg(target_arch = "aarch64")] {
359 mod aarch64;
360 pub use self::aarch64::*;
361 } else if #[cfg(any(target_arch = "powerpc64"))] {
362 mod powerpc64;
363 pub use self::powerpc64::*;
364 } else if #[cfg(any(target_arch = "x86_64"))] {
365 mod x86_64;
366 pub use self::x86_64::*;
367 } else {
368 // Unknown target_arch
7453a54e 369 }
92a42be0 370}