Auto merge of #1408 - BaoshanPang:vxworks, r=gnzlbg

Support Vxworks

Define the C interface to VxWorks
This commit is contained in:
bors 2019-08-10 14:09:56 +00:00
commit 9b09188dee
10 changed files with 2352 additions and 0 deletions

View File

@ -224,6 +224,13 @@ x86_64-unknown-haiku \
x86_64-unknown-hermit \
x86_64-unknown-l4re-uclibc \
x86_64-unknown-openbsd \
armv7-wrs-vxworks \
aarch64-wrs-vxworks \
i686-wrs-vxworks \
x86_64-wrs-vxworks \
powerpc-wrs-vxworks \
powerpc-wrs-vxworks-spe \
powerpc64-wrs-vxworks \
"
if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then

View File

@ -114,6 +114,12 @@ cfg_if! {
mod switch;
pub use switch::*;
} else if #[cfg(target_os = "vxworks")] {
mod fixed_width_ints;
pub use fixed_width_ints::*;
mod vxworks;
pub use vxworks::*;
} else if #[cfg(unix)] {
mod fixed_width_ints;
pub use fixed_width_ints::*;

3
src/vxworks/aarch64.rs Normal file
View File

@ -0,0 +1,3 @@
pub type c_char = u8;
pub type c_long = i64;
pub type c_ulong = u64;

3
src/vxworks/arm.rs Normal file
View File

@ -0,0 +1,3 @@
pub type c_char = u8;
pub type c_long = i32;
pub type c_ulong = u32;

2
src/vxworks/armv7.rs Normal file
View File

@ -0,0 +1,2 @@
pub type c_long = i32;
pub type c_ulong = u32;

2319
src/vxworks/mod.rs Executable file

File diff suppressed because it is too large Load Diff

3
src/vxworks/powerpc.rs Normal file
View File

@ -0,0 +1,3 @@
pub type c_char = u8;
pub type c_long = i32;
pub type c_ulong = u32;

3
src/vxworks/powerpc64.rs Normal file
View File

@ -0,0 +1,3 @@
pub type c_char = u8;
pub type c_long = i64;
pub type c_ulong = u64;

3
src/vxworks/x86.rs Normal file
View File

@ -0,0 +1,3 @@
pub type c_char = i8;
pub type c_long = i32;
pub type c_ulong = u32;

3
src/vxworks/x86_64.rs Normal file
View File

@ -0,0 +1,3 @@
pub type c_long = i64;
pub type c_ulong = u64;
pub type c_char = i8;