Fixed Win64 build

This commit is contained in:
Vadim Chugunov 2014-03-19 00:42:02 -07:00
parent 6619134d49
commit f686e5ebff
7 changed files with 105 additions and 44 deletions

View file

@ -52,20 +52,9 @@ macro_rules! rtabort (
pub fn dumb_println(args: &fmt::Arguments) {
use std::io;
use libc;
use std::rt;
struct Stderr;
impl io::Writer for Stderr {
fn write(&mut self, data: &[u8]) -> io::IoResult<()> {
unsafe {
libc::write(libc::STDERR_FILENO,
data.as_ptr() as *libc::c_void,
data.len() as libc::size_t);
}
Ok(()) // just ignore the result
}
}
let mut w = Stderr;
let mut w = rt::Stderr;
let _ = fmt::writeln(&mut w as &mut io::Writer, args);
}