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