diff options
author | bors <bors@rust-lang.org> | 2018-07-17 13:47:45 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2018-07-17 13:47:45 +0000 |
commit | 5ac35c85fe58fa177ef00d4216cf9aa86eae7c4e (patch) | |
tree | 4dff1c5d46b2053dd9515f651b5dbabe41162024 /libc-test/build.rs | |
parent | 73c02637c4624eed576087b6c0aca91e3f94b383 (diff) | |
parent | ce4c1404a79c6509b3475e104a13e64993b846a6 (diff) | |
download | rust-libc-5ac35c85fe58fa177ef00d4216cf9aa86eae7c4e.tar.gz |
Auto merge of #1039 - alesharik:master, r=alexcrichton
Implement statfs for dragonfly, freebsd and openbsd
Diffstat (limited to 'libc-test/build.rs')
-rw-r--r-- | libc-test/build.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 795330ab3f..5164b16d18 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -343,7 +343,7 @@ fn main() { } } - cfg.type_name(move |ty, is_struct| { + cfg.type_name(move |ty, is_struct, is_union| { match ty { // Just pass all these through, no need for a "struct" prefix "FILE" | @@ -360,6 +360,10 @@ fn main() { // OSX calls this something else "sighandler_t" if bsdlike => "sig_t".to_string(), + t if is_union => { + format!("union {}", t) + } + t if t.ends_with("_t") => t.to_string(), // Windows uppercase structs don't have `struct` in front, there's a @@ -816,9 +820,10 @@ fn main() { cfg.skip_struct(|s| { s != "termios2" }); - cfg.type_name(move |ty, is_struct| { + cfg.type_name(move |ty, is_struct, is_union| { match ty { t if is_struct => format!("struct {}", t), + t if is_union => format!("union {}", t), t => t.to_string(), } }); |