1#![stable(feature = "core_ffi", since = "1.30.0")]
10#![allow(non_camel_case_types)]
11
12#[doc(inline)]
13#[stable(feature = "core_c_str", since = "1.64.0")]
14#[cfg(not(feature = "ferrocene_certified"))]
15pub use self::c_str::CStr;
16#[doc(inline)]
17#[stable(feature = "cstr_from_bytes_until_nul", since = "1.69.0")]
18#[cfg(not(feature = "ferrocene_certified"))]
19pub use self::c_str::FromBytesUntilNulError;
20#[doc(inline)]
21#[stable(feature = "core_c_str", since = "1.64.0")]
22#[cfg(not(feature = "ferrocene_certified"))]
23pub use self::c_str::FromBytesWithNulError;
24#[cfg(not(feature = "ferrocene_certified"))]
25use crate::fmt;
26
27#[stable(feature = "c_str_module", since = "1.88.0")]
28#[cfg(not(feature = "ferrocene_certified"))]
29pub mod c_str;
30
31#[unstable(
32 feature = "c_variadic",
33 issue = "44930",
34 reason = "the `c_variadic` feature has not been properly tested on all supported platforms"
35)]
36#[cfg(not(feature = "ferrocene_certified"))]
37pub use self::va_list::{VaArgSafe, VaList, VaListImpl};
38
39#[unstable(
40 feature = "c_variadic",
41 issue = "44930",
42 reason = "the `c_variadic` feature has not been properly tested on all supported platforms"
43)]
44#[cfg(not(feature = "ferrocene_certified"))]
45pub mod va_list;
46
47mod primitives;
48#[stable(feature = "core_ffi_c", since = "1.64.0")]
49pub use self::primitives::{
50 c_char, c_double, c_float, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint,
51 c_ulong, c_ulonglong, c_ushort,
52};
53#[unstable(feature = "c_size_t", issue = "88345")]
54pub use self::primitives::{c_ptrdiff_t, c_size_t, c_ssize_t};
55
56#[doc = include_str!("c_void.md")]
65#[lang = "c_void"]
66#[repr(u8)]
67#[stable(feature = "core_c_void", since = "1.30.0")]
68pub enum c_void {
69 #[unstable(
70 feature = "c_void_variant",
71 reason = "temporary implementation detail",
72 issue = "none"
73 )]
74 #[doc(hidden)]
75 __variant1,
76 #[unstable(
77 feature = "c_void_variant",
78 reason = "temporary implementation detail",
79 issue = "none"
80 )]
81 #[doc(hidden)]
82 __variant2,
83}
84
85#[stable(feature = "std_debug", since = "1.16.0")]
86#[cfg(not(feature = "ferrocene_certified"))]
87impl fmt::Debug for c_void {
88 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
89 f.debug_struct("c_void").finish()
90 }
91}
92
93#[cfg(all(windows, target_env = "msvc"))]
95#[link(
96 name = "/defaultlib:msvcrt",
97 modifiers = "+verbatim",
98 cfg(not(target_feature = "crt-static"))
99)]
100#[link(name = "/defaultlib:libcmt", modifiers = "+verbatim", cfg(target_feature = "crt-static"))]
101#[cfg(not(feature = "ferrocene_certified"))]
102unsafe extern "C" {}