From aa2cb8216b05eb44f23e02bea4e1bccd0f858bfe Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 1 Jan 2016 16:05:30 -0800 Subject: [PATCH] Add libc::c_bool type. --- libc-test/build.rs | 4 +++- src/lib.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index f94f7051faf29..b9a1373dafdae 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -36,6 +36,7 @@ fn main() { cfg.header("errno.h") .header("fcntl.h") .header("limits.h") + .header("stdbool.h") .header("stddef.h") .header("stdint.h") .header("stdio.h") @@ -241,7 +242,8 @@ fn main() { "LARGE_INTEGER" | "mach_timebase_info_data_t" | "float" | - "double" => true, + "double" | + "c_bool" => true, n if n.starts_with("pthread") => true, // windows-isms diff --git a/src/lib.rs b/src/lib.rs index 3f3133fafc731..1eacdfc8da058 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -109,6 +109,7 @@ pub type uint16_t = u16; pub type uint32_t = u32; pub type uint64_t = u64; +pub type c_bool = bool; pub type c_schar = i8; pub type c_uchar = u8; pub type c_short = i16;