Skip to content

Commit

Permalink
Auto merge of #653 - redox-os:redox, r=alexcrichton
Browse files Browse the repository at this point in the history
Add read/write to Redox

These functions are required for alloc_system now
  • Loading branch information
bors committed Jul 9, 2017
2 parents 21101f9 + 7d57f03 commit e5fd61e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/redox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,16 @@ s! {
}
}

pub const STDIN_FILENO: ::c_int = 0;
pub const STDOUT_FILENO: ::c_int = 1;
pub const STDERR_FILENO: ::c_int = 2;

extern {
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t)
-> ::ssize_t;
pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
-> ::ssize_t;
}

#[link(name = "c")]
Expand Down

0 comments on commit e5fd61e

Please sign in to comment.