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