]> git.proxmox.com Git - rustc.git/blob - vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / vendor / libc / src / unix / linux_like / linux / musl / b64 / mod.rs
1 pub type c_long = i64;
2 pub type c_ulong = u64;
3 pub type regoff_t = ::c_long;
4
5 s! {
6 pub struct statfs64 {
7 pub f_type: ::c_ulong,
8 pub f_bsize: ::c_ulong,
9 pub f_blocks: ::fsblkcnt_t,
10 pub f_bfree: ::fsblkcnt_t,
11 pub f_bavail: ::fsblkcnt_t,
12 pub f_files: ::fsfilcnt_t,
13 pub f_ffree: ::fsfilcnt_t,
14 pub f_fsid: ::fsid_t,
15 pub f_namelen: ::c_ulong,
16 pub f_frsize: ::c_ulong,
17 pub f_flags: ::c_ulong,
18 pub f_spare: [::c_ulong; 4],
19 }
20
21 pub struct statvfs64 {
22 pub f_bsize: ::c_ulong,
23 pub f_frsize: ::c_ulong,
24 pub f_blocks: u64,
25 pub f_bfree: u64,
26 pub f_bavail: u64,
27 pub f_files: u64,
28 pub f_ffree: u64,
29 pub f_favail: u64,
30 pub f_fsid: ::c_ulong,
31 pub f_flag: ::c_ulong,
32 pub f_namemax: ::c_ulong,
33 __f_spare: [::c_int; 6],
34 }
35
36 pub struct stack_t {
37 pub ss_sp: *mut ::c_void,
38 pub ss_flags: ::c_int,
39 pub ss_size: ::size_t
40 }
41
42 pub struct pthread_attr_t {
43 __size: [u64; 7]
44 }
45
46 pub struct sigset_t {
47 __val: [::c_ulong; 16],
48 }
49
50 pub struct shmid_ds {
51 pub shm_perm: ::ipc_perm,
52 pub shm_segsz: ::size_t,
53 pub shm_atime: ::time_t,
54 pub shm_dtime: ::time_t,
55 pub shm_ctime: ::time_t,
56 pub shm_cpid: ::pid_t,
57 pub shm_lpid: ::pid_t,
58 pub shm_nattch: ::c_ulong,
59 __pad1: ::c_ulong,
60 __pad2: ::c_ulong,
61 }
62
63 pub struct msqid_ds {
64 pub msg_perm: ::ipc_perm,
65 pub msg_stime: ::time_t,
66 pub msg_rtime: ::time_t,
67 pub msg_ctime: ::time_t,
68 __msg_cbytes: ::c_ulong,
69 pub msg_qnum: ::msgqnum_t,
70 pub msg_qbytes: ::msglen_t,
71 pub msg_lspid: ::pid_t,
72 pub msg_lrpid: ::pid_t,
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 #[cfg(target_endian = "big")]
97 __pad1: ::c_int,
98 pub msg_iovlen: ::c_int,
99 #[cfg(target_endian = "little")]
100 __pad1: ::c_int,
101 pub msg_control: *mut ::c_void,
102 #[cfg(target_endian = "big")]
103 __pad2: ::c_int,
104 pub msg_controllen: ::socklen_t,
105 #[cfg(target_endian = "little")]
106 __pad2: ::c_int,
107 pub msg_flags: ::c_int,
108 }
109
110 pub struct cmsghdr {
111 #[cfg(target_endian = "big")]
112 pub __pad1: ::c_int,
113 pub cmsg_len: ::socklen_t,
114 #[cfg(target_endian = "little")]
115 pub __pad1: ::c_int,
116 pub cmsg_level: ::c_int,
117 pub cmsg_type: ::c_int,
118 }
119
120 pub struct sem_t {
121 __val: [::c_int; 8],
122 }
123
124 pub struct siginfo_t {
125 pub si_signo: ::c_int,
126 pub si_errno: ::c_int,
127 pub si_code: ::c_int,
128 pub _pad: [::c_int; 29],
129 _align: [usize; 0],
130 }
131 }
132
133 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
134 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
135
136 pub const RLIMIT_RSS: ::c_int = 5;
137 pub const RLIMIT_NOFILE: ::c_int = 7;
138 pub const RLIMIT_AS: ::c_int = 9;
139 pub const RLIMIT_NPROC: ::c_int = 6;
140 pub const RLIMIT_MEMLOCK: ::c_int = 8;
141
142 pub const SOCK_NONBLOCK: ::c_int = 2048;
143
144 pub const SOCK_SEQPACKET: ::c_int = 5;
145
146 extern "C" {
147 pub fn getrandom(
148 buf: *mut ::c_void,
149 buflen: ::size_t,
150 flags: ::c_uint,
151 ) -> ::ssize_t;
152 }
153
154 cfg_if! {
155 if #[cfg(target_arch = "aarch64")] {
156 mod aarch64;
157 pub use self::aarch64::*;
158 } else if #[cfg(target_arch = "mips64")] {
159 mod mips64;
160 pub use self::mips64::*;
161 } else if #[cfg(any(target_arch = "powerpc64"))] {
162 mod powerpc64;
163 pub use self::powerpc64::*;
164 } else if #[cfg(any(target_arch = "s390x"))] {
165 mod s390x;
166 pub use self::s390x::*;
167 } else if #[cfg(any(target_arch = "x86_64"))] {
168 mod x86_64;
169 pub use self::x86_64::*;
170 } else {
171 // Unknown target_arch
172 }
173 }