mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 05:31:32 +00:00
Trying to fix issues
This commit is contained in:
@ -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 = varargs.get_str(ctx);
|
||||||
// let buf_addr: i32 = varargs.get(ctx);
|
// let buf_addr: i32 = varargs.get(ctx);
|
||||||
let buf_size: i32 = varargs.get(ctx);
|
let buf_size: i32 = varargs.get(ctx);
|
||||||
|
|
||||||
let fd = 3;
|
let fd = 3;
|
||||||
let ret = unsafe { read(fd, buf as _, buf_size as _) as i32 };
|
let ret = unsafe { read(fd, buf as _, buf_size as _) as i32 };
|
||||||
debug!(
|
debug!(
|
||||||
@ -214,7 +213,6 @@ pub fn ___syscall85(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> i32 {
|
|||||||
buf_size,
|
buf_size,
|
||||||
ret
|
ret
|
||||||
);
|
);
|
||||||
|
|
||||||
// let ret = unsafe {
|
// let ret = unsafe {
|
||||||
// readlink(path, buf as _, buf_size as _) as i32
|
// 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,
|
||||||
// buf_size,
|
// buf_size,
|
||||||
// ret);
|
// ret);
|
||||||
|
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@ type clockid_t = c_int;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#[link_name = "time"]
|
#[link_name = "time"]
|
||||||
pub fn libc_time(s: *const time_t) -> time_t;
|
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;
|
use time;
|
||||||
@ -301,7 +299,8 @@ pub fn _time(ctx: &mut Ctx, time_p: u32) -> i32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// emscripten: _timegm
|
/// 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);
|
debug!("emscripten::_timegm {}", time_ptr);
|
||||||
|
|
||||||
unsafe {
|
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
|
/// emscripten: _strftime
|
||||||
pub fn _strftime(
|
pub fn _strftime(
|
||||||
ctx: &mut Ctx,
|
ctx: &mut Ctx,
|
||||||
|
Reference in New Issue
Block a user