]> git.proxmox.com Git - rustc.git/blame - vendor/libc/src/unix/linux_like/linux/gnu/mod.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / vendor / libc / src / unix / linux_like / linux / gnu / mod.rs
CommitLineData
416331ca 1pub type pthread_t = c_ulong;
476ff2be 2pub type __priority_which_t = ::c_uint;
416331ca 3pub type __rlimit_resource_t = ::c_uint;
ba9703b0
XL
4pub type Lmid_t = ::c_long;
5pub type regoff_t = ::c_int;
476ff2be
SL
6
7s! {
416331ca
XL
8 pub struct statx {
9 pub stx_mask: u32,
10 pub stx_blksize: u32,
11 pub stx_attributes: u64,
12 pub stx_nlink: u32,
13 pub stx_uid: u32,
14 pub stx_gid: u32,
15 pub stx_mode: u16,
16 pub __statx_pad1: [u16; 1],
17 pub stx_ino: u64,
18 pub stx_size: u64,
19 pub stx_blocks: u64,
20 pub stx_attributes_mask: u64,
21 pub stx_atime: ::statx_timestamp,
22 pub stx_btime: ::statx_timestamp,
23 pub stx_ctime: ::statx_timestamp,
24 pub stx_mtime: ::statx_timestamp,
25 pub stx_rdev_major: u32,
26 pub stx_rdev_minor: u32,
27 pub stx_dev_major: u32,
28 pub stx_dev_minor: u32,
29 pub __statx_pad2: [u64; 14],
30 }
31
32 pub struct statx_timestamp {
33 pub tv_sec: i64,
34 pub tv_nsec: u32,
35 pub __statx_timestamp_pad1: [i32; 1],
36 }
37
8bb4bdeb
XL
38 pub struct aiocb {
39 pub aio_fildes: ::c_int,
40 pub aio_lio_opcode: ::c_int,
41 pub aio_reqprio: ::c_int,
42 pub aio_buf: *mut ::c_void,
43 pub aio_nbytes: ::size_t,
44 pub aio_sigevent: ::sigevent,
45 __next_prio: *mut aiocb,
46 __abs_prio: ::c_int,
47 __policy: ::c_int,
48 __error_code: ::c_int,
49 __return_value: ::ssize_t,
50 pub aio_offset: off_t,
abe05a73 51 #[cfg(all(not(target_arch = "x86_64"), target_pointer_width = "32"))]
8bb4bdeb
XL
52 __unused1: [::c_char; 4],
53 __glibc_reserved: [::c_char; 32]
54 }
55
476ff2be
SL
56 pub struct __exit_status {
57 pub e_termination: ::c_short,
58 pub e_exit: ::c_short,
59 }
60
61 pub struct __timeval {
416331ca
XL
62 pub tv_sec: i32,
63 pub tv_usec: i32,
476ff2be
SL
64 }
65
66 pub struct glob64_t {
67 pub gl_pathc: ::size_t,
68 pub gl_pathv: *mut *mut ::c_char,
69 pub gl_offs: ::size_t,
70 pub gl_flags: ::c_int,
71
72 __unused1: *mut ::c_void,
73 __unused2: *mut ::c_void,
74 __unused3: *mut ::c_void,
75 __unused4: *mut ::c_void,
76 __unused5: *mut ::c_void,
77 }
78
476ff2be
SL
79 pub struct msghdr {
80 pub msg_name: *mut ::c_void,
81 pub msg_namelen: ::socklen_t,
82 pub msg_iov: *mut ::iovec,
83 pub msg_iovlen: ::size_t,
84 pub msg_control: *mut ::c_void,
85 pub msg_controllen: ::size_t,
86 pub msg_flags: ::c_int,
87 }
88
8bb4bdeb
XL
89 pub struct cmsghdr {
90 pub cmsg_len: ::size_t,
91 pub cmsg_level: ::c_int,
92 pub cmsg_type: ::c_int,
93 }
94
476ff2be
SL
95 pub struct termios {
96 pub c_iflag: ::tcflag_t,
97 pub c_oflag: ::tcflag_t,
98 pub c_cflag: ::tcflag_t,
99 pub c_lflag: ::tcflag_t,
100 pub c_line: ::cc_t,
101 pub c_cc: [::cc_t; ::NCCS],
416331ca 102 #[cfg(not(any(
dfeec247 103 target_arch = "sparc",
416331ca
XL
104 target_arch = "sparc64",
105 target_arch = "mips",
106 target_arch = "mips64")))]
476ff2be 107 pub c_ispeed: ::speed_t,
416331ca 108 #[cfg(not(any(
dfeec247 109 target_arch = "sparc",
416331ca
XL
110 target_arch = "sparc64",
111 target_arch = "mips",
112 target_arch = "mips64")))]
476ff2be
SL
113 pub c_ospeed: ::speed_t,
114 }
115
2c00a5a8
XL
116 pub struct mallinfo {
117 pub arena: ::c_int,
118 pub ordblks: ::c_int,
119 pub smblks: ::c_int,
120 pub hblks: ::c_int,
121 pub hblkhd: ::c_int,
122 pub usmblks: ::c_int,
123 pub fsmblks: ::c_int,
124 pub uordblks: ::c_int,
125 pub fordblks: ::c_int,
126 pub keepcost: ::c_int,
127 }
128
129 pub struct nlmsghdr {
8faf50e0
XL
130 pub nlmsg_len: u32,
131 pub nlmsg_type: u16,
132 pub nlmsg_flags: u16,
133 pub nlmsg_seq: u32,
134 pub nlmsg_pid: u32,
2c00a5a8
XL
135 }
136
137 pub struct nlmsgerr {
8faf50e0
XL
138 pub error: ::c_int,
139 pub msg: nlmsghdr,
2c00a5a8
XL
140 }
141
142 pub struct nl_pktinfo {
8faf50e0 143 pub group: u32,
2c00a5a8
XL
144 }
145
146 pub struct nl_mmap_req {
8faf50e0
XL
147 pub nm_block_size: ::c_uint,
148 pub nm_block_nr: ::c_uint,
149 pub nm_frame_size: ::c_uint,
150 pub nm_frame_nr: ::c_uint,
2c00a5a8
XL
151 }
152
153 pub struct nl_mmap_hdr {
8faf50e0
XL
154 pub nm_status: ::c_uint,
155 pub nm_len: ::c_uint,
156 pub nm_group: u32,
157 pub nm_pid: u32,
158 pub nm_uid: u32,
159 pub nm_gid: u32,
2c00a5a8
XL
160 }
161
162 pub struct nlattr {
8faf50e0
XL
163 pub nla_len: u16,
164 pub nla_type: u16,
165 }
166
167 pub struct rtentry {
168 pub rt_pad1: ::c_ulong,
169 pub rt_dst: ::sockaddr,
170 pub rt_gateway: ::sockaddr,
171 pub rt_genmask: ::sockaddr,
172 pub rt_flags: ::c_ushort,
173 pub rt_pad2: ::c_short,
174 pub rt_pad3: ::c_ulong,
175 pub rt_tos: ::c_uchar,
176 pub rt_class: ::c_uchar,
177 #[cfg(target_pointer_width = "64")]
178 pub rt_pad4: [::c_short; 3usize],
179 #[cfg(not(target_pointer_width = "64"))]
180 pub rt_pad4: ::c_short,
181 pub rt_metric: ::c_short,
182 pub rt_dev: *mut ::c_char,
183 pub rt_mtu: ::c_ulong,
184 pub rt_window: ::c_ulong,
185 pub rt_irtt: ::c_ushort,
2c00a5a8 186 }
ba9703b0
XL
187
188 pub struct timex {
189 pub modes: ::c_uint,
190 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
191 pub offset: i64,
192 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
193 pub offset: ::c_long,
194 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
195 pub freq: i64,
196 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
197 pub freq: ::c_long,
198 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
199 pub maxerror: i64,
200 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
201 pub maxerror: ::c_long,
202 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
203 pub esterror: i64,
204 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
205 pub esterror: ::c_long,
206 pub status: ::c_int,
207 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
208 pub constant: i64,
209 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
210 pub constant: ::c_long,
211 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
212 pub precision: i64,
213 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
214 pub precision: ::c_long,
215 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
216 pub tolerance: i64,
217 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
218 pub tolerance: ::c_long,
219 pub time: ::timeval,
220 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
221 pub tick: i64,
222 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
223 pub tick: ::c_long,
224 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
225 pub ppsfreq: i64,
226 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
227 pub ppsfreq: ::c_long,
228 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
229 pub jitter: i64,
230 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
231 pub jitter: ::c_long,
232 pub shift: ::c_int,
233 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
234 pub stabil: i64,
235 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
236 pub stabil: ::c_long,
237 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
238 pub jitcnt: i64,
239 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
240 pub jitcnt: ::c_long,
241 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
242 pub calcnt: i64,
243 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
244 pub calcnt: ::c_long,
245 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
246 pub errcnt: i64,
247 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
248 pub errcnt: ::c_long,
249 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
250 pub stbcnt: i64,
251 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
252 pub stbcnt: ::c_long,
253 pub tai: ::c_int,
254 pub __unused1: i32,
255 pub __unused2: i32,
256 pub __unused3: i32,
257 pub __unused4: i32,
258 pub __unused5: i32,
259 pub __unused6: i32,
260 pub __unused7: i32,
261 pub __unused8: i32,
262 pub __unused9: i32,
263 pub __unused10: i32,
264 pub __unused11: i32,
265 }
266
267 pub struct ntptimeval {
268 pub time: ::timeval,
269 pub maxerror: ::c_long,
270 pub esterror: ::c_long,
271 pub tai: ::c_long,
272 pub __glibc_reserved1: ::c_long,
273 pub __glibc_reserved2: ::c_long,
274 pub __glibc_reserved3: ::c_long,
275 pub __glibc_reserved4: ::c_long,
276 }
277
278 pub struct regex_t {
279 __buffer: *mut ::c_void,
280 __allocated: ::size_t,
281 __used: ::size_t,
282 __syntax: ::c_ulong,
283 __fastmap: *mut ::c_char,
284 __translate: *mut ::c_char,
285 __re_nsub: ::size_t,
286 __bitfield: u8,
287 }
476ff2be
SL
288}
289
48663c56
XL
290impl siginfo_t {
291 pub unsafe fn si_addr(&self) -> *mut ::c_void {
292 #[repr(C)]
293 struct siginfo_sigfault {
294 _si_signo: ::c_int,
295 _si_errno: ::c_int,
296 _si_code: ::c_int,
e74abb32 297 si_addr: *mut ::c_void,
48663c56
XL
298 }
299 (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr
300 }
416331ca
XL
301
302 pub unsafe fn si_value(&self) -> ::sigval {
303 #[repr(C)]
304 struct siginfo_timer {
305 _si_signo: ::c_int,
306 _si_errno: ::c_int,
307 _si_code: ::c_int,
308 _si_tid: ::c_int,
309 _si_overrun: ::c_int,
310 si_sigval: ::sigval,
311 }
312 (*(self as *const siginfo_t as *const siginfo_timer)).si_sigval
313 }
48663c56
XL
314}
315
532ac7d7
XL
316s_no_extra_traits! {
317 pub struct utmpx {
318 pub ut_type: ::c_short,
319 pub ut_pid: ::pid_t,
320 pub ut_line: [::c_char; __UT_LINESIZE],
321 pub ut_id: [::c_char; 4],
322
323 pub ut_user: [::c_char; __UT_NAMESIZE],
324 pub ut_host: [::c_char; __UT_HOSTSIZE],
325 pub ut_exit: __exit_status,
326
327 #[cfg(any(target_arch = "aarch64",
416331ca 328 target_arch = "s390x",
532ac7d7
XL
329 all(target_pointer_width = "32",
330 not(target_arch = "x86_64"))))]
331 pub ut_session: ::c_long,
332 #[cfg(any(target_arch = "aarch64",
416331ca 333 target_arch = "s390x",
532ac7d7
XL
334 all(target_pointer_width = "32",
335 not(target_arch = "x86_64"))))]
336 pub ut_tv: ::timeval,
337
338 #[cfg(not(any(target_arch = "aarch64",
416331ca 339 target_arch = "s390x",
532ac7d7
XL
340 all(target_pointer_width = "32",
341 not(target_arch = "x86_64")))))]
416331ca 342 pub ut_session: i32,
532ac7d7 343 #[cfg(not(any(target_arch = "aarch64",
416331ca 344 target_arch = "s390x",
532ac7d7
XL
345 all(target_pointer_width = "32",
346 not(target_arch = "x86_64")))))]
347 pub ut_tv: __timeval,
348
416331ca 349 pub ut_addr_v6: [i32; 4],
532ac7d7
XL
350 __glibc_reserved: [::c_char; 20],
351 }
352}
353
354cfg_if! {
355 if #[cfg(feature = "extra_traits")] {
356 impl PartialEq for utmpx {
357 fn eq(&self, other: &utmpx) -> bool {
358 self.ut_type == other.ut_type
359 && self.ut_pid == other.ut_pid
360 && self.ut_line == other.ut_line
361 && self.ut_id == other.ut_id
362 && self.ut_user == other.ut_user
363 && self
364 .ut_host
365 .iter()
366 .zip(other.ut_host.iter())
367 .all(|(a,b)| a == b)
368 && self.ut_exit == other.ut_exit
369 && self.ut_session == other.ut_session
370 && self.ut_tv == other.ut_tv
371 && self.ut_addr_v6 == other.ut_addr_v6
372 && self.__glibc_reserved == other.__glibc_reserved
373 }
374 }
375
376 impl Eq for utmpx {}
377
378 impl ::fmt::Debug for utmpx {
379 fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
380 f.debug_struct("utmpx")
381 .field("ut_type", &self.ut_type)
382 .field("ut_pid", &self.ut_pid)
383 .field("ut_line", &self.ut_line)
384 .field("ut_id", &self.ut_id)
385 .field("ut_user", &self.ut_user)
386 // FIXME: .field("ut_host", &self.ut_host)
387 .field("ut_exit", &self.ut_exit)
388 .field("ut_session", &self.ut_session)
389 .field("ut_tv", &self.ut_tv)
390 .field("ut_addr_v6", &self.ut_addr_v6)
391 .field("__glibc_reserved", &self.__glibc_reserved)
392 .finish()
393 }
394 }
395
396 impl ::hash::Hash for utmpx {
397 fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
398 self.ut_type.hash(state);
399 self.ut_pid.hash(state);
400 self.ut_line.hash(state);
401 self.ut_id.hash(state);
402 self.ut_user.hash(state);
403 self.ut_host.hash(state);
404 self.ut_exit.hash(state);
405 self.ut_session.hash(state);
406 self.ut_tv.hash(state);
407 self.ut_addr_v6.hash(state);
408 self.__glibc_reserved.hash(state);
409 }
410 }
411 }
412}
413
ba9703b0
XL
414// include/uapi/asm-generic/hugetlb_encode.h
415pub const HUGETLB_FLAG_ENCODE_SHIFT: ::c_int = 26;
416pub const HUGETLB_FLAG_ENCODE_MASK: ::c_int = 0x3f;
417
418pub const HUGETLB_FLAG_ENCODE_64KB: ::c_int = 16 << HUGETLB_FLAG_ENCODE_SHIFT;
419pub const HUGETLB_FLAG_ENCODE_512KB: ::c_int = 19 << HUGETLB_FLAG_ENCODE_SHIFT;
420pub const HUGETLB_FLAG_ENCODE_1MB: ::c_int = 20 << HUGETLB_FLAG_ENCODE_SHIFT;
421pub const HUGETLB_FLAG_ENCODE_2MB: ::c_int = 21 << HUGETLB_FLAG_ENCODE_SHIFT;
422pub const HUGETLB_FLAG_ENCODE_8MB: ::c_int = 23 << HUGETLB_FLAG_ENCODE_SHIFT;
423pub const HUGETLB_FLAG_ENCODE_16MB: ::c_int = 24 << HUGETLB_FLAG_ENCODE_SHIFT;
424pub const HUGETLB_FLAG_ENCODE_32MB: ::c_int = 25 << HUGETLB_FLAG_ENCODE_SHIFT;
425pub const HUGETLB_FLAG_ENCODE_256MB: ::c_int = 28 << HUGETLB_FLAG_ENCODE_SHIFT;
426pub const HUGETLB_FLAG_ENCODE_512MB: ::c_int = 29 << HUGETLB_FLAG_ENCODE_SHIFT;
427pub const HUGETLB_FLAG_ENCODE_1GB: ::c_int = 30 << HUGETLB_FLAG_ENCODE_SHIFT;
428pub const HUGETLB_FLAG_ENCODE_2GB: ::c_int = 31 << HUGETLB_FLAG_ENCODE_SHIFT;
429pub const HUGETLB_FLAG_ENCODE_16GB: ::c_int = 34 << HUGETLB_FLAG_ENCODE_SHIFT;
430
431// include/uapi/linux/mman.h
432/*
433 * Huge page size encoding when MAP_HUGETLB is specified, and a huge page
434 * size other than the default is desired. See hugetlb_encode.h.
435 * All known huge page size encodings are provided here. It is the
436 * responsibility of the application to know which sizes are supported on
437 * the running system. See mmap(2) man page for details.
438 */
439pub const MAP_HUGE_SHIFT: ::c_int = HUGETLB_FLAG_ENCODE_SHIFT;
440pub const MAP_HUGE_MASK: ::c_int = HUGETLB_FLAG_ENCODE_MASK;
441
442pub const MAP_HUGE_64KB: ::c_int = HUGETLB_FLAG_ENCODE_64KB;
443pub const MAP_HUGE_512KB: ::c_int = HUGETLB_FLAG_ENCODE_512KB;
444pub const MAP_HUGE_1MB: ::c_int = HUGETLB_FLAG_ENCODE_1MB;
445pub const MAP_HUGE_2MB: ::c_int = HUGETLB_FLAG_ENCODE_2MB;
446pub const MAP_HUGE_8MB: ::c_int = HUGETLB_FLAG_ENCODE_8MB;
447pub const MAP_HUGE_16MB: ::c_int = HUGETLB_FLAG_ENCODE_16MB;
448pub const MAP_HUGE_32MB: ::c_int = HUGETLB_FLAG_ENCODE_32MB;
449pub const MAP_HUGE_256MB: ::c_int = HUGETLB_FLAG_ENCODE_256MB;
450pub const MAP_HUGE_512MB: ::c_int = HUGETLB_FLAG_ENCODE_512MB;
451pub const MAP_HUGE_1GB: ::c_int = HUGETLB_FLAG_ENCODE_1GB;
452pub const MAP_HUGE_2GB: ::c_int = HUGETLB_FLAG_ENCODE_2GB;
453pub const MAP_HUGE_16GB: ::c_int = HUGETLB_FLAG_ENCODE_16GB;
454
416331ca
XL
455pub const RLIMIT_CPU: ::__rlimit_resource_t = 0;
456pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1;
457pub const RLIMIT_DATA: ::__rlimit_resource_t = 2;
458pub const RLIMIT_STACK: ::__rlimit_resource_t = 3;
459pub const RLIMIT_CORE: ::__rlimit_resource_t = 4;
460pub const RLIMIT_LOCKS: ::__rlimit_resource_t = 10;
461pub const RLIMIT_SIGPENDING: ::__rlimit_resource_t = 11;
462pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12;
463pub const RLIMIT_NICE: ::__rlimit_resource_t = 13;
464pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14;
465pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15;
466pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = 16;
467
468pub const MS_RMT_MASK: ::c_ulong = 0x02800051;
469
476ff2be
SL
470pub const __UT_LINESIZE: usize = 32;
471pub const __UT_NAMESIZE: usize = 32;
472pub const __UT_HOSTSIZE: usize = 256;
473pub const EMPTY: ::c_short = 0;
474pub const RUN_LVL: ::c_short = 1;
475pub const BOOT_TIME: ::c_short = 2;
476pub const NEW_TIME: ::c_short = 3;
477pub const OLD_TIME: ::c_short = 4;
478pub const INIT_PROCESS: ::c_short = 5;
479pub const LOGIN_PROCESS: ::c_short = 6;
480pub const USER_PROCESS: ::c_short = 7;
481pub const DEAD_PROCESS: ::c_short = 8;
482pub const ACCOUNTING: ::c_short = 9;
483
ba9703b0
XL
484// dlfcn.h
485pub const LM_ID_BASE: ::c_long = 0;
486pub const LM_ID_NEWLM: ::c_long = -1;
487
488pub const RTLD_DI_LMID: ::c_int = 1;
489pub const RTLD_DI_LINKMAP: ::c_int = 2;
490pub const RTLD_DI_CONFIGADDR: ::c_int = 3;
491pub const RTLD_DI_SERINFO: ::c_int = 4;
492pub const RTLD_DI_SERINFOSIZE: ::c_int = 5;
493pub const RTLD_DI_ORIGIN: ::c_int = 6;
494pub const RTLD_DI_PROFILENAME: ::c_int = 7;
495pub const RTLD_DI_PROFILEOUT: ::c_int = 8;
496pub const RTLD_DI_TLS_MODID: ::c_int = 9;
497pub const RTLD_DI_TLS_DATA: ::c_int = 10;
498
476ff2be
SL
499pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
500
8bb4bdeb
XL
501pub const SOL_RXRPC: ::c_int = 272;
502pub const SOL_PPPOL2TP: ::c_int = 273;
8bb4bdeb
XL
503pub const SOL_PNPIPE: ::c_int = 275;
504pub const SOL_RDS: ::c_int = 276;
505pub const SOL_IUCV: ::c_int = 277;
506pub const SOL_CAIF: ::c_int = 278;
8bb4bdeb 507pub const SOL_NFC: ::c_int = 280;
69743fb6 508pub const SOL_XDP: ::c_int = 283;
8bb4bdeb
XL
509
510pub const MSG_TRYHARD: ::c_int = 4;
511
476ff2be
SL
512pub const LC_PAPER: ::c_int = 7;
513pub const LC_NAME: ::c_int = 8;
514pub const LC_ADDRESS: ::c_int = 9;
515pub const LC_TELEPHONE: ::c_int = 10;
516pub const LC_MEASUREMENT: ::c_int = 11;
517pub const LC_IDENTIFICATION: ::c_int = 12;
ba9703b0
XL
518pub const LC_PAPER_MASK: ::c_int = 1 << LC_PAPER;
519pub const LC_NAME_MASK: ::c_int = 1 << LC_NAME;
520pub const LC_ADDRESS_MASK: ::c_int = 1 << LC_ADDRESS;
521pub const LC_TELEPHONE_MASK: ::c_int = 1 << LC_TELEPHONE;
522pub const LC_MEASUREMENT_MASK: ::c_int = 1 << LC_MEASUREMENT;
523pub const LC_IDENTIFICATION_MASK: ::c_int = 1 << LC_IDENTIFICATION;
476ff2be 524pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
e74abb32
XL
525 | ::LC_NUMERIC_MASK
526 | ::LC_TIME_MASK
527 | ::LC_COLLATE_MASK
528 | ::LC_MONETARY_MASK
529 | ::LC_MESSAGES_MASK
530 | LC_PAPER_MASK
531 | LC_NAME_MASK
532 | LC_ADDRESS_MASK
533 | LC_TELEPHONE_MASK
534 | LC_MEASUREMENT_MASK
535 | LC_IDENTIFICATION_MASK;
476ff2be 536
8bb4bdeb 537pub const ENOTSUP: ::c_int = EOPNOTSUPP;
416331ca 538
476ff2be 539pub const SOCK_SEQPACKET: ::c_int = 5;
abe05a73
XL
540pub const SOCK_DCCP: ::c_int = 6;
541pub const SOCK_PACKET: ::c_int = 10;
476ff2be 542
476ff2be
SL
543pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
544pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
545pub const TCP_THIN_DUPACK: ::c_int = 17;
546pub const TCP_USER_TIMEOUT: ::c_int = 18;
547pub const TCP_REPAIR: ::c_int = 19;
548pub const TCP_REPAIR_QUEUE: ::c_int = 20;
549pub const TCP_QUEUE_SEQ: ::c_int = 21;
550pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
551pub const TCP_FASTOPEN: ::c_int = 23;
552pub const TCP_TIMESTAMP: ::c_int = 24;
ba9703b0 553pub const TCP_FASTOPEN_CONNECT: ::c_int = 30;
476ff2be 554
abe05a73
XL
555/* DCCP socket options */
556pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
557pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
558pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
559pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
560pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
561pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
562pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
563pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
564pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
565pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
566pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
567pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
568pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
569pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
570pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
571pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
572
573/// maximum number of services provided on the same listening port
574pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
575
8bb4bdeb 576pub const SIGEV_THREAD_ID: ::c_int = 4;
476ff2be 577
476ff2be
SL
578pub const BUFSIZ: ::c_uint = 8192;
579pub const TMP_MAX: ::c_uint = 238328;
580pub const FOPEN_MAX: ::c_uint = 16;
476ff2be 581pub const POSIX_MADV_DONTNEED: ::c_int = 4;
041b39d2
XL
582pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
583pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
584pub const _SC_PII: ::c_int = 53;
585pub const _SC_PII_XTI: ::c_int = 54;
586pub const _SC_PII_SOCKET: ::c_int = 55;
587pub const _SC_PII_INTERNET: ::c_int = 56;
588pub const _SC_PII_OSI: ::c_int = 57;
589pub const _SC_POLL: ::c_int = 58;
590pub const _SC_SELECT: ::c_int = 59;
591pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
592pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
593pub const _SC_PII_OSI_COTS: ::c_int = 63;
594pub const _SC_PII_OSI_CLTS: ::c_int = 64;
595pub const _SC_PII_OSI_M: ::c_int = 65;
596pub const _SC_T_IOV_MAX: ::c_int = 66;
476ff2be 597pub const _SC_2_C_VERSION: ::c_int = 96;
041b39d2
XL
598pub const _SC_CHAR_BIT: ::c_int = 101;
599pub const _SC_CHAR_MAX: ::c_int = 102;
600pub const _SC_CHAR_MIN: ::c_int = 103;
601pub const _SC_INT_MAX: ::c_int = 104;
602pub const _SC_INT_MIN: ::c_int = 105;
603pub const _SC_LONG_BIT: ::c_int = 106;
604pub const _SC_WORD_BIT: ::c_int = 107;
605pub const _SC_MB_LEN_MAX: ::c_int = 108;
606pub const _SC_SSIZE_MAX: ::c_int = 110;
607pub const _SC_SCHAR_MAX: ::c_int = 111;
608pub const _SC_SCHAR_MIN: ::c_int = 112;
609pub const _SC_SHRT_MAX: ::c_int = 113;
610pub const _SC_SHRT_MIN: ::c_int = 114;
611pub const _SC_UCHAR_MAX: ::c_int = 115;
612pub const _SC_UINT_MAX: ::c_int = 116;
613pub const _SC_ULONG_MAX: ::c_int = 117;
614pub const _SC_USHRT_MAX: ::c_int = 118;
615pub const _SC_NL_ARGMAX: ::c_int = 119;
616pub const _SC_NL_LANGMAX: ::c_int = 120;
617pub const _SC_NL_MSGMAX: ::c_int = 121;
618pub const _SC_NL_NMAX: ::c_int = 122;
619pub const _SC_NL_SETMAX: ::c_int = 123;
620pub const _SC_NL_TEXTMAX: ::c_int = 124;
621pub const _SC_BASE: ::c_int = 134;
622pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
623pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
624pub const _SC_DEVICE_IO: ::c_int = 140;
625pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
626pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
627pub const _SC_FD_MGMT: ::c_int = 143;
628pub const _SC_FIFO: ::c_int = 144;
629pub const _SC_PIPE: ::c_int = 145;
630pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
631pub const _SC_FILE_LOCKING: ::c_int = 147;
632pub const _SC_FILE_SYSTEM: ::c_int = 148;
633pub const _SC_MULTI_PROCESS: ::c_int = 150;
634pub const _SC_SINGLE_PROCESS: ::c_int = 151;
635pub const _SC_NETWORKING: ::c_int = 152;
636pub const _SC_REGEX_VERSION: ::c_int = 156;
637pub const _SC_SIGNALS: ::c_int = 158;
638pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
639pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
640pub const _SC_USER_GROUPS: ::c_int = 166;
641pub const _SC_USER_GROUPS_R: ::c_int = 167;
642pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
643pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
644pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
645pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
646pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
647pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
648pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
649pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
650pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
651pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
652pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
653pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
654pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
655pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
656pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
476ff2be 657pub const O_ACCMODE: ::c_int = 3;
476ff2be
SL
658pub const ST_RELATIME: ::c_ulong = 4096;
659pub const NI_MAXHOST: ::socklen_t = 1025;
660
661pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
662pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
663pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
664pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
665pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
666pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
667pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
668pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
669pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
670pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
671pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
672pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
673pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
674pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
675pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
676pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
677pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
678pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
679pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
680pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
681pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
682pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
683pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
684pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
685pub const TMPFS_MAGIC: ::c_long = 0x01021994;
686pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
ba9703b0
XL
687pub const CGROUP_SUPER_MAGIC: ::c_long = 0x27e0eb;
688pub const CGROUP2_SUPER_MAGIC: ::c_long = 0x63677270;
476ff2be 689
476ff2be
SL
690pub const CPU_SETSIZE: ::c_int = 0x400;
691
476ff2be
SL
692pub const PTRACE_TRACEME: ::c_uint = 0;
693pub const PTRACE_PEEKTEXT: ::c_uint = 1;
694pub const PTRACE_PEEKDATA: ::c_uint = 2;
695pub const PTRACE_PEEKUSER: ::c_uint = 3;
696pub const PTRACE_POKETEXT: ::c_uint = 4;
697pub const PTRACE_POKEDATA: ::c_uint = 5;
698pub const PTRACE_POKEUSER: ::c_uint = 6;
699pub const PTRACE_CONT: ::c_uint = 7;
700pub const PTRACE_KILL: ::c_uint = 8;
701pub const PTRACE_SINGLESTEP: ::c_uint = 9;
702pub const PTRACE_ATTACH: ::c_uint = 16;
476ff2be
SL
703pub const PTRACE_SYSCALL: ::c_uint = 24;
704pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
705pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
706pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
707pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
708pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
709pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
710pub const PTRACE_SEIZE: ::c_uint = 0x4206;
711pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
712pub const PTRACE_LISTEN: ::c_uint = 0x4208;
713pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
714
476ff2be
SL
715pub const EPOLLWAKEUP: ::c_int = 0x20000000;
716
476ff2be
SL
717pub const SEEK_DATA: ::c_int = 3;
718pub const SEEK_HOLE: ::c_int = 4;
719
416331ca
XL
720// linux/rtnetlink.h
721pub const TCA_PAD: ::c_ushort = 9;
722pub const TCA_DUMP_INVISIBLE: ::c_ushort = 10;
723pub const TCA_CHAIN: ::c_ushort = 11;
724pub const TCA_HW_OFFLOAD: ::c_ushort = 12;
725
726pub const RTM_DELNETCONF: u16 = 81;
727pub const RTM_NEWSTATS: u16 = 92;
728pub const RTM_GETSTATS: u16 = 94;
729pub const RTM_NEWCACHEREPORT: u16 = 96;
730
731pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000;
732pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000;
733
734pub const RTA_VIA: ::c_ushort = 18;
735pub const RTA_NEWDST: ::c_ushort = 19;
736pub const RTA_PREF: ::c_ushort = 20;
737pub const RTA_ENCAP_TYPE: ::c_ushort = 21;
738pub const RTA_ENCAP: ::c_ushort = 22;
739pub const RTA_EXPIRES: ::c_ushort = 23;
740pub const RTA_PAD: ::c_ushort = 24;
741pub const RTA_UID: ::c_ushort = 25;
742pub const RTA_TTL_PROPAGATE: ::c_ushort = 26;
743
744// linux/neighbor.h
745pub const NTF_EXT_LEARNED: u8 = 0x10;
746pub const NTF_OFFLOADED: u8 = 0x20;
747
748pub const NDA_MASTER: ::c_ushort = 9;
749pub const NDA_LINK_NETNSID: ::c_ushort = 10;
750pub const NDA_SRC_VNI: ::c_ushort = 11;
751
752// linux/if_addr.h
753pub const IFA_FLAGS: ::c_ushort = 8;
754
755pub const IFA_F_MANAGETEMPADDR: u32 = 0x100;
756pub const IFA_F_NOPREFIXROUTE: u32 = 0x200;
757pub const IFA_F_MCAUTOJOIN: u32 = 0x400;
758pub const IFA_F_STABLE_PRIVACY: u32 = 0x800;
759
476ff2be
SL
760pub const MAX_LINKS: ::c_int = 32;
761
2c00a5a8
XL
762pub const GENL_UNS_ADMIN_PERM: ::c_int = 0x10;
763
764pub const GENL_ID_VFS_DQUOT: ::c_int = ::NLMSG_MIN_TYPE + 1;
765pub const GENL_ID_PMCRAID: ::c_int = ::NLMSG_MIN_TYPE + 2;
766
041b39d2
XL
767pub const TIOCM_LE: ::c_int = 0x001;
768pub const TIOCM_DTR: ::c_int = 0x002;
769pub const TIOCM_RTS: ::c_int = 0x004;
041b39d2
XL
770pub const TIOCM_CD: ::c_int = TIOCM_CAR;
771pub const TIOCM_RI: ::c_int = TIOCM_RNG;
772
2c00a5a8
XL
773pub const NF_NETDEV_INGRESS: ::c_int = 0;
774pub const NF_NETDEV_NUMHOOKS: ::c_int = 1;
775
776pub const NFPROTO_INET: ::c_int = 1;
777pub const NFPROTO_NETDEV: ::c_int = 5;
778
ba9703b0
XL
779// linux/keyctl.h
780pub const KEYCTL_DH_COMPUTE: u32 = 23;
781pub const KEYCTL_PKEY_QUERY: u32 = 24;
782pub const KEYCTL_PKEY_ENCRYPT: u32 = 25;
783pub const KEYCTL_PKEY_DECRYPT: u32 = 26;
784pub const KEYCTL_PKEY_SIGN: u32 = 27;
785pub const KEYCTL_PKEY_VERIFY: u32 = 28;
786pub const KEYCTL_RESTRICT_KEYRING: u32 = 29;
787
788pub const KEYCTL_SUPPORTS_ENCRYPT: u32 = 0x01;
789pub const KEYCTL_SUPPORTS_DECRYPT: u32 = 0x02;
790pub const KEYCTL_SUPPORTS_SIGN: u32 = 0x04;
791pub const KEYCTL_SUPPORTS_VERIFY: u32 = 0x08;
792cfg_if! {
793 if #[cfg(not(any(target_arch="mips", target_arch="mips64")))] {
794 pub const KEYCTL_MOVE: u32 = 30;
795 pub const KEYCTL_CAPABILITIES: u32 = 31;
796
797 pub const KEYCTL_CAPS0_CAPABILITIES: u32 = 0x01;
798 pub const KEYCTL_CAPS0_PERSISTENT_KEYRINGS: u32 = 0x02;
799 pub const KEYCTL_CAPS0_DIFFIE_HELLMAN: u32 = 0x04;
800 pub const KEYCTL_CAPS0_PUBLIC_KEY: u32 = 0x08;
801 pub const KEYCTL_CAPS0_BIG_KEY: u32 = 0x10;
802 pub const KEYCTL_CAPS0_INVALIDATE: u32 = 0x20;
803 pub const KEYCTL_CAPS0_RESTRICT_KEYRING: u32 = 0x40;
804 pub const KEYCTL_CAPS0_MOVE: u32 = 0x80;
805 pub const KEYCTL_CAPS1_NS_KEYRING_NAME: u32 = 0x01;
806 pub const KEYCTL_CAPS1_NS_KEY_TAG: u32 = 0x02;
807 }
808}
809
2c00a5a8 810// linux/netfilter/nf_tables.h
416331ca
XL
811pub const NFT_TABLE_MAXNAMELEN: ::c_int = 256;
812pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 256;
813pub const NFT_SET_MAXNAMELEN: ::c_int = 256;
814pub const NFT_OBJ_MAXNAMELEN: ::c_int = 256;
2c00a5a8
XL
815pub const NFT_USERDATA_MAXLEN: ::c_int = 256;
816
817pub const NFT_REG_VERDICT: ::c_int = 0;
818pub const NFT_REG_1: ::c_int = 1;
819pub const NFT_REG_2: ::c_int = 2;
820pub const NFT_REG_3: ::c_int = 3;
821pub const NFT_REG_4: ::c_int = 4;
822pub const __NFT_REG_MAX: ::c_int = 5;
823pub const NFT_REG32_00: ::c_int = 8;
824pub const NFT_REG32_01: ::c_int = 9;
825pub const NFT_REG32_02: ::c_int = 10;
826pub const NFT_REG32_03: ::c_int = 11;
827pub const NFT_REG32_04: ::c_int = 12;
828pub const NFT_REG32_05: ::c_int = 13;
829pub const NFT_REG32_06: ::c_int = 14;
830pub const NFT_REG32_07: ::c_int = 15;
831pub const NFT_REG32_08: ::c_int = 16;
832pub const NFT_REG32_09: ::c_int = 17;
833pub const NFT_REG32_10: ::c_int = 18;
834pub const NFT_REG32_11: ::c_int = 19;
835pub const NFT_REG32_12: ::c_int = 20;
836pub const NFT_REG32_13: ::c_int = 21;
837pub const NFT_REG32_14: ::c_int = 22;
838pub const NFT_REG32_15: ::c_int = 23;
839
840pub const NFT_REG_SIZE: ::c_int = 16;
841pub const NFT_REG32_SIZE: ::c_int = 4;
842
843pub const NFT_CONTINUE: ::c_int = -1;
844pub const NFT_BREAK: ::c_int = -2;
845pub const NFT_JUMP: ::c_int = -3;
846pub const NFT_GOTO: ::c_int = -4;
847pub const NFT_RETURN: ::c_int = -5;
848
849pub const NFT_MSG_NEWTABLE: ::c_int = 0;
850pub const NFT_MSG_GETTABLE: ::c_int = 1;
851pub const NFT_MSG_DELTABLE: ::c_int = 2;
852pub const NFT_MSG_NEWCHAIN: ::c_int = 3;
853pub const NFT_MSG_GETCHAIN: ::c_int = 4;
854pub const NFT_MSG_DELCHAIN: ::c_int = 5;
855pub const NFT_MSG_NEWRULE: ::c_int = 6;
856pub const NFT_MSG_GETRULE: ::c_int = 7;
857pub const NFT_MSG_DELRULE: ::c_int = 8;
858pub const NFT_MSG_NEWSET: ::c_int = 9;
859pub const NFT_MSG_GETSET: ::c_int = 10;
860pub const NFT_MSG_DELSET: ::c_int = 11;
861pub const NFT_MSG_NEWSETELEM: ::c_int = 12;
862pub const NFT_MSG_GETSETELEM: ::c_int = 13;
863pub const NFT_MSG_DELSETELEM: ::c_int = 14;
864pub const NFT_MSG_NEWGEN: ::c_int = 15;
865pub const NFT_MSG_GETGEN: ::c_int = 16;
866pub const NFT_MSG_TRACE: ::c_int = 17;
867cfg_if! {
868 if #[cfg(not(target_arch = "sparc64"))] {
869 pub const NFT_MSG_NEWOBJ: ::c_int = 18;
870 pub const NFT_MSG_GETOBJ: ::c_int = 19;
871 pub const NFT_MSG_DELOBJ: ::c_int = 20;
872 pub const NFT_MSG_GETOBJ_RESET: ::c_int = 21;
2c00a5a8
XL
873 }
874}
416331ca 875pub const NFT_MSG_MAX: ::c_int = 25;
2c00a5a8
XL
876
877pub const NFT_SET_ANONYMOUS: ::c_int = 0x1;
878pub const NFT_SET_CONSTANT: ::c_int = 0x2;
879pub const NFT_SET_INTERVAL: ::c_int = 0x4;
880pub const NFT_SET_MAP: ::c_int = 0x8;
881pub const NFT_SET_TIMEOUT: ::c_int = 0x10;
882pub const NFT_SET_EVAL: ::c_int = 0x20;
883
884pub const NFT_SET_POL_PERFORMANCE: ::c_int = 0;
885pub const NFT_SET_POL_MEMORY: ::c_int = 1;
886
887pub const NFT_SET_ELEM_INTERVAL_END: ::c_int = 0x1;
888
889pub const NFT_DATA_VALUE: ::c_uint = 0;
890pub const NFT_DATA_VERDICT: ::c_uint = 0xffffff00;
891
892pub const NFT_DATA_RESERVED_MASK: ::c_uint = 0xffffff00;
893
894pub const NFT_DATA_VALUE_MAXLEN: ::c_int = 64;
895
896pub const NFT_BYTEORDER_NTOH: ::c_int = 0;
897pub const NFT_BYTEORDER_HTON: ::c_int = 1;
898
899pub const NFT_CMP_EQ: ::c_int = 0;
900pub const NFT_CMP_NEQ: ::c_int = 1;
901pub const NFT_CMP_LT: ::c_int = 2;
902pub const NFT_CMP_LTE: ::c_int = 3;
903pub const NFT_CMP_GT: ::c_int = 4;
904pub const NFT_CMP_GTE: ::c_int = 5;
905
906pub const NFT_RANGE_EQ: ::c_int = 0;
907pub const NFT_RANGE_NEQ: ::c_int = 1;
908
ba9703b0 909pub const NFT_LOOKUP_F_INV: ::c_int = 1 << 0;
2c00a5a8
XL
910
911pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
912pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
913
ba9703b0 914pub const NFT_DYNSET_F_INV: ::c_int = 1 << 0;
2c00a5a8
XL
915
916pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
917pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
918pub const NFT_PAYLOAD_TRANSPORT_HEADER: ::c_int = 2;
919
920pub const NFT_PAYLOAD_CSUM_NONE: ::c_int = 0;
921pub const NFT_PAYLOAD_CSUM_INET: ::c_int = 1;
922
923pub const NFT_META_LEN: ::c_int = 0;
924pub const NFT_META_PROTOCOL: ::c_int = 1;
925pub const NFT_META_PRIORITY: ::c_int = 2;
926pub const NFT_META_MARK: ::c_int = 3;
927pub const NFT_META_IIF: ::c_int = 4;
928pub const NFT_META_OIF: ::c_int = 5;
929pub const NFT_META_IIFNAME: ::c_int = 6;
930pub const NFT_META_OIFNAME: ::c_int = 7;
931pub const NFT_META_IIFTYPE: ::c_int = 8;
932pub const NFT_META_OIFTYPE: ::c_int = 9;
933pub const NFT_META_SKUID: ::c_int = 10;
934pub const NFT_META_SKGID: ::c_int = 11;
935pub const NFT_META_NFTRACE: ::c_int = 12;
936pub const NFT_META_RTCLASSID: ::c_int = 13;
937pub const NFT_META_SECMARK: ::c_int = 14;
938pub const NFT_META_NFPROTO: ::c_int = 15;
939pub const NFT_META_L4PROTO: ::c_int = 16;
940pub const NFT_META_BRI_IIFNAME: ::c_int = 17;
941pub const NFT_META_BRI_OIFNAME: ::c_int = 18;
942pub const NFT_META_PKTTYPE: ::c_int = 19;
943pub const NFT_META_CPU: ::c_int = 20;
944pub const NFT_META_IIFGROUP: ::c_int = 21;
945pub const NFT_META_OIFGROUP: ::c_int = 22;
946pub const NFT_META_CGROUP: ::c_int = 23;
947pub const NFT_META_PRANDOM: ::c_int = 24;
948
949pub const NFT_CT_STATE: ::c_int = 0;
950pub const NFT_CT_DIRECTION: ::c_int = 1;
951pub const NFT_CT_STATUS: ::c_int = 2;
952pub const NFT_CT_MARK: ::c_int = 3;
953pub const NFT_CT_SECMARK: ::c_int = 4;
954pub const NFT_CT_EXPIRATION: ::c_int = 5;
955pub const NFT_CT_HELPER: ::c_int = 6;
956pub const NFT_CT_L3PROTOCOL: ::c_int = 7;
957pub const NFT_CT_SRC: ::c_int = 8;
958pub const NFT_CT_DST: ::c_int = 9;
959pub const NFT_CT_PROTOCOL: ::c_int = 10;
960pub const NFT_CT_PROTO_SRC: ::c_int = 11;
961pub const NFT_CT_PROTO_DST: ::c_int = 12;
962pub const NFT_CT_LABELS: ::c_int = 13;
963pub const NFT_CT_PKTS: ::c_int = 14;
964pub const NFT_CT_BYTES: ::c_int = 15;
965
966pub const NFT_LIMIT_PKTS: ::c_int = 0;
967pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
968
ba9703b0 969pub const NFT_LIMIT_F_INV: ::c_int = 1 << 0;
2c00a5a8
XL
970
971pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
972pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
973pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
974
ba9703b0 975pub const NFT_QUOTA_F_INV: ::c_int = 1 << 0;
2c00a5a8
XL
976
977pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
978pub const NFT_REJECT_TCP_RST: ::c_int = 1;
979pub const NFT_REJECT_ICMPX_UNREACH: ::c_int = 2;
980
981pub const NFT_REJECT_ICMPX_NO_ROUTE: ::c_int = 0;
982pub const NFT_REJECT_ICMPX_PORT_UNREACH: ::c_int = 1;
983pub const NFT_REJECT_ICMPX_HOST_UNREACH: ::c_int = 2;
984pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: ::c_int = 3;
985
986pub const NFT_NAT_SNAT: ::c_int = 0;
987pub const NFT_NAT_DNAT: ::c_int = 1;
988
989pub const NFT_TRACETYPE_UNSPEC: ::c_int = 0;
990pub const NFT_TRACETYPE_POLICY: ::c_int = 1;
991pub const NFT_TRACETYPE_RETURN: ::c_int = 2;
992pub const NFT_TRACETYPE_RULE: ::c_int = 3;
993
994pub const NFT_NG_INCREMENTAL: ::c_int = 0;
995pub const NFT_NG_RANDOM: ::c_int = 1;
996
69743fb6
XL
997pub const M_MXFAST: ::c_int = 1;
998pub const M_NLBLKS: ::c_int = 2;
999pub const M_GRAIN: ::c_int = 3;
1000pub const M_KEEP: ::c_int = 4;
1001pub const M_TRIM_THRESHOLD: ::c_int = -1;
1002pub const M_TOP_PAD: ::c_int = -2;
1003pub const M_MMAP_THRESHOLD: ::c_int = -3;
1004pub const M_MMAP_MAX: ::c_int = -4;
1005pub const M_CHECK_ACTION: ::c_int = -5;
1006pub const M_PERTURB: ::c_int = -6;
1007pub const M_ARENA_TEST: ::c_int = -7;
1008pub const M_ARENA_MAX: ::c_int = -8;
1009
416331ca
XL
1010pub const AT_STATX_SYNC_TYPE: ::c_int = 0x6000;
1011pub const AT_STATX_SYNC_AS_STAT: ::c_int = 0x0000;
1012pub const AT_STATX_FORCE_SYNC: ::c_int = 0x2000;
1013pub const AT_STATX_DONT_SYNC: ::c_int = 0x4000;
1014pub const STATX_TYPE: ::c_uint = 0x0001;
1015pub const STATX_MODE: ::c_uint = 0x0002;
1016pub const STATX_NLINK: ::c_uint = 0x0004;
1017pub const STATX_UID: ::c_uint = 0x0008;
1018pub const STATX_GID: ::c_uint = 0x0010;
1019pub const STATX_ATIME: ::c_uint = 0x0020;
1020pub const STATX_MTIME: ::c_uint = 0x0040;
1021pub const STATX_CTIME: ::c_uint = 0x0080;
1022pub const STATX_INO: ::c_uint = 0x0100;
1023pub const STATX_SIZE: ::c_uint = 0x0200;
1024pub const STATX_BLOCKS: ::c_uint = 0x0400;
1025pub const STATX_BASIC_STATS: ::c_uint = 0x07ff;
1026pub const STATX_BTIME: ::c_uint = 0x0800;
1027pub const STATX_ALL: ::c_uint = 0x0fff;
1028pub const STATX__RESERVED: ::c_int = 0x80000000;
1029pub const STATX_ATTR_COMPRESSED: ::c_int = 0x0004;
1030pub const STATX_ATTR_IMMUTABLE: ::c_int = 0x0010;
1031pub const STATX_ATTR_APPEND: ::c_int = 0x0020;
1032pub const STATX_ATTR_NODUMP: ::c_int = 0x0040;
1033pub const STATX_ATTR_ENCRYPTED: ::c_int = 0x0800;
1034pub const STATX_ATTR_AUTOMOUNT: ::c_int = 0x1000;
abe05a73 1035
ba9703b0
XL
1036// sys/auxv.h
1037pub const AT_NULL: ::c_ulong = 0;
1038pub const AT_IGNORE: ::c_ulong = 1;
1039pub const AT_EXECFD: ::c_ulong = 2;
1040pub const AT_PHDR: ::c_ulong = 3;
1041pub const AT_PHENT: ::c_ulong = 4;
1042pub const AT_PHNUM: ::c_ulong = 5;
1043pub const AT_PAGESZ: ::c_ulong = 6;
1044pub const AT_BASE: ::c_ulong = 7;
1045pub const AT_FLAGS: ::c_ulong = 8;
1046pub const AT_ENTRY: ::c_ulong = 9;
1047pub const AT_NOTELF: ::c_ulong = 10;
1048pub const AT_UID: ::c_ulong = 11;
1049pub const AT_EUID: ::c_ulong = 12;
1050pub const AT_GID: ::c_ulong = 13;
1051pub const AT_EGID: ::c_ulong = 14;
1052pub const AT_PLATFORM: ::c_ulong = 15;
1053pub const AT_HWCAP: ::c_ulong = 16;
1054pub const AT_CLKTCK: ::c_ulong = 17;
1055// AT_* values 18 through 22 are reserved
1056pub const AT_SECURE: ::c_ulong = 23;
1057pub const AT_BASE_PLATFORM: ::c_ulong = 24;
1058pub const AT_RANDOM: ::c_ulong = 25;
1059pub const AT_HWCAP2: ::c_ulong = 26;
1060
1061pub const AT_EXECFN: ::c_ulong = 31;
1062
1063//sys/timex.h
1064pub const ADJ_OFFSET: ::c_uint = 0x0001;
1065pub const ADJ_FREQUENCY: ::c_uint = 0x0002;
1066pub const ADJ_MAXERROR: ::c_uint = 0x0004;
1067pub const ADJ_ESTERROR: ::c_uint = 0x0008;
1068pub const ADJ_STATUS: ::c_uint = 0x0010;
1069pub const ADJ_TIMECONST: ::c_uint = 0x0020;
1070pub const ADJ_TAI: ::c_uint = 0x0080;
1071pub const ADJ_SETOFFSET: ::c_uint = 0x0100;
1072pub const ADJ_MICRO: ::c_uint = 0x1000;
1073pub const ADJ_NANO: ::c_uint = 0x2000;
1074pub const ADJ_TICK: ::c_uint = 0x4000;
1075pub const ADJ_OFFSET_SINGLESHOT: ::c_uint = 0x8001;
1076pub const ADJ_OFFSET_SS_READ: ::c_uint = 0xa001;
1077pub const MOD_OFFSET: ::c_uint = ADJ_OFFSET;
1078pub const MOD_FREQUENCY: ::c_uint = ADJ_FREQUENCY;
1079pub const MOD_MAXERROR: ::c_uint = ADJ_MAXERROR;
1080pub const MOD_ESTERROR: ::c_uint = ADJ_ESTERROR;
1081pub const MOD_STATUS: ::c_uint = ADJ_STATUS;
1082pub const MOD_TIMECONST: ::c_uint = ADJ_TIMECONST;
1083pub const MOD_CLKB: ::c_uint = ADJ_TICK;
1084pub const MOD_CLKA: ::c_uint = ADJ_OFFSET_SINGLESHOT;
1085pub const MOD_TAI: ::c_uint = ADJ_TAI;
1086pub const MOD_MICRO: ::c_uint = ADJ_MICRO;
1087pub const MOD_NANO: ::c_uint = ADJ_NANO;
1088pub const STA_PLL: ::c_int = 0x0001;
1089pub const STA_PPSFREQ: ::c_int = 0x0002;
1090pub const STA_PPSTIME: ::c_int = 0x0004;
1091pub const STA_FLL: ::c_int = 0x0008;
1092pub const STA_INS: ::c_int = 0x0010;
1093pub const STA_DEL: ::c_int = 0x0020;
1094pub const STA_UNSYNC: ::c_int = 0x0040;
1095pub const STA_FREQHOLD: ::c_int = 0x0080;
1096pub const STA_PPSSIGNAL: ::c_int = 0x0100;
1097pub const STA_PPSJITTER: ::c_int = 0x0200;
1098pub const STA_PPSWANDER: ::c_int = 0x0400;
1099pub const STA_PPSERROR: ::c_int = 0x0800;
1100pub const STA_CLOCKERR: ::c_int = 0x1000;
1101pub const STA_NANO: ::c_int = 0x2000;
1102pub const STA_MODE: ::c_int = 0x4000;
1103pub const STA_CLK: ::c_int = 0x8000;
1104pub const STA_RONLY: ::c_int = STA_PPSSIGNAL
1105 | STA_PPSJITTER
1106 | STA_PPSWANDER
1107 | STA_PPSERROR
1108 | STA_CLOCKERR
1109 | STA_NANO
1110 | STA_MODE
1111 | STA_CLK;
1112pub const NTP_API: ::c_int = 4;
1113pub const TIME_OK: ::c_int = 0;
1114pub const TIME_INS: ::c_int = 1;
1115pub const TIME_DEL: ::c_int = 2;
1116pub const TIME_OOP: ::c_int = 3;
1117pub const TIME_WAIT: ::c_int = 4;
1118pub const TIME_ERROR: ::c_int = 5;
1119pub const TIME_BAD: ::c_int = TIME_ERROR;
1120pub const MAXTC: ::c_long = 6;
1121
476ff2be 1122cfg_if! {
416331ca
XL
1123 if #[cfg(any(
1124 target_arch = "arm",
1125 target_arch = "x86",
1126 target_arch = "x86_64",
ba9703b0
XL
1127 target_arch = "s390x",
1128 target_arch = "riscv64"
416331ca 1129 ))] {
476ff2be 1130 pub const PTHREAD_STACK_MIN: ::size_t = 16384;
dfeec247
XL
1131 } else if #[cfg(any(
1132 target_arch = "sparc",
1133 target_arch = "sparc64"
1134 ))] {
8bb4bdeb 1135 pub const PTHREAD_STACK_MIN: ::size_t = 0x6000;
476ff2be
SL
1136 } else {
1137 pub const PTHREAD_STACK_MIN: ::size_t = 131072;
1138 }
1139}
8faf50e0 1140pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3;
476ff2be 1141
ba9703b0
XL
1142pub const REG_STARTEND: ::c_int = 4;
1143
1144pub const REG_EEND: ::c_int = 14;
1145pub const REG_ESIZE: ::c_int = 15;
1146pub const REG_ERPAREN: ::c_int = 16;
1147
e74abb32 1148extern "C" {
ba9703b0
XL
1149 pub fn fgetspent_r(
1150 fp: *mut ::FILE,
1151 spbuf: *mut ::spwd,
1152 buf: *mut ::c_char,
1153 buflen: ::size_t,
1154 spbufp: *mut *mut ::spwd,
1155 ) -> ::c_int;
1156 pub fn sgetspent_r(
1157 s: *const ::c_char,
1158 spbuf: *mut ::spwd,
1159 buf: *mut ::c_char,
1160 buflen: ::size_t,
1161 spbufp: *mut *mut ::spwd,
1162 ) -> ::c_int;
1163 pub fn getspent_r(
1164 spbuf: *mut ::spwd,
1165 buf: *mut ::c_char,
1166 buflen: ::size_t,
1167 spbufp: *mut *mut ::spwd,
1168 ) -> ::c_int;
1169 pub fn qsort_r(
1170 base: *mut ::c_void,
1171 num: ::size_t,
1172 size: ::size_t,
1173 compar: ::Option<
1174 unsafe extern "C" fn(
1175 *const ::c_void,
1176 *const ::c_void,
1177 *mut ::c_void,
1178 ) -> ::c_int,
1179 >,
1180 arg: *mut ::c_void,
1181 );
e74abb32
XL
1182 pub fn sendmmsg(
1183 sockfd: ::c_int,
1184 msgvec: *mut ::mmsghdr,
1185 vlen: ::c_uint,
1186 flags: ::c_int,
1187 ) -> ::c_int;
1188 pub fn recvmmsg(
1189 sockfd: ::c_int,
1190 msgvec: *mut ::mmsghdr,
1191 vlen: ::c_uint,
1192 flags: ::c_int,
1193 timeout: *mut ::timespec,
1194 ) -> ::c_int;
1195
1196 pub fn getrlimit64(
1197 resource: ::__rlimit_resource_t,
1198 rlim: *mut ::rlimit64,
1199 ) -> ::c_int;
1200 pub fn setrlimit64(
1201 resource: ::__rlimit_resource_t,
1202 rlim: *const ::rlimit64,
1203 ) -> ::c_int;
1204 pub fn getrlimit(
1205 resource: ::__rlimit_resource_t,
1206 rlim: *mut ::rlimit,
1207 ) -> ::c_int;
1208 pub fn setrlimit(
1209 resource: ::__rlimit_resource_t,
1210 rlim: *const ::rlimit,
1211 ) -> ::c_int;
1212 pub fn prlimit(
1213 pid: ::pid_t,
1214 resource: ::__rlimit_resource_t,
1215 new_limit: *const ::rlimit,
1216 old_limit: *mut ::rlimit,
1217 ) -> ::c_int;
1218 pub fn prlimit64(
1219 pid: ::pid_t,
1220 resource: ::__rlimit_resource_t,
1221 new_limit: *const ::rlimit64,
1222 old_limit: *mut ::rlimit64,
1223 ) -> ::c_int;
1224 pub fn utmpname(file: *const ::c_char) -> ::c_int;
476ff2be
SL
1225 pub fn utmpxname(file: *const ::c_char) -> ::c_int;
1226 pub fn getutxent() -> *mut utmpx;
1227 pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
1228 pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
1229 pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
1230 pub fn setutxent();
1231 pub fn endutxent();
8bb4bdeb 1232 pub fn getpt() -> ::c_int;
69743fb6 1233 pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int;
e74abb32
XL
1234 pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int;
1235 pub fn statx(
1236 dirfd: ::c_int,
1237 pathname: *const c_char,
1238 flags: ::c_int,
1239 mask: ::c_uint,
1240 statxbuf: *mut statx,
1241 ) -> ::c_int;
416331ca
XL
1242 pub fn getrandom(
1243 buf: *mut ::c_void,
1244 buflen: ::size_t,
1245 flags: ::c_uint,
1246 ) -> ::ssize_t;
ba9703b0
XL
1247
1248 pub fn memmem(
1249 haystack: *const ::c_void,
1250 haystacklen: ::size_t,
1251 needle: *const ::c_void,
1252 needlelen: ::size_t,
1253 ) -> *mut ::c_void;
1254 pub fn getauxval(type_: ::c_ulong) -> ::c_ulong;
1255
1256 pub fn adjtimex(buf: *mut timex) -> ::c_int;
1257 pub fn ntp_adjtime(buf: *mut timex) -> ::c_int;
1258 #[link_name = "ntp_gettimex"]
1259 pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int;
1260 pub fn copy_file_range(
1261 fd_in: ::c_int,
1262 off_in: *mut ::off64_t,
1263 fd_out: ::c_int,
1264 off_out: *mut ::off64_t,
1265 len: ::size_t,
1266 flags: ::c_uint,
1267 ) -> ::ssize_t;
1268 pub fn fanotify_mark(
1269 fd: ::c_int,
1270 flags: ::c_uint,
1271 mask: u64,
1272 dirfd: ::c_int,
1273 path: *const ::c_char,
1274 ) -> ::c_int;
476ff2be
SL
1275}
1276
1277#[link(name = "util")]
e74abb32 1278extern "C" {
476ff2be 1279 pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
e74abb32
XL
1280 pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int;
1281 pub fn glob64(
1282 pattern: *const ::c_char,
1283 flags: ::c_int,
1284 errfunc: ::Option<
1285 extern "C" fn(epath: *const ::c_char, errno: ::c_int) -> ::c_int,
1286 >,
1287 pglob: *mut glob64_t,
1288 ) -> ::c_int;
476ff2be
SL
1289 pub fn globfree64(pglob: *mut glob64_t);
1290 pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
e74abb32
XL
1291 pub fn pthread_attr_getaffinity_np(
1292 attr: *const ::pthread_attr_t,
1293 cpusetsize: ::size_t,
1294 cpuset: *mut ::cpu_set_t,
1295 ) -> ::c_int;
1296 pub fn pthread_attr_setaffinity_np(
1297 attr: *mut ::pthread_attr_t,
1298 cpusetsize: ::size_t,
1299 cpuset: *const ::cpu_set_t,
1300 ) -> ::c_int;
476ff2be 1301 pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
e74abb32
XL
1302 pub fn setpriority(
1303 which: ::__priority_which_t,
1304 who: ::id_t,
1305 prio: ::c_int,
1306 ) -> ::c_int;
1307 pub fn pthread_getaffinity_np(
1308 thread: ::pthread_t,
1309 cpusetsize: ::size_t,
1310 cpuset: *mut ::cpu_set_t,
1311 ) -> ::c_int;
1312 pub fn pthread_setaffinity_np(
1313 thread: ::pthread_t,
1314 cpusetsize: ::size_t,
1315 cpuset: *const ::cpu_set_t,
1316 ) -> ::c_int;
1317 pub fn pthread_rwlockattr_getkind_np(
1318 attr: *const ::pthread_rwlockattr_t,
1319 val: *mut ::c_int,
1320 ) -> ::c_int;
1321 pub fn pthread_rwlockattr_setkind_np(
1322 attr: *mut ::pthread_rwlockattr_t,
1323 val: ::c_int,
1324 ) -> ::c_int;
476ff2be 1325 pub fn sched_getcpu() -> ::c_int;
2c00a5a8
XL
1326 pub fn mallinfo() -> ::mallinfo;
1327 pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t;
e74abb32
XL
1328 pub fn getpwent_r(
1329 pwd: *mut ::passwd,
1330 buf: *mut ::c_char,
1331 buflen: ::size_t,
1332 result: *mut *mut ::passwd,
1333 ) -> ::c_int;
e74abb32
XL
1334 pub fn getgrent_r(
1335 grp: *mut ::group,
1336 buf: *mut ::c_char,
1337 buflen: ::size_t,
1338 result: *mut *mut ::group,
1339 ) -> ::c_int;
1340 pub fn pthread_getname_np(
1341 thread: ::pthread_t,
1342 name: *mut ::c_char,
1343 len: ::size_t,
1344 ) -> ::c_int;
1345 pub fn pthread_setname_np(
1346 thread: ::pthread_t,
1347 name: *const ::c_char,
1348 ) -> ::c_int;
476ff2be
SL
1349}
1350
ba9703b0
XL
1351#[link(name = "dl")]
1352extern "C" {
1353 pub fn dlmopen(
1354 lmid: Lmid_t,
1355 filename: *const ::c_char,
1356 flag: ::c_int,
1357 ) -> *mut ::c_void;
1358 pub fn dlinfo(
1359 handle: *mut ::c_void,
1360 request: ::c_int,
1361 info: *mut ::c_void,
1362 ) -> ::c_int;
1363}
1364
476ff2be
SL
1365cfg_if! {
1366 if #[cfg(any(target_arch = "x86",
1367 target_arch = "arm",
416331ca 1368 target_arch = "mips",
dfeec247
XL
1369 target_arch = "powerpc",
1370 target_arch = "sparc"))] {
476ff2be
SL
1371 mod b32;
1372 pub use self::b32::*;
1373 } else if #[cfg(any(target_arch = "x86_64",
1374 target_arch = "aarch64",
8bb4bdeb 1375 target_arch = "powerpc64",
416331ca
XL
1376 target_arch = "mips64",
1377 target_arch = "s390x",
dfeec247
XL
1378 target_arch = "sparc64",
1379 target_arch = "riscv64"))] {
476ff2be
SL
1380 mod b64;
1381 pub use self::b64::*;
1382 } else {
1383 // Unknown target_arch
1384 }
1385}
532ac7d7
XL
1386
1387cfg_if! {
1388 if #[cfg(libc_align)] {
1389 mod align;
1390 pub use self::align::*;
1391 } else {
1392 mod no_align;
1393 pub use self::no_align::*;
1394 }
1395}