Debian Codegraph @

debian/rust-vendor/rlimit/src/bindings.rs

raw
1 #![allow(clippy::cast_possible_truncation)]
2 #![allow(clippy::unnecessary_cast)]
3
4 #[cfg(any(
5 target_os = "fuchsia",
6 all(
7 any(
8 target_os = "aix",
9 target_os = "emscripten",
10 target_os = "hurd",
11 target_os = "l4re",
12 target_os = "linux",
13 target_os = "nto"
14 ),
15 not(target_env = "newlib")
16 ),
17 all(
18 target_os = "android",
19 target_pointer_width = "32",
20 not(target_env = "newlib")
21 ),
22 all(
23 target_os = "android",
24 target_pointer_width = "64",
25 not(target_env = "newlib")
26 )
27 ))]
28 pub use libc::rlimit64 as rlimit;
29
30 #[cfg(all(
31 any(
32 target_os = "vxworks",
33 all(target_os = "qurt", not(target_vendor = "apple")),
34 all(
35 unix,
36 not(any(target_os = "qurt", target_os = "solid_asp3", target_os = "switch"))
37 )
38 ),
39 not(any(
40 target_os = "fuchsia",
41 all(
42 any(
43 target_os = "aix",
44 target_os = "emscripten",
45 target_os = "hurd",
46 target_os = "l4re",
47 target_os = "linux",
48 target_os = "nto"
49 ),
50 not(target_env = "newlib")
51 ),
52 all(
53 target_os = "android",
54 target_pointer_width = "32",
55 not(target_env = "newlib")
56 ),
57 all(
58 target_os = "android",
59 target_pointer_width = "64",
60 not(target_env = "newlib")
61 )
62 ))
63 ))]
64 pub use libc::rlimit;
65
66 #[cfg(any(
67 all(
68 any(
69 target_os = "aix",
70 target_os = "android",
71 target_os = "emscripten",
72 target_os = "hurd"
73 ),
74 not(target_env = "newlib")
75 ),
76 all(target_env = "uclibc", target_os = "l4re"),
77 all(target_env = "gnu", target_os = "linux"),
78 all(target_os = "linux", any(target_env = "musl", target_env = "ohos")),
79 all(target_env = "uclibc", target_os = "linux")
80 ))]
81 pub use libc::getrlimit64 as getrlimit;
82
83 #[cfg(all(
84 any(
85 all(
86 any(
87 target_os = "aix",
88 target_os = "android",
89 target_os = "cygwin",
90 target_os = "dragonfly",
91 target_os = "emscripten",
92 target_os = "freebsd",
93 target_os = "haiku",
94 target_os = "hurd",
95 target_os = "illumos",
96 target_os = "ios",
97 target_os = "macos",
98 target_os = "netbsd",
99 target_os = "nto",
100 target_os = "openbsd",
101 target_os = "redox",
102 target_os = "solaris",
103 target_os = "tvos",
104 target_os = "visionos",
105 target_os = "watchos"
106 ),
107 not(target_env = "newlib")
108 ),
109 all(
110 unix,
111 target_env = "newlib",
112 not(any(
113 target_os = "fuchsia",
114 target_os = "qurt",
115 target_os = "solid_asp3",
116 target_os = "switch",
117 target_os = "vxworks"
118 ))
119 )
120 ),
121 not(any(
122 all(
123 any(
124 target_os = "aix",
125 target_os = "android",
126 target_os = "emscripten",
127 target_os = "hurd"
128 ),
129 not(target_env = "newlib")
130 ),
131 all(target_env = "uclibc", target_os = "l4re"),
132 all(target_env = "gnu", target_os = "linux"),
133 all(target_os = "linux", any(target_env = "musl", target_env = "ohos")),
134 all(target_env = "uclibc", target_os = "linux")
135 ))
136 ))]
137 pub use libc::getrlimit;
138
139 #[cfg(any(
140 all(
141 any(
142 target_os = "aix",
143 target_os = "android",
144 target_os = "emscripten",
145 target_os = "hurd"
146 ),
147 not(target_env = "newlib")
148 ),
149 all(target_env = "uclibc", target_os = "l4re"),
150 all(target_env = "gnu", target_os = "linux"),
151 all(target_os = "linux", any(target_env = "musl", target_env = "ohos")),
152 all(target_env = "uclibc", target_os = "linux")
153 ))]
154 pub use libc::setrlimit64 as setrlimit;
155
156 #[cfg(all(
157 any(
158 all(
159 any(
160 target_os = "aix",
161 target_os = "android",
162 target_os = "cygwin",
163 target_os = "dragonfly",
164 target_os = "emscripten",
165 target_os = "freebsd",
166 target_os = "haiku",
167 target_os = "hurd",
168 target_os = "illumos",
169 target_os = "ios",
170 target_os = "macos",
171 target_os = "netbsd",
172 target_os = "nto",
173 target_os = "openbsd",
174 target_os = "redox",
175 target_os = "solaris",
176 target_os = "tvos",
177 target_os = "visionos",
178 target_os = "watchos"
179 ),
180 not(target_env = "newlib")
181 ),
182 all(
183 unix,
184 target_env = "newlib",
185 not(any(
186 target_os = "fuchsia",
187 target_os = "qurt",
188 target_os = "solid_asp3",
189 target_os = "switch",
190 target_os = "vxworks"
191 ))
192 )
193 ),
194 not(any(
195 all(
196 any(
197 target_os = "aix",
198 target_os = "android",
199 target_os = "emscripten",
200 target_os = "hurd"
201 ),
202 not(target_env = "newlib")
203 ),
204 all(target_env = "uclibc", target_os = "l4re"),
205 all(target_env = "gnu", target_os = "linux"),
206 all(target_os = "linux", any(target_env = "musl", target_env = "ohos")),
207 all(target_env = "uclibc", target_os = "linux")
208 ))
209 ))]
210 pub use libc::setrlimit;
211
212 #[cfg(any(
213 all(target_os = "android", not(target_env = "newlib")),
214 all(
215 target_os = "linux",
216 any(target_env = "gnu", target_env = "musl", target_env = "ohos")
217 )
218 ))]
219 pub use libc::prlimit64 as prlimit;
220
221 #[cfg(any(
222 target_os = "fuchsia",
223 all(
224 target_arch = "powerpc64",
225 target_os = "aix",
226 not(target_env = "newlib")
227 ),
228 all(
229 any(
230 target_os = "android",
231 target_os = "cygwin",
232 target_os = "dragonfly",
233 target_os = "emscripten",
234 target_os = "freebsd",
235 target_os = "haiku",
236 target_os = "hurd",
237 target_os = "illumos",
238 target_os = "ios",
239 target_os = "macos",
240 target_os = "netbsd",
241 target_os = "nto",
242 target_os = "openbsd",
243 target_os = "redox",
244 target_os = "solaris",
245 target_os = "tvos",
246 target_os = "visionos",
247 target_os = "watchos"
248 ),
249 not(target_env = "newlib")
250 ),
251 all(target_env = "uclibc", target_os = "l4re"),
252 all(
253 target_os = "linux",
254 not(any(
255 target_arch = "mips",
256 target_arch = "mips32r6",
257 target_arch = "mips64",
258 target_arch = "mips64r6",
259 target_arch = "powerpc",
260 target_arch = "powerpc64",
261 target_arch = "sparc",
262 target_arch = "sparc64",
263 target_env = "newlib"
264 ))
265 ),
266 all(
267 target_env = "musl",
268 target_os = "linux",
269 any(
270 target_arch = "mips",
271 target_arch = "mips32r6",
272 target_arch = "mips64",
273 target_arch = "mips64r6"
274 )
275 ),
276 all(
277 target_os = "linux",
278 any(target_arch = "mips64", target_arch = "mips64r6"),
279 any(target_env = "gnu", target_env = "uclibc")
280 ),
281 all(
282 target_os = "linux",
283 any(target_arch = "mips", target_arch = "mips32r6"),
284 any(target_env = "gnu", target_env = "uclibc")
285 ),
286 all(
287 target_os = "linux",
288 any(target_arch = "powerpc", target_arch = "powerpc64"),
289 not(target_env = "newlib")
290 ),
291 all(
292 target_arch = "sparc64",
293 target_os = "linux",
294 not(target_env = "newlib")
295 ),
296 all(target_arch = "sparc", target_os = "linux", not(target_env = "newlib"))
297 ))]
298 pub const RLIM_INFINITY: u64 = libc::RLIM_INFINITY as u64;
299
300 #[cfg(not(any(
301 target_os = "fuchsia",
302 all(
303 target_arch = "powerpc64",
304 target_os = "aix",
305 not(target_env = "newlib")
306 ),
307 all(
308 any(
309 target_os = "android",
310 target_os = "cygwin",
311 target_os = "dragonfly",
312 target_os = "emscripten",
313 target_os = "freebsd",
314 target_os = "haiku",
315 target_os = "hurd",
316 target_os = "illumos",
317 target_os = "ios",
318 target_os = "macos",
319 target_os = "netbsd",
320 target_os = "nto",
321 target_os = "openbsd",
322 target_os = "redox",
323 target_os = "solaris",
324 target_os = "tvos",
325 target_os = "visionos",
326 target_os = "watchos"
327 ),
328 not(target_env = "newlib")
329 ),
330 all(target_env = "uclibc", target_os = "l4re"),
331 all(
332 target_os = "linux",
333 not(any(
334 target_arch = "mips",
335 target_arch = "mips32r6",
336 target_arch = "mips64",
337 target_arch = "mips64r6",
338 target_arch = "powerpc",
339 target_arch = "powerpc64",
340 target_arch = "sparc",
341 target_arch = "sparc64",
342 target_env = "newlib"
343 ))
344 ),
345 all(
346 target_env = "musl",
347 target_os = "linux",
348 any(
349 target_arch = "mips",
350 target_arch = "mips32r6",
351 target_arch = "mips64",
352 target_arch = "mips64r6"
353 )
354 ),
355 all(
356 target_os = "linux",
357 any(target_arch = "mips64", target_arch = "mips64r6"),
358 any(target_env = "gnu", target_env = "uclibc")
359 ),
360 all(
361 target_os = "linux",
362 any(target_arch = "mips", target_arch = "mips32r6"),
363 any(target_env = "gnu", target_env = "uclibc")
364 ),
365 all(
366 target_os = "linux",
367 any(target_arch = "powerpc", target_arch = "powerpc64"),
368 not(target_env = "newlib")
369 ),
370 all(
371 target_arch = "sparc64",
372 target_os = "linux",
373 not(target_env = "newlib")
374 ),
375 all(target_arch = "sparc", target_os = "linux", not(target_env = "newlib"))
376 )))]
377 pub const RLIM_INFINITY: u64 = u64::MAX;
378
379 #[cfg(any(
380 target_os = "fuchsia",
381 all(
382 any(
383 target_os = "aix",
384 target_os = "android",
385 target_os = "cygwin",
386 target_os = "dragonfly",
387 target_os = "emscripten",
388 target_os = "freebsd",
389 target_os = "haiku",
390 target_os = "hurd",
391 target_os = "illumos",
392 target_os = "ios",
393 target_os = "l4re",
394 target_os = "macos",
395 target_os = "netbsd",
396 target_os = "nto",
397 target_os = "redox",
398 target_os = "solaris",
399 target_os = "tvos",
400 target_os = "visionos",
401 target_os = "watchos"
402 ),
403 not(target_env = "newlib")
404 ),
405 all(
406 target_os = "linux",
407 any(target_env = "gnu", target_env = "uclibc"),
408 not(any(
409 target_arch = "mips",
410 target_arch = "mips32r6",
411 target_arch = "mips64",
412 target_arch = "mips64r6",
413 target_arch = "powerpc",
414 target_arch = "powerpc64",
415 target_arch = "sparc",
416 target_arch = "sparc64"
417 ))
418 ),
419 all(
420 target_os = "linux",
421 any(target_env = "musl", target_env = "ohos"),
422 not(any(
423 target_arch = "mips",
424 target_arch = "mips32r6",
425 target_arch = "mips64",
426 target_arch = "mips64r6",
427 target_arch = "powerpc",
428 target_arch = "powerpc64",
429 target_arch = "sparc",
430 target_arch = "sparc64"
431 ))
432 ),
433 all(
434 target_os = "linux",
435 any(
436 target_arch = "mips",
437 target_arch = "mips32r6",
438 target_arch = "mips64",
439 target_arch = "mips64r6"
440 ),
441 any(target_env = "gnu", target_env = "uclibc")
442 ),
443 all(
444 target_env = "musl",
445 target_os = "linux",
446 any(
447 target_arch = "mips",
448 target_arch = "mips32r6",
449 target_arch = "mips64",
450 target_arch = "mips64r6"
451 )
452 ),
453 all(
454 target_env = "gnu",
455 target_os = "linux",
456 any(target_arch = "powerpc", target_arch = "powerpc64")
457 ),
458 all(
459 target_env = "musl",
460 target_os = "linux",
461 any(target_arch = "powerpc", target_arch = "powerpc64")
462 ),
463 all(
464 target_os = "linux",
465 any(target_arch = "sparc", target_arch = "sparc64"),
466 not(target_env = "newlib")
467 )
468 ))]
469 pub const RLIMIT_AS: u8 = libc::RLIMIT_AS as u8;
470
471 #[cfg(not(any(
472 target_os = "fuchsia",
473 all(
474 any(
475 target_os = "aix",
476 target_os = "android",
477 target_os = "cygwin",
478 target_os = "dragonfly",
479 target_os = "emscripten",
480 target_os = "freebsd",
481 target_os = "haiku",
482 target_os = "hurd",
483 target_os = "illumos",
484 target_os = "ios",
485 target_os = "l4re",
486 target_os = "macos",
487 target_os = "netbsd",
488 target_os = "nto",
489 target_os = "redox",
490 target_os = "solaris",
491 target_os = "tvos",
492 target_os = "visionos",
493 target_os = "watchos"
494 ),
495 not(target_env = "newlib")
496 ),
497 all(
498 target_os = "linux",
499 any(target_env = "gnu", target_env = "uclibc"),
500 not(any(
501 target_arch = "mips",
502 target_arch = "mips32r6",
503 target_arch = "mips64",
504 target_arch = "mips64r6",
505 target_arch = "powerpc",
506 target_arch = "powerpc64",
507 target_arch = "sparc",
508 target_arch = "sparc64"
509 ))
510 ),
511 all(
512 target_os = "linux",
513 any(target_env = "musl", target_env = "ohos"),
514 not(any(
515 target_arch = "mips",
516 target_arch = "mips32r6",
517 target_arch = "mips64",
518 target_arch = "mips64r6",
519 target_arch = "powerpc",
520 target_arch = "powerpc64",
521 target_arch = "sparc",
522 target_arch = "sparc64"
523 ))
524 ),
525 all(
526 target_os = "linux",
527 any(
528 target_arch = "mips",
529 target_arch = "mips32r6",
530 target_arch = "mips64",
531 target_arch = "mips64r6"
532 ),
533 any(target_env = "gnu", target_env = "uclibc")
534 ),
535 all(
536 target_env = "musl",
537 target_os = "linux",
538 any(
539 target_arch = "mips",
540 target_arch = "mips32r6",
541 target_arch = "mips64",
542 target_arch = "mips64r6"
543 )
544 ),
545 all(
546 target_env = "gnu",
547 target_os = "linux",
548 any(target_arch = "powerpc", target_arch = "powerpc64")
549 ),
550 all(
551 target_env = "musl",
552 target_os = "linux",
553 any(target_arch = "powerpc", target_arch = "powerpc64")
554 ),
555 all(
556 target_os = "linux",
557 any(target_arch = "sparc", target_arch = "sparc64"),
558 not(target_env = "newlib")
559 )
560 )))]
561 pub const RLIMIT_AS: u8 = u8::MAX;
562
563 #[cfg(any(
564 target_os = "fuchsia",
565 all(
566 any(
567 target_os = "aix",
568 target_os = "android",
569 target_os = "cygwin",
570 target_os = "dragonfly",
571 target_os = "emscripten",
572 target_os = "freebsd",
573 target_os = "haiku",
574 target_os = "hurd",
575 target_os = "illumos",
576 target_os = "ios",
577 target_os = "l4re",
578 target_os = "macos",
579 target_os = "netbsd",
580 target_os = "nto",
581 target_os = "openbsd",
582 target_os = "redox",
583 target_os = "solaris",
584 target_os = "tvos",
585 target_os = "visionos",
586 target_os = "watchos"
587 ),
588 not(target_env = "newlib")
589 ),
590 all(
591 target_os = "linux",
592 any(target_env = "gnu", target_env = "uclibc"),
593 not(any(
594 target_arch = "mips",
595 target_arch = "mips32r6",
596 target_arch = "mips64",
597 target_arch = "mips64r6",
598 target_arch = "powerpc",
599 target_arch = "powerpc64",
600 target_arch = "sparc",
601 target_arch = "sparc64"
602 ))
603 ),
604 all(
605 target_os = "linux",
606 any(target_env = "musl", target_env = "ohos"),
607 not(any(
608 target_arch = "mips",
609 target_arch = "mips32r6",
610 target_arch = "mips64",
611 target_arch = "mips64r6",
612 target_arch = "powerpc",
613 target_arch = "powerpc64",
614 target_arch = "sparc",
615 target_arch = "sparc64"
616 ))
617 ),
618 all(
619 target_os = "linux",
620 any(
621 target_arch = "mips",
622 target_arch = "mips32r6",
623 target_arch = "mips64",
624 target_arch = "mips64r6"
625 ),
626 any(target_env = "gnu", target_env = "uclibc")
627 ),
628 all(
629 target_env = "musl",
630 target_os = "linux",
631 any(
632 target_arch = "mips",
633 target_arch = "mips32r6",
634 target_arch = "mips64",
635 target_arch = "mips64r6"
636 )
637 ),
638 all(
639 target_env = "gnu",
640 target_os = "linux",
641 any(target_arch = "powerpc", target_arch = "powerpc64")
642 ),
643 all(
644 target_env = "musl",
645 target_os = "linux",
646 any(target_arch = "powerpc", target_arch = "powerpc64")
647 ),
648 all(
649 target_os = "linux",
650 any(target_arch = "sparc", target_arch = "sparc64"),
651 not(target_env = "newlib")
652 )
653 ))]
654 pub const RLIMIT_CORE: u8 = libc::RLIMIT_CORE as u8;
655
656 #[cfg(not(any(
657 target_os = "fuchsia",
658 all(
659 any(
660 target_os = "aix",
661 target_os = "android",
662 target_os = "cygwin",
663 target_os = "dragonfly",
664 target_os = "emscripten",
665 target_os = "freebsd",
666 target_os = "haiku",
667 target_os = "hurd",
668 target_os = "illumos",
669 target_os = "ios",
670 target_os = "l4re",
671 target_os = "macos",
672 target_os = "netbsd",
673 target_os = "nto",
674 target_os = "openbsd",
675 target_os = "redox",
676 target_os = "solaris",
677 target_os = "tvos",
678 target_os = "visionos",
679 target_os = "watchos"
680 ),
681 not(target_env = "newlib")
682 ),
683 all(
684 target_os = "linux",
685 any(target_env = "gnu", target_env = "uclibc"),
686 not(any(
687 target_arch = "mips",
688 target_arch = "mips32r6",
689 target_arch = "mips64",
690 target_arch = "mips64r6",
691 target_arch = "powerpc",
692 target_arch = "powerpc64",
693 target_arch = "sparc",
694 target_arch = "sparc64"
695 ))
696 ),
697 all(
698 target_os = "linux",
699 any(target_env = "musl", target_env = "ohos"),
700 not(any(
701 target_arch = "mips",
702 target_arch = "mips32r6",
703 target_arch = "mips64",
704 target_arch = "mips64r6",
705 target_arch = "powerpc",
706 target_arch = "powerpc64",
707 target_arch = "sparc",
708 target_arch = "sparc64"
709 ))
710 ),
711 all(
712 target_os = "linux",
713 any(
714 target_arch = "mips",
715 target_arch = "mips32r6",
716 target_arch = "mips64",
717 target_arch = "mips64r6"
718 ),
719 any(target_env = "gnu", target_env = "uclibc")
720 ),
721 all(
722 target_env = "musl",
723 target_os = "linux",
724 any(
725 target_arch = "mips",
726 target_arch = "mips32r6",
727 target_arch = "mips64",
728 target_arch = "mips64r6"
729 )
730 ),
731 all(
732 target_env = "gnu",
733 target_os = "linux",
734 any(target_arch = "powerpc", target_arch = "powerpc64")
735 ),
736 all(
737 target_env = "musl",
738 target_os = "linux",
739 any(target_arch = "powerpc", target_arch = "powerpc64")
740 ),
741 all(
742 target_os = "linux",
743 any(target_arch = "sparc", target_arch = "sparc64"),
744 not(target_env = "newlib")
745 )
746 )))]
747 pub const RLIMIT_CORE: u8 = u8::MAX;
748
749 #[cfg(any(
750 target_os = "fuchsia",
751 all(
752 any(
753 target_os = "aix",
754 target_os = "android",
755 target_os = "cygwin",
756 target_os = "dragonfly",
757 target_os = "emscripten",
758 target_os = "freebsd",
759 target_os = "haiku",
760 target_os = "hurd",
761 target_os = "illumos",
762 target_os = "ios",
763 target_os = "l4re",
764 target_os = "macos",
765 target_os = "netbsd",
766 target_os = "nto",
767 target_os = "openbsd",
768 target_os = "redox",
769 target_os = "solaris",
770 target_os = "tvos",
771 target_os = "visionos",
772 target_os = "watchos"
773 ),
774 not(target_env = "newlib")
775 ),
776 all(
777 target_os = "linux",
778 any(target_env = "gnu", target_env = "uclibc"),
779 not(any(
780 target_arch = "mips",
781 target_arch = "mips32r6",
782 target_arch = "mips64",
783 target_arch = "mips64r6",
784 target_arch = "powerpc",
785 target_arch = "powerpc64",
786 target_arch = "sparc",
787 target_arch = "sparc64"
788 ))
789 ),
790 all(
791 target_os = "linux",
792 any(target_env = "musl", target_env = "ohos"),
793 not(any(
794 target_arch = "mips",
795 target_arch = "mips32r6",
796 target_arch = "mips64",
797 target_arch = "mips64r6",
798 target_arch = "powerpc",
799 target_arch = "powerpc64",
800 target_arch = "sparc",
801 target_arch = "sparc64"
802 ))
803 ),
804 all(
805 target_os = "linux",
806 any(
807 target_arch = "mips",
808 target_arch = "mips32r6",
809 target_arch = "mips64",
810 target_arch = "mips64r6"
811 ),
812 any(target_env = "gnu", target_env = "uclibc")
813 ),
814 all(
815 target_env = "musl",
816 target_os = "linux",
817 any(
818 target_arch = "mips",
819 target_arch = "mips32r6",
820 target_arch = "mips64",
821 target_arch = "mips64r6"
822 )
823 ),
824 all(
825 target_env = "gnu",
826 target_os = "linux",
827 any(target_arch = "powerpc", target_arch = "powerpc64")
828 ),
829 all(
830 target_env = "musl",
831 target_os = "linux",
832 any(target_arch = "powerpc", target_arch = "powerpc64")
833 ),
834 all(
835 target_os = "linux",
836 any(target_arch = "sparc", target_arch = "sparc64"),
837 not(target_env = "newlib")
838 )
839 ))]
840 pub const RLIMIT_CPU: u8 = libc::RLIMIT_CPU as u8;
841
842 #[cfg(not(any(
843 target_os = "fuchsia",
844 all(
845 any(
846 target_os = "aix",
847 target_os = "android",
848 target_os = "cygwin",
849 target_os = "dragonfly",
850 target_os = "emscripten",
851 target_os = "freebsd",
852 target_os = "haiku",
853 target_os = "hurd",
854 target_os = "illumos",
855 target_os = "ios",
856 target_os = "l4re",
857 target_os = "macos",
858 target_os = "netbsd",
859 target_os = "nto",
860 target_os = "openbsd",
861 target_os = "redox",
862 target_os = "solaris",
863 target_os = "tvos",
864 target_os = "visionos",
865 target_os = "watchos"
866 ),
867 not(target_env = "newlib")
868 ),
869 all(
870 target_os = "linux",
871 any(target_env = "gnu", target_env = "uclibc"),
872 not(any(
873 target_arch = "mips",
874 target_arch = "mips32r6",
875 target_arch = "mips64",
876 target_arch = "mips64r6",
877 target_arch = "powerpc",
878 target_arch = "powerpc64",
879 target_arch = "sparc",
880 target_arch = "sparc64"
881 ))
882 ),
883 all(
884 target_os = "linux",
885 any(target_env = "musl", target_env = "ohos"),
886 not(any(
887 target_arch = "mips",
888 target_arch = "mips32r6",
889 target_arch = "mips64",
890 target_arch = "mips64r6",
891 target_arch = "powerpc",
892 target_arch = "powerpc64",
893 target_arch = "sparc",
894 target_arch = "sparc64"
895 ))
896 ),
897 all(
898 target_os = "linux",
899 any(
900 target_arch = "mips",
901 target_arch = "mips32r6",
902 target_arch = "mips64",
903 target_arch = "mips64r6"
904 ),
905 any(target_env = "gnu", target_env = "uclibc")
906 ),
907 all(
908 target_env = "musl",
909 target_os = "linux",
910 any(
911 target_arch = "mips",
912 target_arch = "mips32r6",
913 target_arch = "mips64",
914 target_arch = "mips64r6"
915 )
916 ),
917 all(
918 target_env = "gnu",
919 target_os = "linux",
920 any(target_arch = "powerpc", target_arch = "powerpc64")
921 ),
922 all(
923 target_env = "musl",
924 target_os = "linux",
925 any(target_arch = "powerpc", target_arch = "powerpc64")
926 ),
927 all(
928 target_os = "linux",
929 any(target_arch = "sparc", target_arch = "sparc64"),
930 not(target_env = "newlib")
931 )
932 )))]
933 pub const RLIMIT_CPU: u8 = u8::MAX;
934
935 #[cfg(any(
936 target_os = "fuchsia",
937 all(
938 any(
939 target_os = "aix",
940 target_os = "android",
941 target_os = "cygwin",
942 target_os = "dragonfly",
943 target_os = "emscripten",
944 target_os = "freebsd",
945 target_os = "haiku",
946 target_os = "hurd",
947 target_os = "illumos",
948 target_os = "ios",
949 target_os = "l4re",
950 target_os = "macos",
951 target_os = "netbsd",
952 target_os = "nto",
953 target_os = "openbsd",
954 target_os = "redox",
955 target_os = "solaris",
956 target_os = "tvos",
957 target_os = "visionos",
958 target_os = "watchos"
959 ),
960 not(target_env = "newlib")
961 ),
962 all(
963 target_os = "linux",
964 any(target_env = "gnu", target_env = "uclibc"),
965 not(any(
966 target_arch = "mips",
967 target_arch = "mips32r6",
968 target_arch = "mips64",
969 target_arch = "mips64r6",
970 target_arch = "powerpc",
971 target_arch = "powerpc64",
972 target_arch = "sparc",
973 target_arch = "sparc64"
974 ))
975 ),
976 all(
977 target_os = "linux",
978 any(target_env = "musl", target_env = "ohos"),
979 not(any(
980 target_arch = "mips",
981 target_arch = "mips32r6",
982 target_arch = "mips64",
983 target_arch = "mips64r6",
984 target_arch = "powerpc",
985 target_arch = "powerpc64",
986 target_arch = "sparc",
987 target_arch = "sparc64"
988 ))
989 ),
990 all(
991 target_os = "linux",
992 any(
993 target_arch = "mips",
994 target_arch = "mips32r6",
995 target_arch = "mips64",
996 target_arch = "mips64r6"
997 ),
998 any(target_env = "gnu", target_env = "uclibc")
999 ),
1000 all(
1001 target_env = "musl",
1002 target_os = "linux",
1003 any(
1004 target_arch = "mips",
1005 target_arch = "mips32r6",
1006 target_arch = "mips64",
1007 target_arch = "mips64r6"
1008 )
1009 ),
1010 all(
1011 target_env = "gnu",
1012 target_os = "linux",
1013 any(target_arch = "powerpc", target_arch = "powerpc64")
1014 ),
1015 all(
1016 target_env = "musl",
1017 target_os = "linux",
1018 any(target_arch = "powerpc", target_arch = "powerpc64")
1019 ),
1020 all(
1021 target_os = "linux",
1022 any(target_arch = "sparc", target_arch = "sparc64"),
1023 not(target_env = "newlib")
1024 )
1025 ))]
1026 pub const RLIMIT_DATA: u8 = libc::RLIMIT_DATA as u8;
1027
1028 #[cfg(not(any(
1029 target_os = "fuchsia",
1030 all(
1031 any(
1032 target_os = "aix",
1033 target_os = "android",
1034 target_os = "cygwin",
1035 target_os = "dragonfly",
1036 target_os = "emscripten",
1037 target_os = "freebsd",
1038 target_os = "haiku",
1039 target_os = "hurd",
1040 target_os = "illumos",
1041 target_os = "ios",
1042 target_os = "l4re",
1043 target_os = "macos",
1044 target_os = "netbsd",
1045 target_os = "nto",
1046 target_os = "openbsd",
1047 target_os = "redox",
1048 target_os = "solaris",
1049 target_os = "tvos",
1050 target_os = "visionos",
1051 target_os = "watchos"
1052 ),
1053 not(target_env = "newlib")
1054 ),
1055 all(
1056 target_os = "linux",
1057 any(target_env = "gnu", target_env = "uclibc"),
1058 not(any(
1059 target_arch = "mips",
1060 target_arch = "mips32r6",
1061 target_arch = "mips64",
1062 target_arch = "mips64r6",
1063 target_arch = "powerpc",
1064 target_arch = "powerpc64",
1065 target_arch = "sparc",
1066 target_arch = "sparc64"
1067 ))
1068 ),
1069 all(
1070 target_os = "linux",
1071 any(target_env = "musl", target_env = "ohos"),
1072 not(any(
1073 target_arch = "mips",
1074 target_arch = "mips32r6",
1075 target_arch = "mips64",
1076 target_arch = "mips64r6",
1077 target_arch = "powerpc",
1078 target_arch = "powerpc64",
1079 target_arch = "sparc",
1080 target_arch = "sparc64"
1081 ))
1082 ),
1083 all(
1084 target_os = "linux",
1085 any(
1086 target_arch = "mips",
1087 target_arch = "mips32r6",
1088 target_arch = "mips64",
1089 target_arch = "mips64r6"
1090 ),
1091 any(target_env = "gnu", target_env = "uclibc")
1092 ),
1093 all(
1094 target_env = "musl",
1095 target_os = "linux",
1096 any(
1097 target_arch = "mips",
1098 target_arch = "mips32r6",
1099 target_arch = "mips64",
1100 target_arch = "mips64r6"
1101 )
1102 ),
1103 all(
1104 target_env = "gnu",
1105 target_os = "linux",
1106 any(target_arch = "powerpc", target_arch = "powerpc64")
1107 ),
1108 all(
1109 target_env = "musl",
1110 target_os = "linux",
1111 any(target_arch = "powerpc", target_arch = "powerpc64")
1112 ),
1113 all(
1114 target_os = "linux",
1115 any(target_arch = "sparc", target_arch = "sparc64"),
1116 not(target_env = "newlib")
1117 )
1118 )))]
1119 pub const RLIMIT_DATA: u8 = u8::MAX;
1120
1121 #[cfg(any(
1122 target_os = "fuchsia",
1123 all(
1124 any(
1125 target_os = "aix",
1126 target_os = "android",
1127 target_os = "cygwin",
1128 target_os = "dragonfly",
1129 target_os = "emscripten",
1130 target_os = "freebsd",
1131 target_os = "haiku",
1132 target_os = "hurd",
1133 target_os = "illumos",
1134 target_os = "ios",
1135 target_os = "l4re",
1136 target_os = "macos",
1137 target_os = "netbsd",
1138 target_os = "nto",
1139 target_os = "openbsd",
1140 target_os = "redox",
1141 target_os = "solaris",
1142 target_os = "tvos",
1143 target_os = "visionos",
1144 target_os = "watchos"
1145 ),
1146 not(target_env = "newlib")
1147 ),
1148 all(
1149 target_os = "linux",
1150 any(target_env = "gnu", target_env = "uclibc"),
1151 not(any(
1152 target_arch = "mips",
1153 target_arch = "mips32r6",
1154 target_arch = "mips64",
1155 target_arch = "mips64r6",
1156 target_arch = "powerpc",
1157 target_arch = "powerpc64",
1158 target_arch = "sparc",
1159 target_arch = "sparc64"
1160 ))
1161 ),
1162 all(
1163 target_os = "linux",
1164 any(target_env = "musl", target_env = "ohos"),
1165 not(any(
1166 target_arch = "mips",
1167 target_arch = "mips32r6",
1168 target_arch = "mips64",
1169 target_arch = "mips64r6",
1170 target_arch = "powerpc",
1171 target_arch = "powerpc64",
1172 target_arch = "sparc",
1173 target_arch = "sparc64"
1174 ))
1175 ),
1176 all(
1177 target_os = "linux",
1178 any(
1179 target_arch = "mips",
1180 target_arch = "mips32r6",
1181 target_arch = "mips64",
1182 target_arch = "mips64r6"
1183 ),
1184 any(target_env = "gnu", target_env = "uclibc")
1185 ),
1186 all(
1187 target_env = "musl",
1188 target_os = "linux",
1189 any(
1190 target_arch = "mips",
1191 target_arch = "mips32r6",
1192 target_arch = "mips64",
1193 target_arch = "mips64r6"
1194 )
1195 ),
1196 all(
1197 target_env = "gnu",
1198 target_os = "linux",
1199 any(target_arch = "powerpc", target_arch = "powerpc64")
1200 ),
1201 all(
1202 target_env = "musl",
1203 target_os = "linux",
1204 any(target_arch = "powerpc", target_arch = "powerpc64")
1205 ),
1206 all(
1207 target_os = "linux",
1208 any(target_arch = "sparc", target_arch = "sparc64"),
1209 not(target_env = "newlib")
1210 )
1211 ))]
1212 pub const RLIMIT_FSIZE: u8 = libc::RLIMIT_FSIZE as u8;
1213
1214 #[cfg(not(any(
1215 target_os = "fuchsia",
1216 all(
1217 any(
1218 target_os = "aix",
1219 target_os = "android",
1220 target_os = "cygwin",
1221 target_os = "dragonfly",
1222 target_os = "emscripten",
1223 target_os = "freebsd",
1224 target_os = "haiku",
1225 target_os = "hurd",
1226 target_os = "illumos",
1227 target_os = "ios",
1228 target_os = "l4re",
1229 target_os = "macos",
1230 target_os = "netbsd",
1231 target_os = "nto",
1232 target_os = "openbsd",
1233 target_os = "redox",
1234 target_os = "solaris",
1235 target_os = "tvos",
1236 target_os = "visionos",
1237 target_os = "watchos"
1238 ),
1239 not(target_env = "newlib")
1240 ),
1241 all(
1242 target_os = "linux",
1243 any(target_env = "gnu", target_env = "uclibc"),
1244 not(any(
1245 target_arch = "mips",
1246 target_arch = "mips32r6",
1247 target_arch = "mips64",
1248 target_arch = "mips64r6",
1249 target_arch = "powerpc",
1250 target_arch = "powerpc64",
1251 target_arch = "sparc",
1252 target_arch = "sparc64"
1253 ))
1254 ),
1255 all(
1256 target_os = "linux",
1257 any(target_env = "musl", target_env = "ohos"),
1258 not(any(
1259 target_arch = "mips",
1260 target_arch = "mips32r6",
1261 target_arch = "mips64",
1262 target_arch = "mips64r6",
1263 target_arch = "powerpc",
1264 target_arch = "powerpc64",
1265 target_arch = "sparc",
1266 target_arch = "sparc64"
1267 ))
1268 ),
1269 all(
1270 target_os = "linux",
1271 any(
1272 target_arch = "mips",
1273 target_arch = "mips32r6",
1274 target_arch = "mips64",
1275 target_arch = "mips64r6"
1276 ),
1277 any(target_env = "gnu", target_env = "uclibc")
1278 ),
1279 all(
1280 target_env = "musl",
1281 target_os = "linux",
1282 any(
1283 target_arch = "mips",
1284 target_arch = "mips32r6",
1285 target_arch = "mips64",
1286 target_arch = "mips64r6"
1287 )
1288 ),
1289 all(
1290 target_env = "gnu",
1291 target_os = "linux",
1292 any(target_arch = "powerpc", target_arch = "powerpc64")
1293 ),
1294 all(
1295 target_env = "musl",
1296 target_os = "linux",
1297 any(target_arch = "powerpc", target_arch = "powerpc64")
1298 ),
1299 all(
1300 target_os = "linux",
1301 any(target_arch = "sparc", target_arch = "sparc64"),
1302 not(target_env = "newlib")
1303 )
1304 )))]
1305 pub const RLIMIT_FSIZE: u8 = u8::MAX;
1306
1307 #[cfg(all(target_os = "freebsd", not(target_env = "newlib")))]
1308 pub const RLIMIT_KQUEUES: u8 = libc::RLIMIT_KQUEUES as u8;
1309
1310 #[cfg(not(all(target_os = "freebsd", not(target_env = "newlib"))))]
1311 pub const RLIMIT_KQUEUES: u8 = u8::MAX;
1312
1313 #[cfg(any(
1314 target_os = "fuchsia",
1315 all(
1316 any(
1317 target_os = "android",
1318 target_os = "emscripten",
1319 target_os = "l4re",
1320 target_os = "redox"
1321 ),
1322 not(target_env = "newlib")
1323 ),
1324 all(
1325 target_os = "linux",
1326 any(target_env = "gnu", target_env = "uclibc"),
1327 not(any(
1328 target_arch = "mips",
1329 target_arch = "mips32r6",
1330 target_arch = "mips64",
1331 target_arch = "mips64r6",
1332 target_arch = "powerpc",
1333 target_arch = "powerpc64",
1334 target_arch = "sparc",
1335 target_arch = "sparc64"
1336 ))
1337 ),
1338 all(
1339 target_os = "linux",
1340 any(target_env = "musl", target_env = "ohos"),
1341 not(any(
1342 target_arch = "mips",
1343 target_arch = "mips32r6",
1344 target_arch = "mips64",
1345 target_arch = "mips64r6",
1346 target_arch = "powerpc",
1347 target_arch = "powerpc64",
1348 target_arch = "sparc",
1349 target_arch = "sparc64"
1350 ))
1351 ),
1352 all(
1353 target_os = "linux",
1354 any(
1355 target_arch = "mips",
1356 target_arch = "mips32r6",
1357 target_arch = "mips64",
1358 target_arch = "mips64r6"
1359 ),
1360 any(target_env = "gnu", target_env = "uclibc")
1361 ),
1362 all(
1363 target_env = "musl",
1364 target_os = "linux",
1365 any(
1366 target_arch = "mips",
1367 target_arch = "mips32r6",
1368 target_arch = "mips64",
1369 target_arch = "mips64r6"
1370 )
1371 ),
1372 all(
1373 target_env = "gnu",
1374 target_os = "linux",
1375 any(target_arch = "powerpc", target_arch = "powerpc64")
1376 ),
1377 all(
1378 target_env = "musl",
1379 target_os = "linux",
1380 any(target_arch = "powerpc", target_arch = "powerpc64")
1381 ),
1382 all(
1383 target_os = "linux",
1384 any(target_arch = "sparc", target_arch = "sparc64"),
1385 not(target_env = "newlib")
1386 )
1387 ))]
1388 pub const RLIMIT_LOCKS: u8 = libc::RLIMIT_LOCKS as u8;
1389
1390 #[cfg(not(any(
1391 target_os = "fuchsia",
1392 all(
1393 any(
1394 target_os = "android",
1395 target_os = "emscripten",
1396 target_os = "l4re",
1397 target_os = "redox"
1398 ),
1399 not(target_env = "newlib")
1400 ),
1401 all(
1402 target_os = "linux",
1403 any(target_env = "gnu", target_env = "uclibc"),
1404 not(any(
1405 target_arch = "mips",
1406 target_arch = "mips32r6",
1407 target_arch = "mips64",
1408 target_arch = "mips64r6",
1409 target_arch = "powerpc",
1410 target_arch = "powerpc64",
1411 target_arch = "sparc",
1412 target_arch = "sparc64"
1413 ))
1414 ),
1415 all(
1416 target_os = "linux",
1417 any(target_env = "musl", target_env = "ohos"),
1418 not(any(
1419 target_arch = "mips",
1420 target_arch = "mips32r6",
1421 target_arch = "mips64",
1422 target_arch = "mips64r6",
1423 target_arch = "powerpc",
1424 target_arch = "powerpc64",
1425 target_arch = "sparc",
1426 target_arch = "sparc64"
1427 ))
1428 ),
1429 all(
1430 target_os = "linux",
1431 any(
1432 target_arch = "mips",
1433 target_arch = "mips32r6",
1434 target_arch = "mips64",
1435 target_arch = "mips64r6"
1436 ),
1437 any(target_env = "gnu", target_env = "uclibc")
1438 ),
1439 all(
1440 target_env = "musl",
1441 target_os = "linux",
1442 any(
1443 target_arch = "mips",
1444 target_arch = "mips32r6",
1445 target_arch = "mips64",
1446 target_arch = "mips64r6"
1447 )
1448 ),
1449 all(
1450 target_env = "gnu",
1451 target_os = "linux",
1452 any(target_arch = "powerpc", target_arch = "powerpc64")
1453 ),
1454 all(
1455 target_env = "musl",
1456 target_os = "linux",
1457 any(target_arch = "powerpc", target_arch = "powerpc64")
1458 ),
1459 all(
1460 target_os = "linux",
1461 any(target_arch = "sparc", target_arch = "sparc64"),
1462 not(target_env = "newlib")
1463 )
1464 )))]
1465 pub const RLIMIT_LOCKS: u8 = u8::MAX;
1466
1467 #[cfg(any(
1468 target_os = "fuchsia",
1469 all(
1470 any(
1471 target_os = "android",
1472 target_os = "dragonfly",
1473 target_os = "emscripten",
1474 target_os = "freebsd",
1475 target_os = "hurd",
1476 target_os = "ios",
1477 target_os = "l4re",
1478 target_os = "macos",
1479 target_os = "netbsd",
1480 target_os = "nto",
1481 target_os = "openbsd",
1482 target_os = "redox",
1483 target_os = "tvos",
1484 target_os = "visionos",
1485 target_os = "watchos"
1486 ),
1487 not(target_env = "newlib")
1488 ),
1489 all(
1490 target_os = "linux",
1491 any(target_env = "gnu", target_env = "uclibc"),
1492 not(any(
1493 target_arch = "mips",
1494 target_arch = "mips32r6",
1495 target_arch = "mips64",
1496 target_arch = "mips64r6",
1497 target_arch = "powerpc",
1498 target_arch = "powerpc64",
1499 target_arch = "sparc",
1500 target_arch = "sparc64"
1501 ))
1502 ),
1503 all(
1504 target_os = "linux",
1505 any(target_env = "musl", target_env = "ohos"),
1506 not(any(
1507 target_arch = "mips",
1508 target_arch = "mips32r6",
1509 target_arch = "mips64",
1510 target_arch = "mips64r6",
1511 target_arch = "powerpc",
1512 target_arch = "powerpc64",
1513 target_arch = "sparc",
1514 target_arch = "sparc64"
1515 ))
1516 ),
1517 all(
1518 target_os = "linux",
1519 any(
1520 target_arch = "mips",
1521 target_arch = "mips32r6",
1522 target_arch = "mips64",
1523 target_arch = "mips64r6"
1524 ),
1525 any(target_env = "gnu", target_env = "uclibc")
1526 ),
1527 all(
1528 target_env = "musl",
1529 target_os = "linux",
1530 any(
1531 target_arch = "mips",
1532 target_arch = "mips32r6",
1533 target_arch = "mips64",
1534 target_arch = "mips64r6"
1535 )
1536 ),
1537 all(
1538 target_env = "gnu",
1539 target_os = "linux",
1540 any(target_arch = "powerpc", target_arch = "powerpc64")
1541 ),
1542 all(
1543 target_env = "musl",
1544 target_os = "linux",
1545 any(target_arch = "powerpc", target_arch = "powerpc64")
1546 ),
1547 all(
1548 target_os = "linux",
1549 any(target_arch = "sparc", target_arch = "sparc64"),
1550 not(target_env = "newlib")
1551 )
1552 ))]
1553 pub const RLIMIT_MEMLOCK: u8 = libc::RLIMIT_MEMLOCK as u8;
1554
1555 #[cfg(not(any(
1556 target_os = "fuchsia",
1557 all(
1558 any(
1559 target_os = "android",
1560 target_os = "dragonfly",
1561 target_os = "emscripten",
1562 target_os = "freebsd",
1563 target_os = "hurd",
1564 target_os = "ios",
1565 target_os = "l4re",
1566 target_os = "macos",
1567 target_os = "netbsd",
1568 target_os = "nto",
1569 target_os = "openbsd",
1570 target_os = "redox",
1571 target_os = "tvos",
1572 target_os = "visionos",
1573 target_os = "watchos"
1574 ),
1575 not(target_env = "newlib")
1576 ),
1577 all(
1578 target_os = "linux",
1579 any(target_env = "gnu", target_env = "uclibc"),
1580 not(any(
1581 target_arch = "mips",
1582 target_arch = "mips32r6",
1583 target_arch = "mips64",
1584 target_arch = "mips64r6",
1585 target_arch = "powerpc",
1586 target_arch = "powerpc64",
1587 target_arch = "sparc",
1588 target_arch = "sparc64"
1589 ))
1590 ),
1591 all(
1592 target_os = "linux",
1593 any(target_env = "musl", target_env = "ohos"),
1594 not(any(
1595 target_arch = "mips",
1596 target_arch = "mips32r6",
1597 target_arch = "mips64",
1598 target_arch = "mips64r6",
1599 target_arch = "powerpc",
1600 target_arch = "powerpc64",
1601 target_arch = "sparc",
1602 target_arch = "sparc64"
1603 ))
1604 ),
1605 all(
1606 target_os = "linux",
1607 any(
1608 target_arch = "mips",
1609 target_arch = "mips32r6",
1610 target_arch = "mips64",
1611 target_arch = "mips64r6"
1612 ),
1613 any(target_env = "gnu", target_env = "uclibc")
1614 ),
1615 all(
1616 target_env = "musl",
1617 target_os = "linux",
1618 any(
1619 target_arch = "mips",
1620 target_arch = "mips32r6",
1621 target_arch = "mips64",
1622 target_arch = "mips64r6"
1623 )
1624 ),
1625 all(
1626 target_env = "gnu",
1627 target_os = "linux",
1628 any(target_arch = "powerpc", target_arch = "powerpc64")
1629 ),
1630 all(
1631 target_env = "musl",
1632 target_os = "linux",
1633 any(target_arch = "powerpc", target_arch = "powerpc64")
1634 ),
1635 all(
1636 target_os = "linux",
1637 any(target_arch = "sparc", target_arch = "sparc64"),
1638 not(target_env = "newlib")
1639 )
1640 )))]
1641 pub const RLIMIT_MEMLOCK: u8 = u8::MAX;
1642
1643 #[cfg(any(
1644 target_os = "fuchsia",
1645 all(
1646 any(
1647 target_os = "android",
1648 target_os = "emscripten",
1649 target_os = "l4re",
1650 target_os = "redox"
1651 ),
1652 not(target_env = "newlib")
1653 ),
1654 all(
1655 target_os = "linux",
1656 any(target_env = "gnu", target_env = "uclibc"),
1657 not(any(
1658 target_arch = "mips",
1659 target_arch = "mips32r6",
1660 target_arch = "mips64",
1661 target_arch = "mips64r6",
1662 target_arch = "powerpc",
1663 target_arch = "powerpc64",
1664 target_arch = "sparc",
1665 target_arch = "sparc64"
1666 ))
1667 ),
1668 all(
1669 target_os = "linux",
1670 any(target_env = "musl", target_env = "ohos"),
1671 not(any(
1672 target_arch = "mips",
1673 target_arch = "mips32r6",
1674 target_arch = "mips64",
1675 target_arch = "mips64r6",
1676 target_arch = "powerpc",
1677 target_arch = "powerpc64",
1678 target_arch = "sparc",
1679 target_arch = "sparc64"
1680 ))
1681 ),
1682 all(
1683 target_os = "linux",
1684 any(
1685 target_arch = "mips",
1686 target_arch = "mips32r6",
1687 target_arch = "mips64",
1688 target_arch = "mips64r6"
1689 ),
1690 any(target_env = "gnu", target_env = "uclibc")
1691 ),
1692 all(
1693 target_env = "musl",
1694 target_os = "linux",
1695 any(
1696 target_arch = "mips",
1697 target_arch = "mips32r6",
1698 target_arch = "mips64",
1699 target_arch = "mips64r6"
1700 )
1701 ),
1702 all(
1703 target_env = "gnu",
1704 target_os = "linux",
1705 any(target_arch = "powerpc", target_arch = "powerpc64")
1706 ),
1707 all(
1708 target_env = "musl",
1709 target_os = "linux",
1710 any(target_arch = "powerpc", target_arch = "powerpc64")
1711 ),
1712 all(
1713 target_os = "linux",
1714 any(target_arch = "sparc", target_arch = "sparc64"),
1715 not(target_env = "newlib")
1716 )
1717 ))]
1718 pub const RLIMIT_MSGQUEUE: u8 = libc::RLIMIT_MSGQUEUE as u8;
1719
1720 #[cfg(not(any(
1721 target_os = "fuchsia",
1722 all(
1723 any(
1724 target_os = "android",
1725 target_os = "emscripten",
1726 target_os = "l4re",
1727 target_os = "redox"
1728 ),
1729 not(target_env = "newlib")
1730 ),
1731 all(
1732 target_os = "linux",
1733 any(target_env = "gnu", target_env = "uclibc"),
1734 not(any(
1735 target_arch = "mips",
1736 target_arch = "mips32r6",
1737 target_arch = "mips64",
1738 target_arch = "mips64r6",
1739 target_arch = "powerpc",
1740 target_arch = "powerpc64",
1741 target_arch = "sparc",
1742 target_arch = "sparc64"
1743 ))
1744 ),
1745 all(
1746 target_os = "linux",
1747 any(target_env = "musl", target_env = "ohos"),
1748 not(any(
1749 target_arch = "mips",
1750 target_arch = "mips32r6",
1751 target_arch = "mips64",
1752 target_arch = "mips64r6",
1753 target_arch = "powerpc",
1754 target_arch = "powerpc64",
1755 target_arch = "sparc",
1756 target_arch = "sparc64"
1757 ))
1758 ),
1759 all(
1760 target_os = "linux",
1761 any(
1762 target_arch = "mips",
1763 target_arch = "mips32r6",
1764 target_arch = "mips64",
1765 target_arch = "mips64r6"
1766 ),
1767 any(target_env = "gnu", target_env = "uclibc")
1768 ),
1769 all(
1770 target_env = "musl",
1771 target_os = "linux",
1772 any(
1773 target_arch = "mips",
1774 target_arch = "mips32r6",
1775 target_arch = "mips64",
1776 target_arch = "mips64r6"
1777 )
1778 ),
1779 all(
1780 target_env = "gnu",
1781 target_os = "linux",
1782 any(target_arch = "powerpc", target_arch = "powerpc64")
1783 ),
1784 all(
1785 target_env = "musl",
1786 target_os = "linux",
1787 any(target_arch = "powerpc", target_arch = "powerpc64")
1788 ),
1789 all(
1790 target_os = "linux",
1791 any(target_arch = "sparc", target_arch = "sparc64"),
1792 not(target_env = "newlib")
1793 )
1794 )))]
1795 pub const RLIMIT_MSGQUEUE: u8 = u8::MAX;
1796
1797 #[cfg(any(
1798 target_os = "fuchsia",
1799 all(
1800 any(
1801 target_os = "android",
1802 target_os = "emscripten",
1803 target_os = "l4re",
1804 target_os = "redox"
1805 ),
1806 not(target_env = "newlib")
1807 ),
1808 all(
1809 target_os = "linux",
1810 any(target_env = "gnu", target_env = "uclibc"),
1811 not(any(
1812 target_arch = "mips",
1813 target_arch = "mips32r6",
1814 target_arch = "mips64",
1815 target_arch = "mips64r6",
1816 target_arch = "powerpc",
1817 target_arch = "powerpc64",
1818 target_arch = "sparc",
1819 target_arch = "sparc64"
1820 ))
1821 ),
1822 all(
1823 target_os = "linux",
1824 any(target_env = "musl", target_env = "ohos"),
1825 not(any(
1826 target_arch = "mips",
1827 target_arch = "mips32r6",
1828 target_arch = "mips64",
1829 target_arch = "mips64r6",
1830 target_arch = "powerpc",
1831 target_arch = "powerpc64",
1832 target_arch = "sparc",
1833 target_arch = "sparc64"
1834 ))
1835 ),
1836 all(
1837 target_os = "linux",
1838 any(
1839 target_arch = "mips",
1840 target_arch = "mips32r6",
1841 target_arch = "mips64",
1842 target_arch = "mips64r6"
1843 ),
1844 any(target_env = "gnu", target_env = "uclibc")
1845 ),
1846 all(
1847 target_env = "musl",
1848 target_os = "linux",
1849 any(
1850 target_arch = "mips",
1851 target_arch = "mips32r6",
1852 target_arch = "mips64",
1853 target_arch = "mips64r6"
1854 )
1855 ),
1856 all(
1857 target_env = "gnu",
1858 target_os = "linux",
1859 any(target_arch = "powerpc", target_arch = "powerpc64")
1860 ),
1861 all(
1862 target_env = "musl",
1863 target_os = "linux",
1864 any(target_arch = "powerpc", target_arch = "powerpc64")
1865 ),
1866 all(
1867 target_os = "linux",
1868 any(target_arch = "sparc", target_arch = "sparc64"),
1869 not(target_env = "newlib")
1870 )
1871 ))]
1872 pub const RLIMIT_NICE: u8 = libc::RLIMIT_NICE as u8;
1873
1874 #[cfg(not(any(
1875 target_os = "fuchsia",
1876 all(
1877 any(
1878 target_os = "android",
1879 target_os = "emscripten",
1880 target_os = "l4re",
1881 target_os = "redox"
1882 ),
1883 not(target_env = "newlib")
1884 ),
1885 all(
1886 target_os = "linux",
1887 any(target_env = "gnu", target_env = "uclibc"),
1888 not(any(
1889 target_arch = "mips",
1890 target_arch = "mips32r6",
1891 target_arch = "mips64",
1892 target_arch = "mips64r6",
1893 target_arch = "powerpc",
1894 target_arch = "powerpc64",
1895 target_arch = "sparc",
1896 target_arch = "sparc64"
1897 ))
1898 ),
1899 all(
1900 target_os = "linux",
1901 any(target_env = "musl", target_env = "ohos"),
1902 not(any(
1903 target_arch = "mips",
1904 target_arch = "mips32r6",
1905 target_arch = "mips64",
1906 target_arch = "mips64r6",
1907 target_arch = "powerpc",
1908 target_arch = "powerpc64",
1909 target_arch = "sparc",
1910 target_arch = "sparc64"
1911 ))
1912 ),
1913 all(
1914 target_os = "linux",
1915 any(
1916 target_arch = "mips",
1917 target_arch = "mips32r6",
1918 target_arch = "mips64",
1919 target_arch = "mips64r6"
1920 ),
1921 any(target_env = "gnu", target_env = "uclibc")
1922 ),
1923 all(
1924 target_env = "musl",
1925 target_os = "linux",
1926 any(
1927 target_arch = "mips",
1928 target_arch = "mips32r6",
1929 target_arch = "mips64",
1930 target_arch = "mips64r6"
1931 )
1932 ),
1933 all(
1934 target_env = "gnu",
1935 target_os = "linux",
1936 any(target_arch = "powerpc", target_arch = "powerpc64")
1937 ),
1938 all(
1939 target_env = "musl",
1940 target_os = "linux",
1941 any(target_arch = "powerpc", target_arch = "powerpc64")
1942 ),
1943 all(
1944 target_os = "linux",
1945 any(target_arch = "sparc", target_arch = "sparc64"),
1946 not(target_env = "newlib")
1947 )
1948 )))]
1949 pub const RLIMIT_NICE: u8 = u8::MAX;
1950
1951 #[cfg(any(
1952 target_os = "fuchsia",
1953 all(
1954 any(
1955 target_os = "aix",
1956 target_os = "android",
1957 target_os = "cygwin",
1958 target_os = "dragonfly",
1959 target_os = "emscripten",
1960 target_os = "freebsd",
1961 target_os = "haiku",
1962 target_os = "hurd",
1963 target_os = "illumos",
1964 target_os = "ios",
1965 target_os = "l4re",
1966 target_os = "macos",
1967 target_os = "netbsd",
1968 target_os = "nto",
1969 target_os = "openbsd",
1970 target_os = "redox",
1971 target_os = "solaris",
1972 target_os = "tvos",
1973 target_os = "visionos",
1974 target_os = "watchos"
1975 ),
1976 not(target_env = "newlib")
1977 ),
1978 all(
1979 target_os = "linux",
1980 any(target_env = "gnu", target_env = "uclibc"),
1981 not(any(
1982 target_arch = "mips",
1983 target_arch = "mips32r6",
1984 target_arch = "mips64",
1985 target_arch = "mips64r6",
1986 target_arch = "powerpc",
1987 target_arch = "powerpc64",
1988 target_arch = "sparc",
1989 target_arch = "sparc64"
1990 ))
1991 ),
1992 all(
1993 target_os = "linux",
1994 any(target_env = "musl", target_env = "ohos"),
1995 not(any(
1996 target_arch = "mips",
1997 target_arch = "mips32r6",
1998 target_arch = "mips64",
1999 target_arch = "mips64r6",
2000 target_arch = "powerpc",
2001 target_arch = "powerpc64",
2002 target_arch = "sparc",
2003 target_arch = "sparc64"
2004 ))
2005 ),
2006 all(
2007 target_os = "linux",
2008 any(
2009 target_arch = "mips",
2010 target_arch = "mips32r6",
2011 target_arch = "mips64",
2012 target_arch = "mips64r6"
2013 ),
2014 any(target_env = "gnu", target_env = "uclibc")
2015 ),
2016 all(
2017 target_env = "musl",
2018 target_os = "linux",
2019 any(
2020 target_arch = "mips",
2021 target_arch = "mips32r6",
2022 target_arch = "mips64",
2023 target_arch = "mips64r6"
2024 )
2025 ),
2026 all(
2027 target_env = "gnu",
2028 target_os = "linux",
2029 any(target_arch = "powerpc", target_arch = "powerpc64")
2030 ),
2031 all(
2032 target_env = "musl",
2033 target_os = "linux",
2034 any(target_arch = "powerpc", target_arch = "powerpc64")
2035 ),
2036 all(
2037 target_os = "linux",
2038 any(target_arch = "sparc", target_arch = "sparc64"),
2039 not(target_env = "newlib")
2040 )
2041 ))]
2042 pub const RLIMIT_NOFILE: u8 = libc::RLIMIT_NOFILE as u8;
2043
2044 #[cfg(not(any(
2045 target_os = "fuchsia",
2046 all(
2047 any(
2048 target_os = "aix",
2049 target_os = "android",
2050 target_os = "cygwin",
2051 target_os = "dragonfly",
2052 target_os = "emscripten",
2053 target_os = "freebsd",
2054 target_os = "haiku",
2055 target_os = "hurd",
2056 target_os = "illumos",
2057 target_os = "ios",
2058 target_os = "l4re",
2059 target_os = "macos",
2060 target_os = "netbsd",
2061 target_os = "nto",
2062 target_os = "openbsd",
2063 target_os = "redox",
2064 target_os = "solaris",
2065 target_os = "tvos",
2066 target_os = "visionos",
2067 target_os = "watchos"
2068 ),
2069 not(target_env = "newlib")
2070 ),
2071 all(
2072 target_os = "linux",
2073 any(target_env = "gnu", target_env = "uclibc"),
2074 not(any(
2075 target_arch = "mips",
2076 target_arch = "mips32r6",
2077 target_arch = "mips64",
2078 target_arch = "mips64r6",
2079 target_arch = "powerpc",
2080 target_arch = "powerpc64",
2081 target_arch = "sparc",
2082 target_arch = "sparc64"
2083 ))
2084 ),
2085 all(
2086 target_os = "linux",
2087 any(target_env = "musl", target_env = "ohos"),
2088 not(any(
2089 target_arch = "mips",
2090 target_arch = "mips32r6",
2091 target_arch = "mips64",
2092 target_arch = "mips64r6",
2093 target_arch = "powerpc",
2094 target_arch = "powerpc64",
2095 target_arch = "sparc",
2096 target_arch = "sparc64"
2097 ))
2098 ),
2099 all(
2100 target_os = "linux",
2101 any(
2102 target_arch = "mips",
2103 target_arch = "mips32r6",
2104 target_arch = "mips64",
2105 target_arch = "mips64r6"
2106 ),
2107 any(target_env = "gnu", target_env = "uclibc")
2108 ),
2109 all(
2110 target_env = "musl",
2111 target_os = "linux",
2112 any(
2113 target_arch = "mips",
2114 target_arch = "mips32r6",
2115 target_arch = "mips64",
2116 target_arch = "mips64r6"
2117 )
2118 ),
2119 all(
2120 target_env = "gnu",
2121 target_os = "linux",
2122 any(target_arch = "powerpc", target_arch = "powerpc64")
2123 ),
2124 all(
2125 target_env = "musl",
2126 target_os = "linux",
2127 any(target_arch = "powerpc", target_arch = "powerpc64")
2128 ),
2129 all(
2130 target_os = "linux",
2131 any(target_arch = "sparc", target_arch = "sparc64"),
2132 not(target_env = "newlib")
2133 )
2134 )))]
2135 pub const RLIMIT_NOFILE: u8 = u8::MAX;
2136
2137 #[cfg(all(target_os = "haiku", not(target_env = "newlib")))]
2138 pub const RLIMIT_NOVMON: u8 = libc::RLIMIT_NOVMON as u8;
2139
2140 #[cfg(not(all(target_os = "haiku", not(target_env = "newlib"))))]
2141 pub const RLIMIT_NOVMON: u8 = u8::MAX;
2142
2143 #[cfg(any(
2144 target_os = "fuchsia",
2145 all(
2146 any(
2147 target_os = "aix",
2148 target_os = "android",
2149 target_os = "dragonfly",
2150 target_os = "emscripten",
2151 target_os = "freebsd",
2152 target_os = "hurd",
2153 target_os = "ios",
2154 target_os = "l4re",
2155 target_os = "macos",
2156 target_os = "netbsd",
2157 target_os = "nto",
2158 target_os = "openbsd",
2159 target_os = "redox",
2160 target_os = "tvos",
2161 target_os = "visionos",
2162 target_os = "watchos"
2163 ),
2164 not(target_env = "newlib")
2165 ),
2166 all(
2167 target_os = "linux",
2168 any(target_env = "gnu", target_env = "uclibc"),
2169 not(any(
2170 target_arch = "mips",
2171 target_arch = "mips32r6",
2172 target_arch = "mips64",
2173 target_arch = "mips64r6",
2174 target_arch = "powerpc",
2175 target_arch = "powerpc64",
2176 target_arch = "sparc",
2177 target_arch = "sparc64"
2178 ))
2179 ),
2180 all(
2181 target_os = "linux",
2182 any(target_env = "musl", target_env = "ohos"),
2183 not(any(
2184 target_arch = "mips",
2185 target_arch = "mips32r6",
2186 target_arch = "mips64",
2187 target_arch = "mips64r6",
2188 target_arch = "powerpc",
2189 target_arch = "powerpc64",
2190 target_arch = "sparc",
2191 target_arch = "sparc64"
2192 ))
2193 ),
2194 all(
2195 target_os = "linux",
2196 any(
2197 target_arch = "mips",
2198 target_arch = "mips32r6",
2199 target_arch = "mips64",
2200 target_arch = "mips64r6"
2201 ),
2202 any(target_env = "gnu", target_env = "uclibc")
2203 ),
2204 all(
2205 target_env = "musl",
2206 target_os = "linux",
2207 any(
2208 target_arch = "mips",
2209 target_arch = "mips32r6",
2210 target_arch = "mips64",
2211 target_arch = "mips64r6"
2212 )
2213 ),
2214 all(
2215 target_env = "gnu",
2216 target_os = "linux",
2217 any(target_arch = "powerpc", target_arch = "powerpc64")
2218 ),
2219 all(
2220 target_env = "musl",
2221 target_os = "linux",
2222 any(target_arch = "powerpc", target_arch = "powerpc64")
2223 ),
2224 all(
2225 target_os = "linux",
2226 any(target_arch = "sparc", target_arch = "sparc64"),
2227 not(target_env = "newlib")
2228 )
2229 ))]
2230 pub const RLIMIT_NPROC: u8 = libc::RLIMIT_NPROC as u8;
2231
2232 #[cfg(not(any(
2233 target_os = "fuchsia",
2234 all(
2235 any(
2236 target_os = "aix",
2237 target_os = "android",
2238 target_os = "dragonfly",
2239 target_os = "emscripten",
2240 target_os = "freebsd",
2241 target_os = "hurd",
2242 target_os = "ios",
2243 target_os = "l4re",
2244 target_os = "macos",
2245 target_os = "netbsd",
2246 target_os = "nto",
2247 target_os = "openbsd",
2248 target_os = "redox",
2249 target_os = "tvos",
2250 target_os = "visionos",
2251 target_os = "watchos"
2252 ),
2253 not(target_env = "newlib")
2254 ),
2255 all(
2256 target_os = "linux",
2257 any(target_env = "gnu", target_env = "uclibc"),
2258 not(any(
2259 target_arch = "mips",
2260 target_arch = "mips32r6",
2261 target_arch = "mips64",
2262 target_arch = "mips64r6",
2263 target_arch = "powerpc",
2264 target_arch = "powerpc64",
2265 target_arch = "sparc",
2266 target_arch = "sparc64"
2267 ))
2268 ),
2269 all(
2270 target_os = "linux",
2271 any(target_env = "musl", target_env = "ohos"),
2272 not(any(
2273 target_arch = "mips",
2274 target_arch = "mips32r6",
2275 target_arch = "mips64",
2276 target_arch = "mips64r6",
2277 target_arch = "powerpc",
2278 target_arch = "powerpc64",
2279 target_arch = "sparc",
2280 target_arch = "sparc64"
2281 ))
2282 ),
2283 all(
2284 target_os = "linux",
2285 any(
2286 target_arch = "mips",
2287 target_arch = "mips32r6",
2288 target_arch = "mips64",
2289 target_arch = "mips64r6"
2290 ),
2291 any(target_env = "gnu", target_env = "uclibc")
2292 ),
2293 all(
2294 target_env = "musl",
2295 target_os = "linux",
2296 any(
2297 target_arch = "mips",
2298 target_arch = "mips32r6",
2299 target_arch = "mips64",
2300 target_arch = "mips64r6"
2301 )
2302 ),
2303 all(
2304 target_env = "gnu",
2305 target_os = "linux",
2306 any(target_arch = "powerpc", target_arch = "powerpc64")
2307 ),
2308 all(
2309 target_env = "musl",
2310 target_os = "linux",
2311 any(target_arch = "powerpc", target_arch = "powerpc64")
2312 ),
2313 all(
2314 target_os = "linux",
2315 any(target_arch = "sparc", target_arch = "sparc64"),
2316 not(target_env = "newlib")
2317 )
2318 )))]
2319 pub const RLIMIT_NPROC: u8 = u8::MAX;
2320
2321 #[cfg(all(target_os = "freebsd", not(target_env = "newlib")))]
2322 pub const RLIMIT_NPTS: u8 = libc::RLIMIT_NPTS as u8;
2323
2324 #[cfg(not(all(target_os = "freebsd", not(target_env = "newlib"))))]
2325 pub const RLIMIT_NPTS: u8 = u8::MAX;
2326
2327 #[cfg(all(target_os = "netbsd", not(target_env = "newlib")))]
2328 pub const RLIMIT_NTHR: u8 = libc::RLIMIT_NTHR as u8;
2329
2330 #[cfg(not(all(target_os = "netbsd", not(target_env = "newlib"))))]
2331 pub const RLIMIT_NTHR: u8 = u8::MAX;
2332
2333 #[cfg(all(target_os = "dragonfly", not(target_env = "newlib")))]
2334 pub const RLIMIT_POSIXLOCKS: u8 = libc::RLIMIT_POSIXLOCKS as u8;
2335
2336 #[cfg(not(all(target_os = "dragonfly", not(target_env = "newlib"))))]
2337 pub const RLIMIT_POSIXLOCKS: u8 = u8::MAX;
2338
2339 #[cfg(any(
2340 target_os = "fuchsia",
2341 all(
2342 any(
2343 target_os = "aix",
2344 target_os = "android",
2345 target_os = "dragonfly",
2346 target_os = "emscripten",
2347 target_os = "freebsd",
2348 target_os = "hurd",
2349 target_os = "ios",
2350 target_os = "l4re",
2351 target_os = "macos",
2352 target_os = "netbsd",
2353 target_os = "nto",
2354 target_os = "openbsd",
2355 target_os = "redox",
2356 target_os = "tvos",
2357 target_os = "visionos",
2358 target_os = "watchos"
2359 ),
2360 not(target_env = "newlib")
2361 ),
2362 all(
2363 target_os = "linux",
2364 any(target_env = "gnu", target_env = "uclibc"),
2365 not(any(
2366 target_arch = "mips",
2367 target_arch = "mips32r6",
2368 target_arch = "mips64",
2369 target_arch = "mips64r6",
2370 target_arch = "powerpc",
2371 target_arch = "powerpc64",
2372 target_arch = "sparc",
2373 target_arch = "sparc64"
2374 ))
2375 ),
2376 all(
2377 target_os = "linux",
2378 any(target_env = "musl", target_env = "ohos"),
2379 not(any(
2380 target_arch = "mips",
2381 target_arch = "mips32r6",
2382 target_arch = "mips64",
2383 target_arch = "mips64r6",
2384 target_arch = "powerpc",
2385 target_arch = "powerpc64",
2386 target_arch = "sparc",
2387 target_arch = "sparc64"
2388 ))
2389 ),
2390 all(
2391 target_os = "linux",
2392 any(
2393 target_arch = "mips",
2394 target_arch = "mips32r6",
2395 target_arch = "mips64",
2396 target_arch = "mips64r6"
2397 ),
2398 any(target_env = "gnu", target_env = "uclibc")
2399 ),
2400 all(
2401 target_env = "musl",
2402 target_os = "linux",
2403 any(
2404 target_arch = "mips",
2405 target_arch = "mips32r6",
2406 target_arch = "mips64",
2407 target_arch = "mips64r6"
2408 )
2409 ),
2410 all(
2411 target_env = "gnu",
2412 target_os = "linux",
2413 any(target_arch = "powerpc", target_arch = "powerpc64")
2414 ),
2415 all(
2416 target_env = "musl",
2417 target_os = "linux",
2418 any(target_arch = "powerpc", target_arch = "powerpc64")
2419 ),
2420 all(
2421 target_os = "linux",
2422 any(target_arch = "sparc", target_arch = "sparc64"),
2423 not(target_env = "newlib")
2424 )
2425 ))]
2426 pub const RLIMIT_RSS: u8 = libc::RLIMIT_RSS as u8;
2427
2428 #[cfg(not(any(
2429 target_os = "fuchsia",
2430 all(
2431 any(
2432 target_os = "aix",
2433 target_os = "android",
2434 target_os = "dragonfly",
2435 target_os = "emscripten",
2436 target_os = "freebsd",
2437 target_os = "hurd",
2438 target_os = "ios",
2439 target_os = "l4re",
2440 target_os = "macos",
2441 target_os = "netbsd",
2442 target_os = "nto",
2443 target_os = "openbsd",
2444 target_os = "redox",
2445 target_os = "tvos",
2446 target_os = "visionos",
2447 target_os = "watchos"
2448 ),
2449 not(target_env = "newlib")
2450 ),
2451 all(
2452 target_os = "linux",
2453 any(target_env = "gnu", target_env = "uclibc"),
2454 not(any(
2455 target_arch = "mips",
2456 target_arch = "mips32r6",
2457 target_arch = "mips64",
2458 target_arch = "mips64r6",
2459 target_arch = "powerpc",
2460 target_arch = "powerpc64",
2461 target_arch = "sparc",
2462 target_arch = "sparc64"
2463 ))
2464 ),
2465 all(
2466 target_os = "linux",
2467 any(target_env = "musl", target_env = "ohos"),
2468 not(any(
2469 target_arch = "mips",
2470 target_arch = "mips32r6",
2471 target_arch = "mips64",
2472 target_arch = "mips64r6",
2473 target_arch = "powerpc",
2474 target_arch = "powerpc64",
2475 target_arch = "sparc",
2476 target_arch = "sparc64"
2477 ))
2478 ),
2479 all(
2480 target_os = "linux",
2481 any(
2482 target_arch = "mips",
2483 target_arch = "mips32r6",
2484 target_arch = "mips64",
2485 target_arch = "mips64r6"
2486 ),
2487 any(target_env = "gnu", target_env = "uclibc")
2488 ),
2489 all(
2490 target_env = "musl",
2491 target_os = "linux",
2492 any(
2493 target_arch = "mips",
2494 target_arch = "mips32r6",
2495 target_arch = "mips64",
2496 target_arch = "mips64r6"
2497 )
2498 ),
2499 all(
2500 target_env = "gnu",
2501 target_os = "linux",
2502 any(target_arch = "powerpc", target_arch = "powerpc64")
2503 ),
2504 all(
2505 target_env = "musl",
2506 target_os = "linux",
2507 any(target_arch = "powerpc", target_arch = "powerpc64")
2508 ),
2509 all(
2510 target_os = "linux",
2511 any(target_arch = "sparc", target_arch = "sparc64"),
2512 not(target_env = "newlib")
2513 )
2514 )))]
2515 pub const RLIMIT_RSS: u8 = u8::MAX;
2516
2517 #[cfg(any(
2518 target_os = "fuchsia",
2519 all(
2520 any(
2521 target_os = "android",
2522 target_os = "emscripten",
2523 target_os = "l4re",
2524 target_os = "redox"
2525 ),
2526 not(target_env = "newlib")
2527 ),
2528 all(
2529 target_os = "linux",
2530 any(target_env = "gnu", target_env = "uclibc"),
2531 not(any(
2532 target_arch = "mips",
2533 target_arch = "mips32r6",
2534 target_arch = "mips64",
2535 target_arch = "mips64r6",
2536 target_arch = "powerpc",
2537 target_arch = "powerpc64",
2538 target_arch = "sparc",
2539 target_arch = "sparc64"
2540 ))
2541 ),
2542 all(
2543 target_os = "linux",
2544 any(target_env = "musl", target_env = "ohos"),
2545 not(any(
2546 target_arch = "mips",
2547 target_arch = "mips32r6",
2548 target_arch = "mips64",
2549 target_arch = "mips64r6",
2550 target_arch = "powerpc",
2551 target_arch = "powerpc64",
2552 target_arch = "sparc",
2553 target_arch = "sparc64"
2554 ))
2555 ),
2556 all(
2557 target_os = "linux",
2558 any(
2559 target_arch = "mips",
2560 target_arch = "mips32r6",
2561 target_arch = "mips64",
2562 target_arch = "mips64r6"
2563 ),
2564 any(target_env = "gnu", target_env = "uclibc")
2565 ),
2566 all(
2567 target_env = "musl",
2568 target_os = "linux",
2569 any(
2570 target_arch = "mips",
2571 target_arch = "mips32r6",
2572 target_arch = "mips64",
2573 target_arch = "mips64r6"
2574 )
2575 ),
2576 all(
2577 target_env = "gnu",
2578 target_os = "linux",
2579 any(target_arch = "powerpc", target_arch = "powerpc64")
2580 ),
2581 all(
2582 target_env = "musl",
2583 target_os = "linux",
2584 any(target_arch = "powerpc", target_arch = "powerpc64")
2585 ),
2586 all(
2587 target_os = "linux",
2588 any(target_arch = "sparc", target_arch = "sparc64"),
2589 not(target_env = "newlib")
2590 )
2591 ))]
2592 pub const RLIMIT_RTPRIO: u8 = libc::RLIMIT_RTPRIO as u8;
2593
2594 #[cfg(not(any(
2595 target_os = "fuchsia",
2596 all(
2597 any(
2598 target_os = "android",
2599 target_os = "emscripten",
2600 target_os = "l4re",
2601 target_os = "redox"
2602 ),
2603 not(target_env = "newlib")
2604 ),
2605 all(
2606 target_os = "linux",
2607 any(target_env = "gnu", target_env = "uclibc"),
2608 not(any(
2609 target_arch = "mips",
2610 target_arch = "mips32r6",
2611 target_arch = "mips64",
2612 target_arch = "mips64r6",
2613 target_arch = "powerpc",
2614 target_arch = "powerpc64",
2615 target_arch = "sparc",
2616 target_arch = "sparc64"
2617 ))
2618 ),
2619 all(
2620 target_os = "linux",
2621 any(target_env = "musl", target_env = "ohos"),
2622 not(any(
2623 target_arch = "mips",
2624 target_arch = "mips32r6",
2625 target_arch = "mips64",
2626 target_arch = "mips64r6",
2627 target_arch = "powerpc",
2628 target_arch = "powerpc64",
2629 target_arch = "sparc",
2630 target_arch = "sparc64"
2631 ))
2632 ),
2633 all(
2634 target_os = "linux",
2635 any(
2636 target_arch = "mips",
2637 target_arch = "mips32r6",
2638 target_arch = "mips64",
2639 target_arch = "mips64r6"
2640 ),
2641 any(target_env = "gnu", target_env = "uclibc")
2642 ),
2643 all(
2644 target_env = "musl",
2645 target_os = "linux",
2646 any(
2647 target_arch = "mips",
2648 target_arch = "mips32r6",
2649 target_arch = "mips64",
2650 target_arch = "mips64r6"
2651 )
2652 ),
2653 all(
2654 target_env = "gnu",
2655 target_os = "linux",
2656 any(target_arch = "powerpc", target_arch = "powerpc64")
2657 ),
2658 all(
2659 target_env = "musl",
2660 target_os = "linux",
2661 any(target_arch = "powerpc", target_arch = "powerpc64")
2662 ),
2663 all(
2664 target_os = "linux",
2665 any(target_arch = "sparc", target_arch = "sparc64"),
2666 not(target_env = "newlib")
2667 )
2668 )))]
2669 pub const RLIMIT_RTPRIO: u8 = u8::MAX;
2670
2671 #[cfg(any(
2672 target_os = "fuchsia",
2673 all(target_os = "l4re", not(target_env = "newlib")),
2674 all(
2675 target_os = "linux",
2676 any(target_env = "gnu", target_env = "uclibc"),
2677 not(any(
2678 target_arch = "mips",
2679 target_arch = "mips32r6",
2680 target_arch = "mips64",
2681 target_arch = "mips64r6",
2682 target_arch = "powerpc",
2683 target_arch = "powerpc64",
2684 target_arch = "sparc",
2685 target_arch = "sparc64"
2686 ))
2687 ),
2688 all(
2689 target_os = "linux",
2690 any(target_env = "musl", target_env = "ohos"),
2691 not(any(
2692 target_arch = "mips",
2693 target_arch = "mips32r6",
2694 target_arch = "mips64",
2695 target_arch = "mips64r6",
2696 target_arch = "powerpc",
2697 target_arch = "powerpc64",
2698 target_arch = "sparc",
2699 target_arch = "sparc64"
2700 ))
2701 ),
2702 all(
2703 target_os = "linux",
2704 any(
2705 target_arch = "mips",
2706 target_arch = "mips32r6",
2707 target_arch = "mips64",
2708 target_arch = "mips64r6"
2709 ),
2710 any(target_env = "gnu", target_env = "uclibc")
2711 ),
2712 all(
2713 target_env = "musl",
2714 target_os = "linux",
2715 any(
2716 target_arch = "mips",
2717 target_arch = "mips32r6",
2718 target_arch = "mips64",
2719 target_arch = "mips64r6"
2720 )
2721 ),
2722 all(
2723 target_env = "gnu",
2724 target_os = "linux",
2725 any(target_arch = "powerpc", target_arch = "powerpc64")
2726 ),
2727 all(
2728 target_env = "musl",
2729 target_os = "linux",
2730 any(target_arch = "powerpc", target_arch = "powerpc64")
2731 ),
2732 all(
2733 target_os = "linux",
2734 any(target_arch = "sparc", target_arch = "sparc64"),
2735 not(target_env = "newlib")
2736 )
2737 ))]
2738 pub const RLIMIT_RTTIME: u8 = libc::RLIMIT_RTTIME as u8;
2739
2740 #[cfg(not(any(
2741 target_os = "fuchsia",
2742 all(target_os = "l4re", not(target_env = "newlib")),
2743 all(
2744 target_os = "linux",
2745 any(target_env = "gnu", target_env = "uclibc"),
2746 not(any(
2747 target_arch = "mips",
2748 target_arch = "mips32r6",
2749 target_arch = "mips64",
2750 target_arch = "mips64r6",
2751 target_arch = "powerpc",
2752 target_arch = "powerpc64",
2753 target_arch = "sparc",
2754 target_arch = "sparc64"
2755 ))
2756 ),
2757 all(
2758 target_os = "linux",
2759 any(target_env = "musl", target_env = "ohos"),
2760 not(any(
2761 target_arch = "mips",
2762 target_arch = "mips32r6",
2763 target_arch = "mips64",
2764 target_arch = "mips64r6",
2765 target_arch = "powerpc",
2766 target_arch = "powerpc64",
2767 target_arch = "sparc",
2768 target_arch = "sparc64"
2769 ))
2770 ),
2771 all(
2772 target_os = "linux",
2773 any(
2774 target_arch = "mips",
2775 target_arch = "mips32r6",
2776 target_arch = "mips64",
2777 target_arch = "mips64r6"
2778 ),
2779 any(target_env = "gnu", target_env = "uclibc")
2780 ),
2781 all(
2782 target_env = "musl",
2783 target_os = "linux",
2784 any(
2785 target_arch = "mips",
2786 target_arch = "mips32r6",
2787 target_arch = "mips64",
2788 target_arch = "mips64r6"
2789 )
2790 ),
2791 all(
2792 target_env = "gnu",
2793 target_os = "linux",
2794 any(target_arch = "powerpc", target_arch = "powerpc64")
2795 ),
2796 all(
2797 target_env = "musl",
2798 target_os = "linux",
2799 any(target_arch = "powerpc", target_arch = "powerpc64")
2800 ),
2801 all(
2802 target_os = "linux",
2803 any(target_arch = "sparc", target_arch = "sparc64"),
2804 not(target_env = "newlib")
2805 )
2806 )))]
2807 pub const RLIMIT_RTTIME: u8 = u8::MAX;
2808
2809 #[cfg(all(
2810 any(
2811 target_os = "dragonfly",
2812 target_os = "freebsd",
2813 target_os = "hurd",
2814 target_os = "netbsd"
2815 ),
2816 not(target_env = "newlib")
2817 ))]
2818 pub const RLIMIT_SBSIZE: u8 = libc::RLIMIT_SBSIZE as u8;
2819
2820 #[cfg(not(all(
2821 any(
2822 target_os = "dragonfly",
2823 target_os = "freebsd",
2824 target_os = "hurd",
2825 target_os = "netbsd"
2826 ),
2827 not(target_env = "newlib")
2828 )))]
2829 pub const RLIMIT_SBSIZE: u8 = u8::MAX;
2830
2831 #[cfg(any(
2832 target_os = "fuchsia",
2833 all(
2834 any(
2835 target_os = "android",
2836 target_os = "emscripten",
2837 target_os = "l4re",
2838 target_os = "redox"
2839 ),
2840 not(target_env = "newlib")
2841 ),
2842 all(
2843 target_os = "linux",
2844 any(target_env = "gnu", target_env = "uclibc"),
2845 not(any(
2846 target_arch = "mips",
2847 target_arch = "mips32r6",
2848 target_arch = "mips64",
2849 target_arch = "mips64r6",
2850 target_arch = "powerpc",
2851 target_arch = "powerpc64",
2852 target_arch = "sparc",
2853 target_arch = "sparc64"
2854 ))
2855 ),
2856 all(
2857 target_os = "linux",
2858 any(target_env = "musl", target_env = "ohos"),
2859 not(any(
2860 target_arch = "mips",
2861 target_arch = "mips32r6",
2862 target_arch = "mips64",
2863 target_arch = "mips64r6",
2864 target_arch = "powerpc",
2865 target_arch = "powerpc64",
2866 target_arch = "sparc",
2867 target_arch = "sparc64"
2868 ))
2869 ),
2870 all(
2871 target_os = "linux",
2872 any(
2873 target_arch = "mips",
2874 target_arch = "mips32r6",
2875 target_arch = "mips64",
2876 target_arch = "mips64r6"
2877 ),
2878 any(target_env = "gnu", target_env = "uclibc")
2879 ),
2880 all(
2881 target_env = "musl",
2882 target_os = "linux",
2883 any(
2884 target_arch = "mips",
2885 target_arch = "mips32r6",
2886 target_arch = "mips64",
2887 target_arch = "mips64r6"
2888 )
2889 ),
2890 all(
2891 target_env = "gnu",
2892 target_os = "linux",
2893 any(target_arch = "powerpc", target_arch = "powerpc64")
2894 ),
2895 all(
2896 target_env = "musl",
2897 target_os = "linux",
2898 any(target_arch = "powerpc", target_arch = "powerpc64")
2899 ),
2900 all(
2901 target_os = "linux",
2902 any(target_arch = "sparc", target_arch = "sparc64"),
2903 not(target_env = "newlib")
2904 )
2905 ))]
2906 pub const RLIMIT_SIGPENDING: u8 = libc::RLIMIT_SIGPENDING as u8;
2907
2908 #[cfg(not(any(
2909 target_os = "fuchsia",
2910 all(
2911 any(
2912 target_os = "android",
2913 target_os = "emscripten",
2914 target_os = "l4re",
2915 target_os = "redox"
2916 ),
2917 not(target_env = "newlib")
2918 ),
2919 all(
2920 target_os = "linux",
2921 any(target_env = "gnu", target_env = "uclibc"),
2922 not(any(
2923 target_arch = "mips",
2924 target_arch = "mips32r6",
2925 target_arch = "mips64",
2926 target_arch = "mips64r6",
2927 target_arch = "powerpc",
2928 target_arch = "powerpc64",
2929 target_arch = "sparc",
2930 target_arch = "sparc64"
2931 ))
2932 ),
2933 all(
2934 target_os = "linux",
2935 any(target_env = "musl", target_env = "ohos"),
2936 not(any(
2937 target_arch = "mips",
2938 target_arch = "mips32r6",
2939 target_arch = "mips64",
2940 target_arch = "mips64r6",
2941 target_arch = "powerpc",
2942 target_arch = "powerpc64",
2943 target_arch = "sparc",
2944 target_arch = "sparc64"
2945 ))
2946 ),
2947 all(
2948 target_os = "linux",
2949 any(
2950 target_arch = "mips",
2951 target_arch = "mips32r6",
2952 target_arch = "mips64",
2953 target_arch = "mips64r6"
2954 ),
2955 any(target_env = "gnu", target_env = "uclibc")
2956 ),
2957 all(
2958 target_env = "musl",
2959 target_os = "linux",
2960 any(
2961 target_arch = "mips",
2962 target_arch = "mips32r6",
2963 target_arch = "mips64",
2964 target_arch = "mips64r6"
2965 )
2966 ),
2967 all(
2968 target_env = "gnu",
2969 target_os = "linux",
2970 any(target_arch = "powerpc", target_arch = "powerpc64")
2971 ),
2972 all(
2973 target_env = "musl",
2974 target_os = "linux",
2975 any(target_arch = "powerpc", target_arch = "powerpc64")
2976 ),
2977 all(
2978 target_os = "linux",
2979 any(target_arch = "sparc", target_arch = "sparc64"),
2980 not(target_env = "newlib")
2981 )
2982 )))]
2983 pub const RLIMIT_SIGPENDING: u8 = u8::MAX;
2984
2985 #[cfg(any(
2986 target_os = "fuchsia",
2987 all(
2988 any(
2989 target_os = "aix",
2990 target_os = "android",
2991 target_os = "cygwin",
2992 target_os = "dragonfly",
2993 target_os = "emscripten",
2994 target_os = "freebsd",
2995 target_os = "haiku",
2996 target_os = "hurd",
2997 target_os = "illumos",
2998 target_os = "ios",
2999 target_os = "l4re",
3000 target_os = "macos",
3001 target_os = "netbsd",
3002 target_os = "nto",
3003 target_os = "openbsd",
3004 target_os = "redox",
3005 target_os = "solaris",
3006 target_os = "tvos",
3007 target_os = "visionos",
3008 target_os = "watchos"
3009 ),
3010 not(target_env = "newlib")
3011 ),
3012 all(
3013 target_os = "linux",
3014 any(target_env = "gnu", target_env = "uclibc"),
3015 not(any(
3016 target_arch = "mips",
3017 target_arch = "mips32r6",
3018 target_arch = "mips64",
3019 target_arch = "mips64r6",
3020 target_arch = "powerpc",
3021 target_arch = "powerpc64",
3022 target_arch = "sparc",
3023 target_arch = "sparc64"
3024 ))
3025 ),
3026 all(
3027 target_os = "linux",
3028 any(target_env = "musl", target_env = "ohos"),
3029 not(any(
3030 target_arch = "mips",
3031 target_arch = "mips32r6",
3032 target_arch = "mips64",
3033 target_arch = "mips64r6",
3034 target_arch = "powerpc",
3035 target_arch = "powerpc64",
3036 target_arch = "sparc",
3037 target_arch = "sparc64"
3038 ))
3039 ),
3040 all(
3041 target_os = "linux",
3042 any(
3043 target_arch = "mips",
3044 target_arch = "mips32r6",
3045 target_arch = "mips64",
3046 target_arch = "mips64r6"
3047 ),
3048 any(target_env = "gnu", target_env = "uclibc")
3049 ),
3050 all(
3051 target_env = "musl",
3052 target_os = "linux",
3053 any(
3054 target_arch = "mips",
3055 target_arch = "mips32r6",
3056 target_arch = "mips64",
3057 target_arch = "mips64r6"
3058 )
3059 ),
3060 all(
3061 target_env = "gnu",
3062 target_os = "linux",
3063 any(target_arch = "powerpc", target_arch = "powerpc64")
3064 ),
3065 all(
3066 target_env = "musl",
3067 target_os = "linux",
3068 any(target_arch = "powerpc", target_arch = "powerpc64")
3069 ),
3070 all(
3071 target_os = "linux",
3072 any(target_arch = "sparc", target_arch = "sparc64"),
3073 not(target_env = "newlib")
3074 )
3075 ))]
3076 pub const RLIMIT_STACK: u8 = libc::RLIMIT_STACK as u8;
3077
3078 #[cfg(not(any(
3079 target_os = "fuchsia",
3080 all(
3081 any(
3082 target_os = "aix",
3083 target_os = "android",
3084 target_os = "cygwin",
3085 target_os = "dragonfly",
3086 target_os = "emscripten",
3087 target_os = "freebsd",
3088 target_os = "haiku",
3089 target_os = "hurd",
3090 target_os = "illumos",
3091 target_os = "ios",
3092 target_os = "l4re",
3093 target_os = "macos",
3094 target_os = "netbsd",
3095 target_os = "nto",
3096 target_os = "openbsd",
3097 target_os = "redox",
3098 target_os = "solaris",
3099 target_os = "tvos",
3100 target_os = "visionos",
3101 target_os = "watchos"
3102 ),
3103 not(target_env = "newlib")
3104 ),
3105 all(
3106 target_os = "linux",
3107 any(target_env = "gnu", target_env = "uclibc"),
3108 not(any(
3109 target_arch = "mips",
3110 target_arch = "mips32r6",
3111 target_arch = "mips64",
3112 target_arch = "mips64r6",
3113 target_arch = "powerpc",
3114 target_arch = "powerpc64",
3115 target_arch = "sparc",
3116 target_arch = "sparc64"
3117 ))
3118 ),
3119 all(
3120 target_os = "linux",
3121 any(target_env = "musl", target_env = "ohos"),
3122 not(any(
3123 target_arch = "mips",
3124 target_arch = "mips32r6",
3125 target_arch = "mips64",
3126 target_arch = "mips64r6",
3127 target_arch = "powerpc",
3128 target_arch = "powerpc64",
3129 target_arch = "sparc",
3130 target_arch = "sparc64"
3131 ))
3132 ),
3133 all(
3134 target_os = "linux",
3135 any(
3136 target_arch = "mips",
3137 target_arch = "mips32r6",
3138 target_arch = "mips64",
3139 target_arch = "mips64r6"
3140 ),
3141 any(target_env = "gnu", target_env = "uclibc")
3142 ),
3143 all(
3144 target_env = "musl",
3145 target_os = "linux",
3146 any(
3147 target_arch = "mips",
3148 target_arch = "mips32r6",
3149 target_arch = "mips64",
3150 target_arch = "mips64r6"
3151 )
3152 ),
3153 all(
3154 target_env = "gnu",
3155 target_os = "linux",
3156 any(target_arch = "powerpc", target_arch = "powerpc64")
3157 ),
3158 all(
3159 target_env = "musl",
3160 target_os = "linux",
3161 any(target_arch = "powerpc", target_arch = "powerpc64")
3162 ),
3163 all(
3164 target_os = "linux",
3165 any(target_arch = "sparc", target_arch = "sparc64"),
3166 not(target_env = "newlib")
3167 )
3168 )))]
3169 pub const RLIMIT_STACK: u8 = u8::MAX;
3170
3171 #[cfg(all(target_os = "freebsd", not(target_env = "newlib")))]
3172 pub const RLIMIT_SWAP: u8 = libc::RLIMIT_SWAP as u8;
3173
3174 #[cfg(not(all(target_os = "freebsd", not(target_env = "newlib"))))]
3175 pub const RLIMIT_SWAP: u8 = u8::MAX;
3176
3177 #[cfg(all(target_os = "aix", not(target_env = "newlib")))]
3178 pub const RLIMIT_THREADS: u8 = libc::RLIMIT_THREADS as u8;
3179
3180 #[cfg(not(all(target_os = "aix", not(target_env = "newlib"))))]
3181 pub const RLIMIT_THREADS: u8 = u8::MAX;
3182
3183 #[cfg(all(target_os = "freebsd", not(target_env = "newlib")))]
3184 pub const RLIMIT_UMTXP: u8 = libc::RLIMIT_UMTXP as u8;
3185
3186 #[cfg(not(all(target_os = "freebsd", not(target_env = "newlib"))))]
3187 pub const RLIMIT_UMTXP: u8 = u8::MAX;
3188
3189 #[cfg(all(
3190 any(
3191 target_os = "dragonfly",
3192 target_os = "freebsd",
3193 target_os = "hurd",
3194 target_os = "illumos",
3195 target_os = "nto",
3196 target_os = "solaris"
3197 ),
3198 not(target_env = "newlib")
3199 ))]
3200 pub const RLIMIT_VMEM: u8 = libc::RLIMIT_VMEM as u8;
3201
3202 #[cfg(not(all(
3203 any(
3204 target_os = "dragonfly",
3205 target_os = "freebsd",
3206 target_os = "hurd",
3207 target_os = "illumos",
3208 target_os = "nto",
3209 target_os = "solaris"
3210 ),
3211 not(target_env = "newlib")
3212 )))]
3213 pub const RLIMIT_VMEM: u8 = u8::MAX;
3214
3215 #[cfg(test)]
3216 mod tests {
3217 #[allow(clippy::too_many_lines)]
3218 #[test]
3219 fn resource_range() {
3220 #[cfg(any(
3221 target_os = "fuchsia",
3222 all(
3223 any(
3224 target_os = "aix",
3225 target_os = "android",
3226 target_os = "cygwin",
3227 target_os = "dragonfly",
3228 target_os = "emscripten",
3229 target_os = "freebsd",
3230 target_os = "haiku",
3231 target_os = "hurd",
3232 target_os = "illumos",
3233 target_os = "ios",
3234 target_os = "l4re",
3235 target_os = "macos",
3236 target_os = "netbsd",
3237 target_os = "nto",
3238 target_os = "redox",
3239 target_os = "solaris",
3240 target_os = "tvos",
3241 target_os = "visionos",
3242 target_os = "watchos"
3243 ),
3244 not(target_env = "newlib")
3245 ),
3246 all(
3247 target_os = "linux",
3248 any(target_env = "gnu", target_env = "uclibc"),
3249 not(any(
3250 target_arch = "mips",
3251 target_arch = "mips32r6",
3252 target_arch = "mips64",
3253 target_arch = "mips64r6",
3254 target_arch = "powerpc",
3255 target_arch = "powerpc64",
3256 target_arch = "sparc",
3257 target_arch = "sparc64"
3258 ))
3259 ),
3260 all(
3261 target_os = "linux",
3262 any(target_env = "musl", target_env = "ohos"),
3263 not(any(
3264 target_arch = "mips",
3265 target_arch = "mips32r6",
3266 target_arch = "mips64",
3267 target_arch = "mips64r6",
3268 target_arch = "powerpc",
3269 target_arch = "powerpc64",
3270 target_arch = "sparc",
3271 target_arch = "sparc64"
3272 ))
3273 ),
3274 all(
3275 target_os = "linux",
3276 any(
3277 target_arch = "mips",
3278 target_arch = "mips32r6",
3279 target_arch = "mips64",
3280 target_arch = "mips64r6"
3281 ),
3282 any(target_env = "gnu", target_env = "uclibc")
3283 ),
3284 all(
3285 target_env = "musl",
3286 target_os = "linux",
3287 any(
3288 target_arch = "mips",
3289 target_arch = "mips32r6",
3290 target_arch = "mips64",
3291 target_arch = "mips64r6"
3292 )
3293 ),
3294 all(
3295 target_env = "gnu",
3296 target_os = "linux",
3297 any(target_arch = "powerpc", target_arch = "powerpc64")
3298 ),
3299 all(
3300 target_env = "musl",
3301 target_os = "linux",
3302 any(target_arch = "powerpc", target_arch = "powerpc64")
3303 ),
3304 all(
3305 target_os = "linux",
3306 any(target_arch = "sparc", target_arch = "sparc64"),
3307 not(target_env = "newlib")
3308 )
3309 ))]
3310 assert!((0..128).contains(&libc::RLIMIT_AS));
3311
3312 #[cfg(any(
3313 target_os = "fuchsia",
3314 all(
3315 any(
3316 target_os = "aix",
3317 target_os = "android",
3318 target_os = "cygwin",
3319 target_os = "dragonfly",
3320 target_os = "emscripten",
3321 target_os = "freebsd",
3322 target_os = "haiku",
3323 target_os = "hurd",
3324 target_os = "illumos",
3325 target_os = "ios",
3326 target_os = "l4re",
3327 target_os = "macos",
3328 target_os = "netbsd",
3329 target_os = "nto",
3330 target_os = "openbsd",
3331 target_os = "redox",
3332 target_os = "solaris",
3333 target_os = "tvos",
3334 target_os = "visionos",
3335 target_os = "watchos"
3336 ),
3337 not(target_env = "newlib")
3338 ),
3339 all(
3340 target_os = "linux",
3341 any(target_env = "gnu", target_env = "uclibc"),
3342 not(any(
3343 target_arch = "mips",
3344 target_arch = "mips32r6",
3345 target_arch = "mips64",
3346 target_arch = "mips64r6",
3347 target_arch = "powerpc",
3348 target_arch = "powerpc64",
3349 target_arch = "sparc",
3350 target_arch = "sparc64"
3351 ))
3352 ),
3353 all(
3354 target_os = "linux",
3355 any(target_env = "musl", target_env = "ohos"),
3356 not(any(
3357 target_arch = "mips",
3358 target_arch = "mips32r6",
3359 target_arch = "mips64",
3360 target_arch = "mips64r6",
3361 target_arch = "powerpc",
3362 target_arch = "powerpc64",
3363 target_arch = "sparc",
3364 target_arch = "sparc64"
3365 ))
3366 ),
3367 all(
3368 target_os = "linux",
3369 any(
3370 target_arch = "mips",
3371 target_arch = "mips32r6",
3372 target_arch = "mips64",
3373 target_arch = "mips64r6"
3374 ),
3375 any(target_env = "gnu", target_env = "uclibc")
3376 ),
3377 all(
3378 target_env = "musl",
3379 target_os = "linux",
3380 any(
3381 target_arch = "mips",
3382 target_arch = "mips32r6",
3383 target_arch = "mips64",
3384 target_arch = "mips64r6"
3385 )
3386 ),
3387 all(
3388 target_env = "gnu",
3389 target_os = "linux",
3390 any(target_arch = "powerpc", target_arch = "powerpc64")
3391 ),
3392 all(
3393 target_env = "musl",
3394 target_os = "linux",
3395 any(target_arch = "powerpc", target_arch = "powerpc64")
3396 ),
3397 all(
3398 target_os = "linux",
3399 any(target_arch = "sparc", target_arch = "sparc64"),
3400 not(target_env = "newlib")
3401 )
3402 ))]
3403 assert!((0..128).contains(&libc::RLIMIT_CORE));
3404
3405 #[cfg(any(
3406 target_os = "fuchsia",
3407 all(
3408 any(
3409 target_os = "aix",
3410 target_os = "android",
3411 target_os = "cygwin",
3412 target_os = "dragonfly",
3413 target_os = "emscripten",
3414 target_os = "freebsd",
3415 target_os = "haiku",
3416 target_os = "hurd",
3417 target_os = "illumos",
3418 target_os = "ios",
3419 target_os = "l4re",
3420 target_os = "macos",
3421 target_os = "netbsd",
3422 target_os = "nto",
3423 target_os = "openbsd",
3424 target_os = "redox",
3425 target_os = "solaris",
3426 target_os = "tvos",
3427 target_os = "visionos",
3428 target_os = "watchos"
3429 ),
3430 not(target_env = "newlib")
3431 ),
3432 all(
3433 target_os = "linux",
3434 any(target_env = "gnu", target_env = "uclibc"),
3435 not(any(
3436 target_arch = "mips",
3437 target_arch = "mips32r6",
3438 target_arch = "mips64",
3439 target_arch = "mips64r6",
3440 target_arch = "powerpc",
3441 target_arch = "powerpc64",
3442 target_arch = "sparc",
3443 target_arch = "sparc64"
3444 ))
3445 ),
3446 all(
3447 target_os = "linux",
3448 any(target_env = "musl", target_env = "ohos"),
3449 not(any(
3450 target_arch = "mips",
3451 target_arch = "mips32r6",
3452 target_arch = "mips64",
3453 target_arch = "mips64r6",
3454 target_arch = "powerpc",
3455 target_arch = "powerpc64",
3456 target_arch = "sparc",
3457 target_arch = "sparc64"
3458 ))
3459 ),
3460 all(
3461 target_os = "linux",
3462 any(
3463 target_arch = "mips",
3464 target_arch = "mips32r6",
3465 target_arch = "mips64",
3466 target_arch = "mips64r6"
3467 ),
3468 any(target_env = "gnu", target_env = "uclibc")
3469 ),
3470 all(
3471 target_env = "musl",
3472 target_os = "linux",
3473 any(
3474 target_arch = "mips",
3475 target_arch = "mips32r6",
3476 target_arch = "mips64",
3477 target_arch = "mips64r6"
3478 )
3479 ),
3480 all(
3481 target_env = "gnu",
3482 target_os = "linux",
3483 any(target_arch = "powerpc", target_arch = "powerpc64")
3484 ),
3485 all(
3486 target_env = "musl",
3487 target_os = "linux",
3488 any(target_arch = "powerpc", target_arch = "powerpc64")
3489 ),
3490 all(
3491 target_os = "linux",
3492 any(target_arch = "sparc", target_arch = "sparc64"),
3493 not(target_env = "newlib")
3494 )
3495 ))]
3496 assert!((0..128).contains(&libc::RLIMIT_CPU));
3497
3498 #[cfg(any(
3499 target_os = "fuchsia",
3500 all(
3501 any(
3502 target_os = "aix",
3503 target_os = "android",
3504 target_os = "cygwin",
3505 target_os = "dragonfly",
3506 target_os = "emscripten",
3507 target_os = "freebsd",
3508 target_os = "haiku",
3509 target_os = "hurd",
3510 target_os = "illumos",
3511 target_os = "ios",
3512 target_os = "l4re",
3513 target_os = "macos",
3514 target_os = "netbsd",
3515 target_os = "nto",
3516 target_os = "openbsd",
3517 target_os = "redox",
3518 target_os = "solaris",
3519 target_os = "tvos",
3520 target_os = "visionos",
3521 target_os = "watchos"
3522 ),
3523 not(target_env = "newlib")
3524 ),
3525 all(
3526 target_os = "linux",
3527 any(target_env = "gnu", target_env = "uclibc"),
3528 not(any(
3529 target_arch = "mips",
3530 target_arch = "mips32r6",
3531 target_arch = "mips64",
3532 target_arch = "mips64r6",
3533 target_arch = "powerpc",
3534 target_arch = "powerpc64",
3535 target_arch = "sparc",
3536 target_arch = "sparc64"
3537 ))
3538 ),
3539 all(
3540 target_os = "linux",
3541 any(target_env = "musl", target_env = "ohos"),
3542 not(any(
3543 target_arch = "mips",
3544 target_arch = "mips32r6",
3545 target_arch = "mips64",
3546 target_arch = "mips64r6",
3547 target_arch = "powerpc",
3548 target_arch = "powerpc64",
3549 target_arch = "sparc",
3550 target_arch = "sparc64"
3551 ))
3552 ),
3553 all(
3554 target_os = "linux",
3555 any(
3556 target_arch = "mips",
3557 target_arch = "mips32r6",
3558 target_arch = "mips64",
3559 target_arch = "mips64r6"
3560 ),
3561 any(target_env = "gnu", target_env = "uclibc")
3562 ),
3563 all(
3564 target_env = "musl",
3565 target_os = "linux",
3566 any(
3567 target_arch = "mips",
3568 target_arch = "mips32r6",
3569 target_arch = "mips64",
3570 target_arch = "mips64r6"
3571 )
3572 ),
3573 all(
3574 target_env = "gnu",
3575 target_os = "linux",
3576 any(target_arch = "powerpc", target_arch = "powerpc64")
3577 ),
3578 all(
3579 target_env = "musl",
3580 target_os = "linux",
3581 any(target_arch = "powerpc", target_arch = "powerpc64")
3582 ),
3583 all(
3584 target_os = "linux",
3585 any(target_arch = "sparc", target_arch = "sparc64"),
3586 not(target_env = "newlib")
3587 )
3588 ))]
3589 assert!((0..128).contains(&libc::RLIMIT_DATA));
3590
3591 #[cfg(any(
3592 target_os = "fuchsia",
3593 all(
3594 any(
3595 target_os = "aix",
3596 target_os = "android",
3597 target_os = "cygwin",
3598 target_os = "dragonfly",
3599 target_os = "emscripten",
3600 target_os = "freebsd",
3601 target_os = "haiku",
3602 target_os = "hurd",
3603 target_os = "illumos",
3604 target_os = "ios",
3605 target_os = "l4re",
3606 target_os = "macos",
3607 target_os = "netbsd",
3608 target_os = "nto",
3609 target_os = "openbsd",
3610 target_os = "redox",
3611 target_os = "solaris",
3612 target_os = "tvos",
3613 target_os = "visionos",
3614 target_os = "watchos"
3615 ),
3616 not(target_env = "newlib")
3617 ),
3618 all(
3619 target_os = "linux",
3620 any(target_env = "gnu", target_env = "uclibc"),
3621 not(any(
3622 target_arch = "mips",
3623 target_arch = "mips32r6",
3624 target_arch = "mips64",
3625 target_arch = "mips64r6",
3626 target_arch = "powerpc",
3627 target_arch = "powerpc64",
3628 target_arch = "sparc",
3629 target_arch = "sparc64"
3630 ))
3631 ),
3632 all(
3633 target_os = "linux",
3634 any(target_env = "musl", target_env = "ohos"),
3635 not(any(
3636 target_arch = "mips",
3637 target_arch = "mips32r6",
3638 target_arch = "mips64",
3639 target_arch = "mips64r6",
3640 target_arch = "powerpc",
3641 target_arch = "powerpc64",
3642 target_arch = "sparc",
3643 target_arch = "sparc64"
3644 ))
3645 ),
3646 all(
3647 target_os = "linux",
3648 any(
3649 target_arch = "mips",
3650 target_arch = "mips32r6",
3651 target_arch = "mips64",
3652 target_arch = "mips64r6"
3653 ),
3654 any(target_env = "gnu", target_env = "uclibc")
3655 ),
3656 all(
3657 target_env = "musl",
3658 target_os = "linux",
3659 any(
3660 target_arch = "mips",
3661 target_arch = "mips32r6",
3662 target_arch = "mips64",
3663 target_arch = "mips64r6"
3664 )
3665 ),
3666 all(
3667 target_env = "gnu",
3668 target_os = "linux",
3669 any(target_arch = "powerpc", target_arch = "powerpc64")
3670 ),
3671 all(
3672 target_env = "musl",
3673 target_os = "linux",
3674 any(target_arch = "powerpc", target_arch = "powerpc64")
3675 ),
3676 all(
3677 target_os = "linux",
3678 any(target_arch = "sparc", target_arch = "sparc64"),
3679 not(target_env = "newlib")
3680 )
3681 ))]
3682 assert!((0..128).contains(&libc::RLIMIT_FSIZE));
3683
3684 #[cfg(all(target_os = "freebsd", not(target_env = "newlib")))]
3685 assert!((0..128).contains(&libc::RLIMIT_KQUEUES));
3686
3687 #[cfg(any(
3688 target_os = "fuchsia",
3689 all(
3690 any(
3691 target_os = "android",
3692 target_os = "emscripten",
3693 target_os = "l4re",
3694 target_os = "redox"
3695 ),
3696 not(target_env = "newlib")
3697 ),
3698 all(
3699 target_os = "linux",
3700 any(target_env = "gnu", target_env = "uclibc"),
3701 not(any(
3702 target_arch = "mips",
3703 target_arch = "mips32r6",
3704 target_arch = "mips64",
3705 target_arch = "mips64r6",
3706 target_arch = "powerpc",
3707 target_arch = "powerpc64",
3708 target_arch = "sparc",
3709 target_arch = "sparc64"
3710 ))
3711 ),
3712 all(
3713 target_os = "linux",
3714 any(target_env = "musl", target_env = "ohos"),
3715 not(any(
3716 target_arch = "mips",
3717 target_arch = "mips32r6",
3718 target_arch = "mips64",
3719 target_arch = "mips64r6",
3720 target_arch = "powerpc",
3721 target_arch = "powerpc64",
3722 target_arch = "sparc",
3723 target_arch = "sparc64"
3724 ))
3725 ),
3726 all(
3727 target_os = "linux",
3728 any(
3729 target_arch = "mips",
3730 target_arch = "mips32r6",
3731 target_arch = "mips64",
3732 target_arch = "mips64r6"
3733 ),
3734 any(target_env = "gnu", target_env = "uclibc")
3735 ),
3736 all(
3737 target_env = "musl",
3738 target_os = "linux",
3739 any(
3740 target_arch = "mips",
3741 target_arch = "mips32r6",
3742 target_arch = "mips64",
3743 target_arch = "mips64r6"
3744 )
3745 ),
3746 all(
3747 target_env = "gnu",
3748 target_os = "linux",
3749 any(target_arch = "powerpc", target_arch = "powerpc64")
3750 ),
3751 all(
3752 target_env = "musl",
3753 target_os = "linux",
3754 any(target_arch = "powerpc", target_arch = "powerpc64")
3755 ),
3756 all(
3757 target_os = "linux",
3758 any(target_arch = "sparc", target_arch = "sparc64"),
3759 not(target_env = "newlib")
3760 )
3761 ))]
3762 assert!((0..128).contains(&libc::RLIMIT_LOCKS));
3763
3764 #[cfg(any(
3765 target_os = "fuchsia",
3766 all(
3767 any(
3768 target_os = "android",
3769 target_os = "dragonfly",
3770 target_os = "emscripten",
3771 target_os = "freebsd",
3772 target_os = "hurd",
3773 target_os = "ios",
3774 target_os = "l4re",
3775 target_os = "macos",
3776 target_os = "netbsd",
3777 target_os = "nto",
3778 target_os = "openbsd",
3779 target_os = "redox",
3780 target_os = "tvos",
3781 target_os = "visionos",
3782 target_os = "watchos"
3783 ),
3784 not(target_env = "newlib")
3785 ),
3786 all(
3787 target_os = "linux",
3788 any(target_env = "gnu", target_env = "uclibc"),
3789 not(any(
3790 target_arch = "mips",
3791 target_arch = "mips32r6",
3792 target_arch = "mips64",
3793 target_arch = "mips64r6",
3794 target_arch = "powerpc",
3795 target_arch = "powerpc64",
3796 target_arch = "sparc",
3797 target_arch = "sparc64"
3798 ))
3799 ),
3800 all(
3801 target_os = "linux",
3802 any(target_env = "musl", target_env = "ohos"),
3803 not(any(
3804 target_arch = "mips",
3805 target_arch = "mips32r6",
3806 target_arch = "mips64",
3807 target_arch = "mips64r6",
3808 target_arch = "powerpc",
3809 target_arch = "powerpc64",
3810 target_arch = "sparc",
3811 target_arch = "sparc64"
3812 ))
3813 ),
3814 all(
3815 target_os = "linux",
3816 any(
3817 target_arch = "mips",
3818 target_arch = "mips32r6",
3819 target_arch = "mips64",
3820 target_arch = "mips64r6"
3821 ),
3822 any(target_env = "gnu", target_env = "uclibc")
3823 ),
3824 all(
3825 target_env = "musl",
3826 target_os = "linux",
3827 any(
3828 target_arch = "mips",
3829 target_arch = "mips32r6",
3830 target_arch = "mips64",
3831 target_arch = "mips64r6"
3832 )
3833 ),
3834 all(
3835 target_env = "gnu",
3836 target_os = "linux",
3837 any(target_arch = "powerpc", target_arch = "powerpc64")
3838 ),
3839 all(
3840 target_env = "musl",
3841 target_os = "linux",
3842 any(target_arch = "powerpc", target_arch = "powerpc64")
3843 ),
3844 all(
3845 target_os = "linux",
3846 any(target_arch = "sparc", target_arch = "sparc64"),
3847 not(target_env = "newlib")
3848 )
3849 ))]
3850 assert!((0..128).contains(&libc::RLIMIT_MEMLOCK));
3851
3852 #[cfg(any(
3853 target_os = "fuchsia",
3854 all(
3855 any(
3856 target_os = "android",
3857 target_os = "emscripten",
3858 target_os = "l4re",
3859 target_os = "redox"
3860 ),
3861 not(target_env = "newlib")
3862 ),
3863 all(
3864 target_os = "linux",
3865 any(target_env = "gnu", target_env = "uclibc"),
3866 not(any(
3867 target_arch = "mips",
3868 target_arch = "mips32r6",
3869 target_arch = "mips64",
3870 target_arch = "mips64r6",
3871 target_arch = "powerpc",
3872 target_arch = "powerpc64",
3873 target_arch = "sparc",
3874 target_arch = "sparc64"
3875 ))
3876 ),
3877 all(
3878 target_os = "linux",
3879 any(target_env = "musl", target_env = "ohos"),
3880 not(any(
3881 target_arch = "mips",
3882 target_arch = "mips32r6",
3883 target_arch = "mips64",
3884 target_arch = "mips64r6",
3885 target_arch = "powerpc",
3886 target_arch = "powerpc64",
3887 target_arch = "sparc",
3888 target_arch = "sparc64"
3889 ))
3890 ),
3891 all(
3892 target_os = "linux",
3893 any(
3894 target_arch = "mips",
3895 target_arch = "mips32r6",
3896 target_arch = "mips64",
3897 target_arch = "mips64r6"
3898 ),
3899 any(target_env = "gnu", target_env = "uclibc")
3900 ),
3901 all(
3902 target_env = "musl",
3903 target_os = "linux",
3904 any(
3905 target_arch = "mips",
3906 target_arch = "mips32r6",
3907 target_arch = "mips64",
3908 target_arch = "mips64r6"
3909 )
3910 ),
3911 all(
3912 target_env = "gnu",
3913 target_os = "linux",
3914 any(target_arch = "powerpc", target_arch = "powerpc64")
3915 ),
3916 all(
3917 target_env = "musl",
3918 target_os = "linux",
3919 any(target_arch = "powerpc", target_arch = "powerpc64")
3920 ),
3921 all(
3922 target_os = "linux",
3923 any(target_arch = "sparc", target_arch = "sparc64"),
3924 not(target_env = "newlib")
3925 )
3926 ))]
3927 assert!((0..128).contains(&libc::RLIMIT_MSGQUEUE));
3928
3929 #[cfg(any(
3930 target_os = "fuchsia",
3931 all(
3932 any(
3933 target_os = "android",
3934 target_os = "emscripten",
3935 target_os = "l4re",
3936 target_os = "redox"
3937 ),
3938 not(target_env = "newlib")
3939 ),
3940 all(
3941 target_os = "linux",
3942 any(target_env = "gnu", target_env = "uclibc"),
3943 not(any(
3944 target_arch = "mips",
3945 target_arch = "mips32r6",
3946 target_arch = "mips64",
3947 target_arch = "mips64r6",
3948 target_arch = "powerpc",
3949 target_arch = "powerpc64",
3950 target_arch = "sparc",
3951 target_arch = "sparc64"
3952 ))
3953 ),
3954 all(
3955 target_os = "linux",
3956 any(target_env = "musl", target_env = "ohos"),
3957 not(any(
3958 target_arch = "mips",
3959 target_arch = "mips32r6",
3960 target_arch = "mips64",
3961 target_arch = "mips64r6",
3962 target_arch = "powerpc",
3963 target_arch = "powerpc64",
3964 target_arch = "sparc",
3965 target_arch = "sparc64"
3966 ))
3967 ),
3968 all(
3969 target_os = "linux",
3970 any(
3971 target_arch = "mips",
3972 target_arch = "mips32r6",
3973 target_arch = "mips64",
3974 target_arch = "mips64r6"
3975 ),
3976 any(target_env = "gnu", target_env = "uclibc")
3977 ),
3978 all(
3979 target_env = "musl",
3980 target_os = "linux",
3981 any(
3982 target_arch = "mips",
3983 target_arch = "mips32r6",
3984 target_arch = "mips64",
3985 target_arch = "mips64r6"
3986 )
3987 ),
3988 all(
3989 target_env = "gnu",
3990 target_os = "linux",
3991 any(target_arch = "powerpc", target_arch = "powerpc64")
3992 ),
3993 all(
3994 target_env = "musl",
3995 target_os = "linux",
3996 any(target_arch = "powerpc", target_arch = "powerpc64")
3997 ),
3998 all(
3999 target_os = "linux",
4000 any(target_arch = "sparc", target_arch = "sparc64"),
4001 not(target_env = "newlib")
4002 )
4003 ))]
4004 assert!((0..128).contains(&libc::RLIMIT_NICE));
4005
4006 #[cfg(any(
4007 target_os = "fuchsia",
4008 all(
4009 any(
4010 target_os = "aix",
4011 target_os = "android",
4012 target_os = "cygwin",
4013 target_os = "dragonfly",
4014 target_os = "emscripten",
4015 target_os = "freebsd",
4016 target_os = "haiku",
4017 target_os = "hurd",
4018 target_os = "illumos",
4019 target_os = "ios",
4020 target_os = "l4re",
4021 target_os = "macos",
4022 target_os = "netbsd",
4023 target_os = "nto",
4024 target_os = "openbsd",
4025 target_os = "redox",
4026 target_os = "solaris",
4027 target_os = "tvos",
4028 target_os = "visionos",
4029 target_os = "watchos"
4030 ),
4031 not(target_env = "newlib")
4032 ),
4033 all(
4034 target_os = "linux",
4035 any(target_env = "gnu", target_env = "uclibc"),
4036 not(any(
4037 target_arch = "mips",
4038 target_arch = "mips32r6",
4039 target_arch = "mips64",
4040 target_arch = "mips64r6",
4041 target_arch = "powerpc",
4042 target_arch = "powerpc64",
4043 target_arch = "sparc",
4044 target_arch = "sparc64"
4045 ))
4046 ),
4047 all(
4048 target_os = "linux",
4049 any(target_env = "musl", target_env = "ohos"),
4050 not(any(
4051 target_arch = "mips",
4052 target_arch = "mips32r6",
4053 target_arch = "mips64",
4054 target_arch = "mips64r6",
4055 target_arch = "powerpc",
4056 target_arch = "powerpc64",
4057 target_arch = "sparc",
4058 target_arch = "sparc64"
4059 ))
4060 ),
4061 all(
4062 target_os = "linux",
4063 any(
4064 target_arch = "mips",
4065 target_arch = "mips32r6",
4066 target_arch = "mips64",
4067 target_arch = "mips64r6"
4068 ),
4069 any(target_env = "gnu", target_env = "uclibc")
4070 ),
4071 all(
4072 target_env = "musl",
4073 target_os = "linux",
4074 any(
4075 target_arch = "mips",
4076 target_arch = "mips32r6",
4077 target_arch = "mips64",
4078 target_arch = "mips64r6"
4079 )
4080 ),
4081 all(
4082 target_env = "gnu",
4083 target_os = "linux",
4084 any(target_arch = "powerpc", target_arch = "powerpc64")
4085 ),
4086 all(
4087 target_env = "musl",
4088 target_os = "linux",
4089 any(target_arch = "powerpc", target_arch = "powerpc64")
4090 ),
4091 all(
4092 target_os = "linux",
4093 any(target_arch = "sparc", target_arch = "sparc64"),
4094 not(target_env = "newlib")
4095 )
4096 ))]
4097 assert!((0..128).contains(&libc::RLIMIT_NOFILE));
4098
4099 #[cfg(all(target_os = "haiku", not(target_env = "newlib")))]
4100 assert!((0..128).contains(&libc::RLIMIT_NOVMON));
4101
4102 #[cfg(any(
4103 target_os = "fuchsia",
4104 all(
4105 any(
4106 target_os = "aix",
4107 target_os = "android",
4108 target_os = "dragonfly",
4109 target_os = "emscripten",
4110 target_os = "freebsd",
4111 target_os = "hurd",
4112 target_os = "ios",
4113 target_os = "l4re",
4114 target_os = "macos",
4115 target_os = "netbsd",
4116 target_os = "nto",
4117 target_os = "openbsd",
4118 target_os = "redox",
4119 target_os = "tvos",
4120 target_os = "visionos",
4121 target_os = "watchos"
4122 ),
4123 not(target_env = "newlib")
4124 ),
4125 all(
4126 target_os = "linux",
4127 any(target_env = "gnu", target_env = "uclibc"),
4128 not(any(
4129 target_arch = "mips",
4130 target_arch = "mips32r6",
4131 target_arch = "mips64",
4132 target_arch = "mips64r6",
4133 target_arch = "powerpc",
4134 target_arch = "powerpc64",
4135 target_arch = "sparc",
4136 target_arch = "sparc64"
4137 ))
4138 ),
4139 all(
4140 target_os = "linux",
4141 any(target_env = "musl", target_env = "ohos"),
4142 not(any(
4143 target_arch = "mips",
4144 target_arch = "mips32r6",
4145 target_arch = "mips64",
4146 target_arch = "mips64r6",
4147 target_arch = "powerpc",
4148 target_arch = "powerpc64",
4149 target_arch = "sparc",
4150 target_arch = "sparc64"
4151 ))
4152 ),
4153 all(
4154 target_os = "linux",
4155 any(
4156 target_arch = "mips",
4157 target_arch = "mips32r6",
4158 target_arch = "mips64",
4159 target_arch = "mips64r6"
4160 ),
4161 any(target_env = "gnu", target_env = "uclibc")
4162 ),
4163 all(
4164 target_env = "musl",
4165 target_os = "linux",
4166 any(
4167 target_arch = "mips",
4168 target_arch = "mips32r6",
4169 target_arch = "mips64",
4170 target_arch = "mips64r6"
4171 )
4172 ),
4173 all(
4174 target_env = "gnu",
4175 target_os = "linux",
4176 any(target_arch = "powerpc", target_arch = "powerpc64")
4177 ),
4178 all(
4179 target_env = "musl",
4180 target_os = "linux",
4181 any(target_arch = "powerpc", target_arch = "powerpc64")
4182 ),
4183 all(
4184 target_os = "linux",
4185 any(target_arch = "sparc", target_arch = "sparc64"),
4186 not(target_env = "newlib")
4187 )
4188 ))]
4189 assert!((0..128).contains(&libc::RLIMIT_NPROC));
4190
4191 #[cfg(all(target_os = "freebsd", not(target_env = "newlib")))]
4192 assert!((0..128).contains(&libc::RLIMIT_NPTS));
4193
4194 #[cfg(all(target_os = "netbsd", not(target_env = "newlib")))]
4195 assert!((0..128).contains(&libc::RLIMIT_NTHR));
4196
4197 #[cfg(all(target_os = "dragonfly", not(target_env = "newlib")))]
4198 assert!((0..128).contains(&libc::RLIMIT_POSIXLOCKS));
4199
4200 #[cfg(any(
4201 target_os = "fuchsia",
4202 all(
4203 any(
4204 target_os = "aix",
4205 target_os = "android",
4206 target_os = "dragonfly",
4207 target_os = "emscripten",
4208 target_os = "freebsd",
4209 target_os = "hurd",
4210 target_os = "ios",
4211 target_os = "l4re",
4212 target_os = "macos",
4213 target_os = "netbsd",
4214 target_os = "nto",
4215 target_os = "openbsd",
4216 target_os = "redox",
4217 target_os = "tvos",
4218 target_os = "visionos",
4219 target_os = "watchos"
4220 ),
4221 not(target_env = "newlib")
4222 ),
4223 all(
4224 target_os = "linux",
4225 any(target_env = "gnu", target_env = "uclibc"),
4226 not(any(
4227 target_arch = "mips",
4228 target_arch = "mips32r6",
4229 target_arch = "mips64",
4230 target_arch = "mips64r6",
4231 target_arch = "powerpc",
4232 target_arch = "powerpc64",
4233 target_arch = "sparc",
4234 target_arch = "sparc64"
4235 ))
4236 ),
4237 all(
4238 target_os = "linux",
4239 any(target_env = "musl", target_env = "ohos"),
4240 not(any(
4241 target_arch = "mips",
4242 target_arch = "mips32r6",
4243 target_arch = "mips64",
4244 target_arch = "mips64r6",
4245 target_arch = "powerpc",
4246 target_arch = "powerpc64",
4247 target_arch = "sparc",
4248 target_arch = "sparc64"
4249 ))
4250 ),
4251 all(
4252 target_os = "linux",
4253 any(
4254 target_arch = "mips",
4255 target_arch = "mips32r6",
4256 target_arch = "mips64",
4257 target_arch = "mips64r6"
4258 ),
4259 any(target_env = "gnu", target_env = "uclibc")
4260 ),
4261 all(
4262 target_env = "musl",
4263 target_os = "linux",
4264 any(
4265 target_arch = "mips",
4266 target_arch = "mips32r6",
4267 target_arch = "mips64",
4268 target_arch = "mips64r6"
4269 )
4270 ),
4271 all(
4272 target_env = "gnu",
4273 target_os = "linux",
4274 any(target_arch = "powerpc", target_arch = "powerpc64")
4275 ),
4276 all(
4277 target_env = "musl",
4278 target_os = "linux",
4279 any(target_arch = "powerpc", target_arch = "powerpc64")
4280 ),
4281 all(
4282 target_os = "linux",
4283 any(target_arch = "sparc", target_arch = "sparc64"),
4284 not(target_env = "newlib")
4285 )
4286 ))]
4287 assert!((0..128).contains(&libc::RLIMIT_RSS));
4288
4289 #[cfg(any(
4290 target_os = "fuchsia",
4291 all(
4292 any(
4293 target_os = "android",
4294 target_os = "emscripten",
4295 target_os = "l4re",
4296 target_os = "redox"
4297 ),
4298 not(target_env = "newlib")
4299 ),
4300 all(
4301 target_os = "linux",
4302 any(target_env = "gnu", target_env = "uclibc"),
4303 not(any(
4304 target_arch = "mips",
4305 target_arch = "mips32r6",
4306 target_arch = "mips64",
4307 target_arch = "mips64r6",
4308 target_arch = "powerpc",
4309 target_arch = "powerpc64",
4310 target_arch = "sparc",
4311 target_arch = "sparc64"
4312 ))
4313 ),
4314 all(
4315 target_os = "linux",
4316 any(target_env = "musl", target_env = "ohos"),
4317 not(any(
4318 target_arch = "mips",
4319 target_arch = "mips32r6",
4320 target_arch = "mips64",
4321 target_arch = "mips64r6",
4322 target_arch = "powerpc",
4323 target_arch = "powerpc64",
4324 target_arch = "sparc",
4325 target_arch = "sparc64"
4326 ))
4327 ),
4328 all(
4329 target_os = "linux",
4330 any(
4331 target_arch = "mips",
4332 target_arch = "mips32r6",
4333 target_arch = "mips64",
4334 target_arch = "mips64r6"
4335 ),
4336 any(target_env = "gnu", target_env = "uclibc")
4337 ),
4338 all(
4339 target_env = "musl",
4340 target_os = "linux",
4341 any(
4342 target_arch = "mips",
4343 target_arch = "mips32r6",
4344 target_arch = "mips64",
4345 target_arch = "mips64r6"
4346 )
4347 ),
4348 all(
4349 target_env = "gnu",
4350 target_os = "linux",
4351 any(target_arch = "powerpc", target_arch = "powerpc64")
4352 ),
4353 all(
4354 target_env = "musl",
4355 target_os = "linux",
4356 any(target_arch = "powerpc", target_arch = "powerpc64")
4357 ),
4358 all(
4359 target_os = "linux",
4360 any(target_arch = "sparc", target_arch = "sparc64"),
4361 not(target_env = "newlib")
4362 )
4363 ))]
4364 assert!((0..128).contains(&libc::RLIMIT_RTPRIO));
4365
4366 #[cfg(any(
4367 target_os = "fuchsia",
4368 all(target_os = "l4re", not(target_env = "newlib")),
4369 all(
4370 target_os = "linux",
4371 any(target_env = "gnu", target_env = "uclibc"),
4372 not(any(
4373 target_arch = "mips",
4374 target_arch = "mips32r6",
4375 target_arch = "mips64",
4376 target_arch = "mips64r6",
4377 target_arch = "powerpc",
4378 target_arch = "powerpc64",
4379 target_arch = "sparc",
4380 target_arch = "sparc64"
4381 ))
4382 ),
4383 all(
4384 target_os = "linux",
4385 any(target_env = "musl", target_env = "ohos"),
4386 not(any(
4387 target_arch = "mips",
4388 target_arch = "mips32r6",
4389 target_arch = "mips64",
4390 target_arch = "mips64r6",
4391 target_arch = "powerpc",
4392 target_arch = "powerpc64",
4393 target_arch = "sparc",
4394 target_arch = "sparc64"
4395 ))
4396 ),
4397 all(
4398 target_os = "linux",
4399 any(
4400 target_arch = "mips",
4401 target_arch = "mips32r6",
4402 target_arch = "mips64",
4403 target_arch = "mips64r6"
4404 ),
4405 any(target_env = "gnu", target_env = "uclibc")
4406 ),
4407 all(
4408 target_env = "musl",
4409 target_os = "linux",
4410 any(
4411 target_arch = "mips",
4412 target_arch = "mips32r6",
4413 target_arch = "mips64",
4414 target_arch = "mips64r6"
4415 )
4416 ),
4417 all(
4418 target_env = "gnu",
4419 target_os = "linux",
4420 any(target_arch = "powerpc", target_arch = "powerpc64")
4421 ),
4422 all(
4423 target_env = "musl",
4424 target_os = "linux",
4425 any(target_arch = "powerpc", target_arch = "powerpc64")
4426 ),
4427 all(
4428 target_os = "linux",
4429 any(target_arch = "sparc", target_arch = "sparc64"),
4430 not(target_env = "newlib")
4431 )
4432 ))]
4433 assert!((0..128).contains(&libc::RLIMIT_RTTIME));
4434
4435 #[cfg(all(
4436 any(
4437 target_os = "dragonfly",
4438 target_os = "freebsd",
4439 target_os = "hurd",
4440 target_os = "netbsd"
4441 ),
4442 not(target_env = "newlib")
4443 ))]
4444 assert!((0..128).contains(&libc::RLIMIT_SBSIZE));
4445
4446 #[cfg(any(
4447 target_os = "fuchsia",
4448 all(
4449 any(
4450 target_os = "android",
4451 target_os = "emscripten",
4452 target_os = "l4re",
4453 target_os = "redox"
4454 ),
4455 not(target_env = "newlib")
4456 ),
4457 all(
4458 target_os = "linux",
4459 any(target_env = "gnu", target_env = "uclibc"),
4460 not(any(
4461 target_arch = "mips",
4462 target_arch = "mips32r6",
4463 target_arch = "mips64",
4464 target_arch = "mips64r6",
4465 target_arch = "powerpc",
4466 target_arch = "powerpc64",
4467 target_arch = "sparc",
4468 target_arch = "sparc64"
4469 ))
4470 ),
4471 all(
4472 target_os = "linux",
4473 any(target_env = "musl", target_env = "ohos"),
4474 not(any(
4475 target_arch = "mips",
4476 target_arch = "mips32r6",
4477 target_arch = "mips64",
4478 target_arch = "mips64r6",
4479 target_arch = "powerpc",
4480 target_arch = "powerpc64",
4481 target_arch = "sparc",
4482 target_arch = "sparc64"
4483 ))
4484 ),
4485 all(
4486 target_os = "linux",
4487 any(
4488 target_arch = "mips",
4489 target_arch = "mips32r6",
4490 target_arch = "mips64",
4491 target_arch = "mips64r6"
4492 ),
4493 any(target_env = "gnu", target_env = "uclibc")
4494 ),
4495 all(
4496 target_env = "musl",
4497 target_os = "linux",
4498 any(
4499 target_arch = "mips",
4500 target_arch = "mips32r6",
4501 target_arch = "mips64",
4502 target_arch = "mips64r6"
4503 )
4504 ),
4505 all(
4506 target_env = "gnu",
4507 target_os = "linux",
4508 any(target_arch = "powerpc", target_arch = "powerpc64")
4509 ),
4510 all(
4511 target_env = "musl",
4512 target_os = "linux",
4513 any(target_arch = "powerpc", target_arch = "powerpc64")
4514 ),
4515 all(
4516 target_os = "linux",
4517 any(target_arch = "sparc", target_arch = "sparc64"),
4518 not(target_env = "newlib")
4519 )
4520 ))]
4521 assert!((0..128).contains(&libc::RLIMIT_SIGPENDING));
4522
4523 #[cfg(any(
4524 target_os = "fuchsia",
4525 all(
4526 any(
4527 target_os = "aix",
4528 target_os = "android",
4529 target_os = "cygwin",
4530 target_os = "dragonfly",
4531 target_os = "emscripten",
4532 target_os = "freebsd",
4533 target_os = "haiku",
4534 target_os = "hurd",
4535 target_os = "illumos",
4536 target_os = "ios",
4537 target_os = "l4re",
4538 target_os = "macos",
4539 target_os = "netbsd",
4540 target_os = "nto",
4541 target_os = "openbsd",
4542 target_os = "redox",
4543 target_os = "solaris",
4544 target_os = "tvos",
4545 target_os = "visionos",
4546 target_os = "watchos"
4547 ),
4548 not(target_env = "newlib")
4549 ),
4550 all(
4551 target_os = "linux",
4552 any(target_env = "gnu", target_env = "uclibc"),
4553 not(any(
4554 target_arch = "mips",
4555 target_arch = "mips32r6",
4556 target_arch = "mips64",
4557 target_arch = "mips64r6",
4558 target_arch = "powerpc",
4559 target_arch = "powerpc64",
4560 target_arch = "sparc",
4561 target_arch = "sparc64"
4562 ))
4563 ),
4564 all(
4565 target_os = "linux",
4566 any(target_env = "musl", target_env = "ohos"),
4567 not(any(
4568 target_arch = "mips",
4569 target_arch = "mips32r6",
4570 target_arch = "mips64",
4571 target_arch = "mips64r6",
4572 target_arch = "powerpc",
4573 target_arch = "powerpc64",
4574 target_arch = "sparc",
4575 target_arch = "sparc64"
4576 ))
4577 ),
4578 all(
4579 target_os = "linux",
4580 any(
4581 target_arch = "mips",
4582 target_arch = "mips32r6",
4583 target_arch = "mips64",
4584 target_arch = "mips64r6"
4585 ),
4586 any(target_env = "gnu", target_env = "uclibc")
4587 ),
4588 all(
4589 target_env = "musl",
4590 target_os = "linux",
4591 any(
4592 target_arch = "mips",
4593 target_arch = "mips32r6",
4594 target_arch = "mips64",
4595 target_arch = "mips64r6"
4596 )
4597 ),
4598 all(
4599 target_env = "gnu",
4600 target_os = "linux",
4601 any(target_arch = "powerpc", target_arch = "powerpc64")
4602 ),
4603 all(
4604 target_env = "musl",
4605 target_os = "linux",
4606 any(target_arch = "powerpc", target_arch = "powerpc64")
4607 ),
4608 all(
4609 target_os = "linux",
4610 any(target_arch = "sparc", target_arch = "sparc64"),
4611 not(target_env = "newlib")
4612 )
4613 ))]
4614 assert!((0..128).contains(&libc::RLIMIT_STACK));
4615
4616 #[cfg(all(target_os = "freebsd", not(target_env = "newlib")))]
4617 assert!((0..128).contains(&libc::RLIMIT_SWAP));
4618
4619 #[cfg(all(target_os = "aix", not(target_env = "newlib")))]
4620 assert!((0..128).contains(&libc::RLIMIT_THREADS));
4621
4622 #[cfg(all(target_os = "freebsd", not(target_env = "newlib")))]
4623 assert!((0..128).contains(&libc::RLIMIT_UMTXP));
4624
4625 #[cfg(all(
4626 any(
4627 target_os = "dragonfly",
4628 target_os = "freebsd",
4629 target_os = "hurd",
4630 target_os = "illumos",
4631 target_os = "nto",
4632 target_os = "solaris"
4633 ),
4634 not(target_env = "newlib")
4635 ))]
4636 assert!((0..128).contains(&libc::RLIMIT_VMEM));
4637 }
4638 }