Skip to content

Commit 91f6673

Browse files
committed
Add experimental newlib bindings
1 parent 77e0da5 commit 91f6673

File tree

3 files changed

+616
-0
lines changed

3 files changed

+616
-0
lines changed

src/unix/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ cfg_if! {
252252
#[link(name = "c")]
253253
#[link(name = "mxio")]
254254
extern {}
255+
} else if #[cfg(target_env = "newlib")] {
256+
#[link(name = "c")]
257+
#[link(name = "m")]
258+
extern {}
255259
} else {
256260
#[link(name = "c")]
257261
#[link(name = "m")]
@@ -888,6 +892,9 @@ cfg_if! {
888892
if #[cfg(target_env = "uclibc")] {
889893
mod uclibc;
890894
pub use self::uclibc::*;
895+
} else if #[cfg(target_env = "newlib")] {
896+
mod newlib;
897+
pub use self::newlib::*;
891898
} else if #[cfg(any(target_os = "linux",
892899
target_os = "android",
893900
target_os = "emscripten",

src/unix/newlib/arm/mod.rs

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

0 commit comments

Comments
 (0)