Fix lint errors and windows build

This commit is contained in:
Syrus
2019-06-13 20:46:05 +02:00
parent 8829e1d901
commit 1560849e40
7 changed files with 50 additions and 15 deletions

View File

@ -1,6 +1,7 @@
extern crate libc;
extern crate wasmer_runtime_core;
#[cfg(unix)]
use std::convert::TryInto;
use wasmer_runtime_core::vm::Ctx;
@ -49,12 +50,14 @@ pub fn killpg(_ctx: &mut Ctx, _a: i32, _b: i32) -> i32 {
0
}
#[cfg(unix)]
pub fn pathconf(ctx: &mut Ctx, path_ptr: i32, name: i32) -> i32 {
let path = emscripten_memory_pointer!(ctx.memory(0), path_ptr) as *const i8;
unsafe { libc::pathconf(path, name).try_into().unwrap() }
}
unsafe {
libc::pathconf(path, name).try_into().unwrap()
}
#[cfg(not(unix))]
pub fn pathconf(ctx: &mut Ctx, path_ptr: i32, name: i32) -> i32 {
}
pub fn setpwent(_ctx: &mut Ctx) {