Trying to fix issues

This commit is contained in:
Syrus
2019-05-24 13:30:41 -07:00
parent dd9c5774f3
commit dd30595358
2 changed files with 11 additions and 6 deletions

View File

@ -205,7 +205,6 @@ pub fn ___syscall85(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> i32 {
let buf = varargs.get_str(ctx);
// let buf_addr: i32 = varargs.get(ctx);
let buf_size: i32 = varargs.get(ctx);
let fd = 3;
let ret = unsafe { read(fd, buf as _, buf_size as _) as i32 };
debug!(
@ -214,7 +213,6 @@ pub fn ___syscall85(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> i32 {
buf_size,
ret
);
// let ret = unsafe {
// readlink(path, buf as _, buf_size as _) as i32
// };
@ -225,7 +223,6 @@ pub fn ___syscall85(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> i32 {
// // buf,
// buf_size,
// ret);
ret
}

View File

@ -17,8 +17,6 @@ type clockid_t = c_int;
extern "C" {
#[link_name = "time"]
pub fn libc_time(s: *const time_t) -> time_t;
#[link_name = "timegm"]
pub fn libc_timegm(s: *const time_t) -> time_t;
}
use time;
@ -301,7 +299,8 @@ pub fn _time(ctx: &mut Ctx, time_p: u32) -> i32 {
}
/// emscripten: _timegm
pub fn _timegm(ctx: &mut Ctx, time_ptr: u32) -> i32 {
#[cfg(not(target_os = "windows"))]
pub fn _timegm(ctx: &mut Ctx, time_ptr: c_int) -> i32 {
debug!("emscripten::_timegm {}", time_ptr);
unsafe {
@ -310,6 +309,15 @@ pub fn _timegm(ctx: &mut Ctx, time_ptr: u32) -> i32 {
}
}
#[cfg(target_os = "windows")]
pub fn _timegm(ctx: &mut Ctx, time_ptr: c_int) -> i32 {
debug!(
"emscripten::_timegm - UNIMPLEMENTED IN WINDOWS {}",
time_ptr
);
-1
}
/// emscripten: _strftime
pub fn _strftime(
ctx: &mut Ctx,