Skip to content

Commit a3701d9

Browse files
tylerwhalltomtom5152
authored andcommitted
zephyr: add long and ulong
1 parent 2cc4925 commit a3701d9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/zephyr/mod.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,20 @@ pub type c_short = i16;
2222
pub type c_ushort = u16;
2323
pub type c_int = i32;
2424
pub type c_uint = u32;
25-
pub type c_float = f32;
26-
pub type c_double = f64;
25+
#[cfg(target_pointer_width = "32")]
26+
pub type c_long = i32;
27+
#[cfg(target_pointer_width = "32")]
28+
pub type c_ulong = u32;
29+
#[cfg(target_pointer_width = "64")]
30+
pub type c_long = i64;
31+
#[cfg(target_pointer_width = "64")]
32+
pub type c_ulong = u64;
2733
pub type c_longlong = i64;
2834
pub type c_ulonglong = u64;
2935
pub type intmax_t = i64;
3036
pub type uintmax_t = u64;
37+
pub type c_float = f32;
38+
pub type c_double = f64;
3139

3240
pub type size_t = usize;
3341
pub type ptrdiff_t = isize;

0 commit comments

Comments
 (0)