1pub type c_schar = i8;
10pub type c_uchar = u8;
11pub type c_short = i16;
12pub type c_ushort = u16;
13
14pub type c_longlong = i64;
15pub type c_ulonglong = u64;
16
17pub type c_float = f32;
18pub type c_double = f64;
19
20cfg_if! {
21 if #[cfg(all(
22 not(windows),
23 not(target_vendor = "apple"),
24 not(target_os = "vita"),
25 any(
26 target_arch = "aarch64",
27 target_arch = "arm",
28 target_arch = "csky",
29 target_arch = "hexagon",
30 target_arch = "msp430",
31 target_arch = "powerpc",
32 target_arch = "powerpc64",
33 target_arch = "riscv32",
34 target_arch = "riscv64",
35 target_arch = "s390x",
36 target_arch = "xtensa",
37 )
38 ))] {
39 pub type c_char = u8;
40 } else {
41 pub type c_char = i8;
43 }
44}
45
46cfg_if! {
47 if #[cfg(any(target_arch = "avr", target_arch = "msp430"))] {
48 pub type c_int = i16;
49 pub type c_uint = u16;
50 } else {
51 pub type c_int = i32;
52 pub type c_uint = u32;
53 }
54}
55
56cfg_if! {
57 if #[cfg(all(target_pointer_width = "64", not(windows)))] {
58 pub type c_long = i64;
59 pub type c_ulong = u64;
60 } else {
61 pub type c_long = i32;
63 pub type c_ulong = u32;
64 }
65}
66
67#[deprecated(since = "0.2.55", note = "Use i8 instead.")]
68pub type int8_t = i8;
69#[deprecated(since = "0.2.55", note = "Use i16 instead.")]
70pub type int16_t = i16;
71#[deprecated(since = "0.2.55", note = "Use i32 instead.")]
72pub type int32_t = i32;
73#[deprecated(since = "0.2.55", note = "Use i64 instead.")]
74pub type int64_t = i64;
75#[deprecated(since = "0.2.55", note = "Use u8 instead.")]
76pub type uint8_t = u8;
77#[deprecated(since = "0.2.55", note = "Use u16 instead.")]
78pub type uint16_t = u16;
79#[deprecated(since = "0.2.55", note = "Use u32 instead.")]
80pub type uint32_t = u32;
81#[deprecated(since = "0.2.55", note = "Use u64 instead.")]
82pub type uint64_t = u64;
83
84cfg_if! {
85 if #[cfg(all(target_arch = "aarch64", not(target_os = "windows")))] {
86 pub type __int128 = i128;
88 pub type __uint128 = u128;
90 pub type __int128_t = i128;
92 pub type __uint128_t = u128;
94 }
95}