Skip to content

Commit

Permalink
Auto merge of #1408 - BaoshanPang:vxworks, r=gnzlbg
Browse files Browse the repository at this point in the history
Support Vxworks

Define the C interface to VxWorks
  • Loading branch information
bors committed Aug 9, 2019
2 parents a9ab0f9 + 5c101cc commit a3a2e04
Show file tree
Hide file tree
Showing 10 changed files with 2,352 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ci/build.sh
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Expand Up @@ -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::*;
Expand Down
3 changes: 3 additions & 0 deletions src/vxworks/aarch64.rs
@@ -0,0 +1,3 @@
pub type c_char = u8;
pub type c_long = i64;
pub type c_ulong = u64;
3 changes: 3 additions & 0 deletions src/vxworks/arm.rs
@@ -0,0 +1,3 @@
pub type c_char = u8;
pub type c_long = i32;
pub type c_ulong = u32;
2 changes: 2 additions & 0 deletions src/vxworks/armv7.rs
@@ -0,0 +1,2 @@
pub type c_long = i32;
pub type c_ulong = u32;

0 comments on commit a3a2e04

Please sign in to comment.