]>
git.proxmox.com Git - rustc.git/blob - vendor/libc/src/lib.rs
1 //! libc - Raw FFI bindings to platforms' system libraries
3 //! [Documentation for other platforms][pd].
5 //! [pd]: https://rust-lang.github.io/libc/#platform-specific-documentation
6 #![crate_name = "libc"]
7 #![crate_type = "rlib"]
8 // FIXME: Remove this and redundant_semicolon once renamed lint reaches stable.
9 #![allow(renamed_and_removed_lints)]
18 #![cfg_attr(libc_deny_warnings, deny(warnings))]
19 // Attributes needed when building as part of the standard library
21 feature
= "rustc-dep-of-std",
22 feature(cfg_target_vendor
, link_cfg
, no_core
)
24 #![cfg_attr(libc_thread_local, feature(thread_local))]
25 // Enable extra lints:
26 #![cfg_attr(feature = "extra_traits", deny(missing_debug_implementations))]
27 #![deny(missing_copy_implementations, safe_packed_borrows)]
29 #![cfg_attr(feature = "rustc-dep-of-std", no_core)]
30 #![cfg_attr(target_os = "redox", feature(static_nobundle))]
31 #![cfg_attr(libc_const_extern_fn, feature(const_extern_fn))]
37 if #[cfg(feature = "rustc-dep-of-std")] {
38 extern crate rustc_std_workspace_core
as core
;
39 #[allow(unused_imports)]
41 #[allow(unused_imports)]
47 if #[cfg(libc_priv_mod_use)] {
48 #[cfg(libc_core_cvoid)]
49 #[allow(unused_imports)]
51 #[allow(unused_imports)]
53 #[allow(unused_imports)]
55 #[allow(unused_imports)]
57 #[allow(unused_imports)]
60 #[allow(unused_imports)]
61 use core
::clone
::Clone
;
63 #[allow(unused_imports)]
64 use core
::marker
::Copy
;
66 #[allow(unused_imports)]
67 use core
::option
::Option
;
70 #[allow(unused_imports)]
73 #[allow(unused_imports)]
76 #[allow(unused_imports)]
79 #[allow(unused_imports)]
82 #[allow(unused_imports)]
83 pub use core
::clone
::Clone
;
85 #[allow(unused_imports)]
86 pub use core
::marker
::Copy
;
88 #[allow(unused_imports)]
89 pub use core
::option
::Option
;
96 pub use fixed_width_ints
::*;
100 } else if #[cfg(target_os = "cloudabi")] {
101 mod fixed_width_ints
;
102 pub use fixed_width_ints
::*;
106 } else if #[cfg(target_os = "fuchsia")] {
107 mod fixed_width_ints
;
108 pub use fixed_width_ints
::*;
112 } else if #[cfg(target_os = "switch")] {
113 mod fixed_width_ints
;
114 pub use fixed_width_ints
::*;
118 } else if #[cfg(target_os = "vxworks")] {
119 mod fixed_width_ints
;
120 pub use fixed_width_ints
::*;
124 } else if #[cfg(unix)] {
125 mod fixed_width_ints
;
126 pub use fixed_width_ints
::*;
130 } else if #[cfg(target_os = "hermit")] {
131 mod fixed_width_ints
;
132 pub use fixed_width_ints
::*;
136 } else if #[cfg(all(target_env = "sgx", target_vendor = "fortanix"))] {
137 mod fixed_width_ints
;
138 pub use fixed_width_ints
::*;
142 } else if #[cfg(any(target_env = "wasi", target_os = "wasi"))] {
143 mod fixed_width_ints
;
144 pub use fixed_width_ints
::*;
149 // non-supported targets: empty...