Skip to content

Commit

Permalink
Add experimental newlib bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
FenrirWolf committed Jul 6, 2017
1 parent 77e0da5 commit 91f6673
Show file tree
Hide file tree
Showing 3 changed files with 616 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ cfg_if! {
#[link(name = "c")]
#[link(name = "mxio")]
extern {}
} else if #[cfg(target_env = "newlib")] {
#[link(name = "c")]
#[link(name = "m")]
extern {}
} else {
#[link(name = "c")]
#[link(name = "m")]
Expand Down Expand Up @@ -888,6 +892,9 @@ cfg_if! {
if #[cfg(target_env = "uclibc")] {
mod uclibc;
pub use self::uclibc::*;
} else if #[cfg(target_env = "newlib")] {
mod newlib;
pub use self::newlib::*;
} else if #[cfg(any(target_os = "linux",
target_os = "android",
target_os = "emscripten",
Expand Down
5 changes: 5 additions & 0 deletions src/unix/newlib/arm/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pub type c_char = u8;
pub type wchar_t = u32;

pub type c_long = i32;
pub type c_ulong = u32;
Loading

0 comments on commit 91f6673

Please sign in to comment.