Skip to content

Commit e5fd61e

Browse files
committed
Auto merge of rust-lang#653 - redox-os:redox, r=alexcrichton
Add read/write to Redox These functions are required for alloc_system now
2 parents 21101f9 + 7d57f03 commit e5fd61e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/redox.rs

+8
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,16 @@ s! {
4848
}
4949
}
5050

51+
pub const STDIN_FILENO: ::c_int = 0;
52+
pub const STDOUT_FILENO: ::c_int = 1;
53+
pub const STDERR_FILENO: ::c_int = 2;
54+
5155
extern {
5256
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
57+
pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t)
58+
-> ::ssize_t;
59+
pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
60+
-> ::ssize_t;
5361
}
5462

5563
#[link(name = "c")]

0 commit comments

Comments
 (0)