core: Don't use printf in rtdebug!

The bots were showing a segfault that I can't reproduce. Assuming it's
varargs related so let's not use printf
This commit is contained in:
Brian Anderson 2013-03-12 15:40:32 -07:00
parent d30c758974
commit 723d2247c1

View file

@ -15,16 +15,10 @@ macro_rules! rtdebug_ (
dumb_println(fmt!( $($arg),+ ));
fn dumb_println(s: &str) {
use str::as_c_str;
use libc::c_char;
extern {
fn printf(s: *c_char);
}
do as_c_str(s.to_str() + "\n") |s| {
unsafe { printf(s); }
}
use io::WriterUtil;
let dbg = ::libc::STDERR_FILENO as ::io::fd_t;
dbg.write_str(s);
dbg.write_str("\n");
}
} )