Skip to content

Commit aa2cb82

Browse files
committed
Add libc::c_bool type.
1 parent fb83189 commit aa2cb82

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

libc-test/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ fn main() {
3636
cfg.header("errno.h")
3737
.header("fcntl.h")
3838
.header("limits.h")
39+
.header("stdbool.h")
3940
.header("stddef.h")
4041
.header("stdint.h")
4142
.header("stdio.h")
@@ -241,7 +242,8 @@ fn main() {
241242
"LARGE_INTEGER" |
242243
"mach_timebase_info_data_t" |
243244
"float" |
244-
"double" => true,
245+
"double" |
246+
"c_bool" => true,
245247
n if n.starts_with("pthread") => true,
246248

247249
// windows-isms

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ pub type uint16_t = u16;
109109
pub type uint32_t = u32;
110110
pub type uint64_t = u64;
111111

112+
pub type c_bool = bool;
112113
pub type c_schar = i8;
113114
pub type c_uchar = u8;
114115
pub type c_short = i16;

0 commit comments

Comments
 (0)