mirror of
https://github.com/topjohnwu/cxx.git
synced 2024-11-24 04:20:02 +00:00
Update case of basetsd.h import to support cross compilation
This commit is contained in:
parent
a76da17211
commit
da38b7c2a5
@ -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(())
|
||||
|
@ -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 => {
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#if defined(_WIN32)
|
||||
#include <BaseTsd.h>
|
||||
#include <basetsd.h>
|
||||
#endif
|
||||
|
||||
namespace rust {
|
||||
|
Loading…
Reference in New Issue
Block a user