Skip to content

Commit d81d5c3

Browse files
committed
Auto merge of #1408 - BaoshanPang:vxworks, r=gnzlbg
Support Vxworks Define the C interface to VxWorks
2 parents 231ac68 + 4e3fcdd commit d81d5c3

File tree

10 files changed

+2352
-0
lines changed

10 files changed

+2352
-0
lines changed

ci/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ x86_64-unknown-haiku \
224224
x86_64-unknown-hermit \
225225
x86_64-unknown-l4re-uclibc \
226226
x86_64-unknown-openbsd \
227+
armv7-wrs-vxworks \
228+
aarch64-wrs-vxworks \
229+
i686-wrs-vxworks \
230+
x86_64-wrs-vxworks \
231+
powerpc-wrs-vxworks \
232+
powerpc-wrs-vxworks-spe \
233+
powerpc64-wrs-vxworks \
227234
"
228235

229236
if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ cfg_if! {
114114

115115
mod switch;
116116
pub use switch::*;
117+
} else if #[cfg(target_os = "vxworks")] {
118+
mod fixed_width_ints;
119+
pub use fixed_width_ints::*;
120+
121+
mod vxworks;
122+
pub use vxworks::*;
117123
} else if #[cfg(unix)] {
118124
mod fixed_width_ints;
119125
pub use fixed_width_ints::*;

src/vxworks/aarch64.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub type c_char = u8;
2+
pub type c_long = i64;
3+
pub type c_ulong = u64;

src/vxworks/arm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub type c_char = u8;
2+
pub type c_long = i32;
3+
pub type c_ulong = u32;

src/vxworks/armv7.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub type c_long = i32;
2+
pub type c_ulong = u32;

0 commit comments

Comments
 (0)