Skip to content

Commit e218703

Browse files
committed
transpile: add cases for macOS header typedefs
1 parent 47a12a4 commit e218703

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

c2rust-transpile/src/c_ast/conversion.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,6 +1980,11 @@ impl ConversionContext {
19801980
"__int32_t" => CTypeKind::Int32,
19811981
"__int64_t" => CTypeKind::Int64,
19821982
"__int128_t" => CTypeKind::Int128,
1983+
// on darwin, stdint.h typedefs uintN_t from u_intN_t:
1984+
"u_int8_t" => CTypeKind::UInt8,
1985+
"u_int16_t" => CTypeKind::UInt16,
1986+
"u_int32_t" => CTypeKind::UInt32,
1987+
"u_int64_t" => CTypeKind::UInt64,
19831988
_ => {
19841989
eprintln!("Unknown fixed-size type typedef {name}!");
19851990
return None;

0 commit comments

Comments
 (0)