Update case of basetsd.h import to support cross compilation

This commit is contained in:
David Tolnay 2020-09-16 11:50:04 -04:00
parent a76da17211
commit da38b7c2a5
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 5 additions and 5 deletions

View File

@ -61,7 +61,7 @@ pub struct Includes {
pub type_traits: bool,
pub utility: bool,
pub vector: bool,
pub base_tsd: bool,
pub basetsd: bool,
}
impl Includes {
@ -122,9 +122,9 @@ impl Display for Includes {
if self.vector {
writeln!(f, "#include <vector>")?;
}
if self.base_tsd {
if self.basetsd {
writeln!(f, "#if defined(_WIN32)")?;
writeln!(f, "#include <BaseTsd.h>")?;
writeln!(f, "#include <basetsd.h>")?;
writeln!(f, "#endif")?;
}
Ok(())

View File

@ -177,7 +177,7 @@ fn write_include_cxxbridge(out: &mut OutFile, apis: &[Api], types: &Types) {
needs_rust_slice = true;
}
ty if ty == Isize => {
out.include.base_tsd = true;
out.include.basetsd = true;
needs_rust_isize = true;
}
ty if ty == RustString => {

View File

@ -11,7 +11,7 @@
#include <utility>
#include <vector>
#if defined(_WIN32)
#include <BaseTsd.h>
#include <basetsd.h>
#endif
namespace rust {