]> git.proxmox.com Git - rustc.git/blame - vendor/libc/src/unix/linux_like/linux/uclibc/mod.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / vendor / libc / src / unix / linux_like / linux / uclibc / mod.rs
CommitLineData
6a06907d
XL
1pub type shmatt_t = ::c_ulong;
2pub type msgqnum_t = ::c_ulong;
3pub type msglen_t = ::c_ulong;
4pub type regoff_t = ::c_int;
5
6s! {
7 pub struct statvfs { // Different than GNU!
8 pub f_bsize: ::c_ulong,
9 pub f_frsize: ::c_ulong,
10 pub f_blocks: ::fsblkcnt_t,
11 pub f_bfree: ::fsblkcnt_t,
12 pub f_bavail: ::fsblkcnt_t,
13 pub f_files: ::fsfilcnt_t,
14 pub f_ffree: ::fsfilcnt_t,
15 pub f_favail: ::fsfilcnt_t,
16 #[cfg(target_endian = "little")]
17 pub f_fsid: ::c_ulong,
18 #[cfg(target_pointer_width = "32")]
19 __f_unused: ::c_int,
20 #[cfg(target_endian = "big")]
21 pub f_fsid: ::c_ulong,
22 pub f_flag: ::c_ulong,
23 pub f_namemax: ::c_ulong,
24 __f_spare: [::c_int; 6],
25 }
26
27 pub struct regex_t {
28 __buffer: *mut ::c_void,
29 __allocated: ::size_t,
30 __used: ::size_t,
31 __syntax: ::c_ulong,
32 __fastmap: *mut ::c_char,
33 __translate: *mut ::c_char,
34 __re_nsub: ::size_t,
35 __bitfield: u8,
36 }
37}
38
39pub const MCL_CURRENT: ::c_int = 0x0001;
40pub const MCL_FUTURE: ::c_int = 0x0002;
41
42pub const SIGEV_THREAD_ID: ::c_int = 4;
43
136023e0
XL
44pub const AF_VSOCK: ::c_int = 40;
45
6a06907d
XL
46pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
47pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
48pub const AFS_SUPER_MAGIC: ::c_long = 0x5346414f;
49pub const AUTOFS_SUPER_MAGIC: ::c_long = 0x0187;
50pub const BINDERFS_SUPER_MAGIC: ::c_long = 0x6c6f6f70;
51pub const BPF_FS_MAGIC: ::c_long = 0xcafe4a11;
52pub const BTRFS_SUPER_MAGIC: ::c_long = 0x9123683e;
53pub const CGROUP2_SUPER_MAGIC: ::c_long = 0x63677270;
54pub const CGROUP_SUPER_MAGIC: ::c_long = 0x27e0eb;
55pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
56pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
57pub const DEBUGFS_MAGIC: ::c_long = 0x64626720;
58pub const DEVPTS_SUPER_MAGIC: ::c_long = 0x1cd1;
59pub const ECRYPTFS_SUPER_MAGIC: ::c_long = 0xf15f;
60pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
61pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
62pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
63pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
64pub const F2FS_SUPER_MAGIC: ::c_long = 0xf2f52010;
65pub const FUTEXFS_SUPER_MAGIC: ::c_long = 0xbad1dea;
66pub const HOSTFS_SUPER_MAGIC: ::c_long = 0x00c0ffee;
67pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
68pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
69pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
70pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
71pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
72pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
73pub const MINIX3_SUPER_MAGIC: ::c_long = 0x4d5a;
74pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
75pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
76pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
77pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
78pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
79pub const NILFS_SUPER_MAGIC: ::c_long = 0x3434;
80pub const OCFS2_SUPER_MAGIC: ::c_long = 0x7461636f;
81pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
82pub const OVERLAYFS_SUPER_MAGIC: ::c_long = 0x794c7630;
83pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
84pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
85pub const QNX6_SUPER_MAGIC: ::c_long = 0x68191122;
86pub const RDTGROUP_SUPER_MAGIC: ::c_long = 0x7655821;
87pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
88pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
89pub const SYSFS_MAGIC: ::c_long = 0x62656572;
90pub const TMPFS_MAGIC: ::c_long = 0x01021994;
91pub const TRACEFS_MAGIC: ::c_long = 0x74726163;
92pub const UDF_SUPER_MAGIC: ::c_long = 0x15013346;
93pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
94pub const XENFS_SUPER_MAGIC: ::c_long = 0xabba1974;
95pub const XFS_SUPER_MAGIC: ::c_long = 0x58465342;
96
97pub const PTRACE_TRACEME: ::c_int = 0;
98pub const PTRACE_PEEKTEXT: ::c_int = 1;
99pub const PTRACE_PEEKDATA: ::c_int = 2;
100pub const PTRACE_PEEKUSER: ::c_int = 3;
101pub const PTRACE_POKETEXT: ::c_int = 4;
102pub const PTRACE_POKEDATA: ::c_int = 5;
103pub const PTRACE_POKEUSER: ::c_int = 6;
104pub const PTRACE_CONT: ::c_int = 7;
105pub const PTRACE_KILL: ::c_int = 8;
106pub const PTRACE_SINGLESTEP: ::c_int = 9;
107pub const PTRACE_GETREGS: ::c_int = 12;
108pub const PTRACE_SETREGS: ::c_int = 13;
109pub const PTRACE_GETFPREGS: ::c_int = 14;
110pub const PTRACE_SETFPREGS: ::c_int = 15;
111pub const PTRACE_ATTACH: ::c_int = 16;
112pub const PTRACE_DETACH: ::c_int = 17;
113pub const PTRACE_GETFPXREGS: ::c_int = 18;
114pub const PTRACE_SETFPXREGS: ::c_int = 19;
115pub const PTRACE_SYSCALL: ::c_int = 24;
116pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
117pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
118pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
119pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
120pub const PTRACE_GETREGSET: ::c_int = 0x4204;
121pub const PTRACE_SETREGSET: ::c_int = 0x4205;
122pub const PTRACE_SEIZE: ::c_int = 0x4206;
123pub const PTRACE_INTERRUPT: ::c_int = 0x4207;
124pub const PTRACE_LISTEN: ::c_int = 0x4208;
125pub const PTRACE_O_MASK: ::c_int = 0x000000ff;
126
127pub const POSIX_FADV_DONTNEED: ::c_int = 4;
128pub const POSIX_FADV_NOREUSE: ::c_int = 5;
129
130pub const RLIMIT_CPU: ::c_int = 0;
131pub const RLIMIT_FSIZE: ::c_int = 1;
132pub const RLIMIT_DATA: ::c_int = 2;
133pub const RLIMIT_STACK: ::c_int = 3;
134pub const RLIMIT_CORE: ::c_int = 4;
135pub const RLIMIT_LOCKS: ::c_int = 10;
136pub const RLIMIT_SIGPENDING: ::c_int = 11;
137pub const RLIMIT_MSGQUEUE: ::c_int = 12;
138pub const RLIMIT_NICE: ::c_int = 13;
139pub const RLIMIT_RTPRIO: ::c_int = 14;
140
141// These are different than GNU!
142pub const LC_CTYPE: ::c_int = 0;
143pub const LC_NUMERIC: ::c_int = 1;
144pub const LC_TIME: ::c_int = 3;
145pub const LC_COLLATE: ::c_int = 4;
146pub const LC_MONETARY: ::c_int = 2;
147pub const LC_MESSAGES: ::c_int = 5;
148pub const LC_ALL: ::c_int = 6;
149// end different section
150
151// MS_ flags for mount(2)
cdc7bbd5 152pub const MS_RMT_MASK: ::c_ulong = ::MS_RDONLY | ::MS_SYNCHRONOUS | ::MS_MANDLOCK | ::MS_I_VERSION;
6a06907d
XL
153
154pub const ENOTSUP: ::c_int = EOPNOTSUPP;
155
156pub const IPV6_JOIN_GROUP: ::c_int = 20;
157pub const IPV6_LEAVE_GROUP: ::c_int = 21;
158
159// These are different from GNU
160pub const ABDAY_1: ::nl_item = 0x300;
161pub const ABDAY_2: ::nl_item = 0x301;
162pub const ABDAY_3: ::nl_item = 0x302;
163pub const ABDAY_4: ::nl_item = 0x303;
164pub const ABDAY_5: ::nl_item = 0x304;
165pub const ABDAY_6: ::nl_item = 0x305;
166pub const ABDAY_7: ::nl_item = 0x306;
167pub const DAY_1: ::nl_item = 0x307;
168pub const DAY_2: ::nl_item = 0x308;
169pub const DAY_3: ::nl_item = 0x309;
170pub const DAY_4: ::nl_item = 0x30A;
171pub const DAY_5: ::nl_item = 0x30B;
172pub const DAY_6: ::nl_item = 0x30C;
173pub const DAY_7: ::nl_item = 0x30D;
174pub const ABMON_1: ::nl_item = 0x30E;
175pub const ABMON_2: ::nl_item = 0x30F;
176pub const ABMON_3: ::nl_item = 0x310;
177pub const ABMON_4: ::nl_item = 0x311;
178pub const ABMON_5: ::nl_item = 0x312;
179pub const ABMON_6: ::nl_item = 0x313;
180pub const ABMON_7: ::nl_item = 0x314;
181pub const ABMON_8: ::nl_item = 0x315;
182pub const ABMON_9: ::nl_item = 0x316;
183pub const ABMON_10: ::nl_item = 0x317;
184pub const ABMON_11: ::nl_item = 0x318;
185pub const ABMON_12: ::nl_item = 0x319;
186pub const MON_1: ::nl_item = 0x31A;
187pub const MON_2: ::nl_item = 0x31B;
188pub const MON_3: ::nl_item = 0x31C;
189pub const MON_4: ::nl_item = 0x31D;
190pub const MON_5: ::nl_item = 0x31E;
191pub const MON_6: ::nl_item = 0x31F;
192pub const MON_7: ::nl_item = 0x320;
193pub const MON_8: ::nl_item = 0x321;
194pub const MON_9: ::nl_item = 0x322;
195pub const MON_10: ::nl_item = 0x323;
196pub const MON_11: ::nl_item = 0x324;
197pub const MON_12: ::nl_item = 0x325;
198pub const AM_STR: ::nl_item = 0x326;
199pub const PM_STR: ::nl_item = 0x327;
200pub const D_T_FMT: ::nl_item = 0x328;
201pub const D_FMT: ::nl_item = 0x329;
202pub const T_FMT: ::nl_item = 0x32A;
203pub const T_FMT_AMPM: ::nl_item = 0x32B;
204pub const ERA: ::nl_item = 0x32C;
205pub const ERA_D_FMT: ::nl_item = 0x32E;
206pub const ALT_DIGITS: ::nl_item = 0x32F;
207pub const ERA_D_T_FMT: ::nl_item = 0x330;
208pub const ERA_T_FMT: ::nl_item = 0x331;
209pub const CODESET: ::nl_item = 10;
210pub const CRNCYSTR: ::nl_item = 0x215;
211pub const RADIXCHAR: ::nl_item = 0x100;
212pub const THOUSEP: ::nl_item = 0x101;
213pub const NOEXPR: ::nl_item = 0x501;
214pub const YESSTR: ::nl_item = 0x502;
215pub const NOSTR: ::nl_item = 0x503;
216
217// Different than Gnu.
218pub const FILENAME_MAX: ::c_uint = 4095;
219
220pub const PRIO_PROCESS: ::c_int = 0;
221pub const PRIO_PGRP: ::c_int = 1;
222pub const PRIO_USER: ::c_int = 2;
223
224pub const ST_RELATIME: ::c_ulong = 4096;
225
226extern "C" {
227 pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int;
228
229 pub fn pthread_rwlockattr_getkind_np(
230 attr: *const ::pthread_rwlockattr_t,
231 val: *mut ::c_int,
232 ) -> ::c_int;
233 pub fn pthread_rwlockattr_setkind_np(
234 attr: *mut ::pthread_rwlockattr_t,
235 val: ::c_int,
236 ) -> ::c_int;
237
238 pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
239
240 pub fn sendmmsg(
241 sockfd: ::c_int,
242 msgvec: *mut ::mmsghdr,
243 vlen: ::c_uint,
244 flags: ::c_int,
245 ) -> ::c_int;
246 pub fn recvmmsg(
247 sockfd: ::c_int,
248 msgvec: *mut ::mmsghdr,
249 vlen: ::c_uint,
250 flags: ::c_int,
251 timeout: *mut ::timespec,
252 ) -> ::c_int;
253
254 pub fn openpty(
255 amaster: *mut ::c_int,
256 aslave: *mut ::c_int,
257 name: *mut ::c_char,
258 termp: *mut termios,
259 winp: *mut ::winsize,
260 ) -> ::c_int;
261 pub fn forkpty(
262 amaster: *mut ::c_int,
263 name: *mut ::c_char,
264 termp: *mut termios,
265 winp: *mut ::winsize,
266 ) -> ::pid_t;
267
268 pub fn getnameinfo(
269 sa: *const ::sockaddr,
270 salen: ::socklen_t,
271 host: *mut ::c_char,
272 hostlen: ::socklen_t,
273 serv: *mut ::c_char,
274 sevlen: ::socklen_t,
275 flags: ::c_int,
276 ) -> ::c_int;
277
278 pub fn pwritev(
279 fd: ::c_int,
280 iov: *const ::iovec,
281 iovcnt: ::c_int,
282 offset: ::off64_t,
283 ) -> ::ssize_t;
284 pub fn preadv(
285 fd: ::c_int,
286 iov: *const ::iovec,
287 iovcnt: ::c_int,
288 offset: ::off64_t,
289 ) -> ::ssize_t;
290}
291
292cfg_if! {
293 if #[cfg(any(target_arch = "mips", target_arch = "mips64"))] {
294 mod mips;
295 pub use self::mips::*;
296 } else if #[cfg(target_arch = "x86_64")] {
297 mod x86_64;
298 pub use self::x86_64::*;
299 } else if #[cfg(target_arch = "arm")] {
300 mod arm;
301 pub use self::arm::*;
302 } else {
303 pub use unsupported_target;
304 }
305}