mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
add more functions for sqlite compiled from config src
This commit is contained in:
parent
2969989ecd
commit
3500d5a7c7
@ -283,6 +283,9 @@ pub fn nullFunc_iiij(_ctx: &mut Ctx, _index: i32) {
|
|||||||
pub fn nullFunc_iijii(_ctx: &mut Ctx, _index: i32) {
|
pub fn nullFunc_iijii(_ctx: &mut Ctx, _index: i32) {
|
||||||
debug!("emscripten::nullFunc_iijii");
|
debug!("emscripten::nullFunc_iijii");
|
||||||
}
|
}
|
||||||
|
pub fn nullFunc_iijj(_ctx: &mut Ctx, _index: i32) {
|
||||||
|
debug!("emscripten::nullFunc_iijj");
|
||||||
|
}
|
||||||
pub fn nullFunc_iiiiji(_ctx: &mut Ctx, _index: i32) {
|
pub fn nullFunc_iiiiji(_ctx: &mut Ctx, _index: i32) {
|
||||||
debug!("emscripten::nullFunc_iiiiji");
|
debug!("emscripten::nullFunc_iiiiji");
|
||||||
}
|
}
|
||||||
@ -337,11 +340,14 @@ pub fn nullFunc_viiijiiiiii(_ctx: &mut Ctx, _index: i32) {
|
|||||||
pub fn nullFunc_viij(_ctx: &mut Ctx, _index: i32) {
|
pub fn nullFunc_viij(_ctx: &mut Ctx, _index: i32) {
|
||||||
debug!("emscripten::nullFunc_viij");
|
debug!("emscripten::nullFunc_viij");
|
||||||
}
|
}
|
||||||
|
pub fn nullFunc_viijii(_ctx: &mut Ctx, _index: i32) {
|
||||||
|
debug!("emscripten::nullFunc_viijii");
|
||||||
|
}
|
||||||
pub fn nullFunc_viiji(_ctx: &mut Ctx, _index: i32) {
|
pub fn nullFunc_viiji(_ctx: &mut Ctx, _index: i32) {
|
||||||
debug!("emscripten::nullFunc_viiji");
|
debug!("emscripten::nullFunc_viiji");
|
||||||
}
|
}
|
||||||
pub fn nullFunc_viijii(_ctx: &mut Ctx, _index: i32) {
|
pub fn nullFunc_vijii(_ctx: &mut Ctx, _index: i32) {
|
||||||
debug!("emscripten::nullFunc_viijii");
|
debug!("emscripten::nullFunc_vijii");
|
||||||
}
|
}
|
||||||
pub fn nullFunc_viijiii(_ctx: &mut Ctx, _index: i32) {
|
pub fn nullFunc_viijiii(_ctx: &mut Ctx, _index: i32) {
|
||||||
debug!("emscripten::nullFunc_viijiii");
|
debug!("emscripten::nullFunc_viijiii");
|
||||||
|
@ -515,6 +515,7 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
|
|||||||
"___syscall142" => func!(crate::syscalls::___syscall142),
|
"___syscall142" => func!(crate::syscalls::___syscall142),
|
||||||
"___syscall145" => func!(crate::syscalls::___syscall145),
|
"___syscall145" => func!(crate::syscalls::___syscall145),
|
||||||
"___syscall146" => func!(crate::syscalls::___syscall146),
|
"___syscall146" => func!(crate::syscalls::___syscall146),
|
||||||
|
"___syscall148" => func!(crate::syscalls::___syscall148),
|
||||||
"___syscall168" => func!(crate::syscalls::___syscall168),
|
"___syscall168" => func!(crate::syscalls::___syscall168),
|
||||||
"___syscall180" => func!(crate::syscalls::___syscall180),
|
"___syscall180" => func!(crate::syscalls::___syscall180),
|
||||||
"___syscall181" => func!(crate::syscalls::___syscall181),
|
"___syscall181" => func!(crate::syscalls::___syscall181),
|
||||||
@ -540,6 +541,7 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
|
|||||||
"___syscall272" => func!(crate::syscalls::___syscall272),
|
"___syscall272" => func!(crate::syscalls::___syscall272),
|
||||||
"___syscall295" => func!(crate::syscalls::___syscall295),
|
"___syscall295" => func!(crate::syscalls::___syscall295),
|
||||||
"___syscall300" => func!(crate::syscalls::___syscall300),
|
"___syscall300" => func!(crate::syscalls::___syscall300),
|
||||||
|
"___syscall324" => func!(crate::syscalls::___syscall324),
|
||||||
"___syscall330" => func!(crate::syscalls::___syscall330),
|
"___syscall330" => func!(crate::syscalls::___syscall330),
|
||||||
"___syscall334" => func!(crate::syscalls::___syscall334),
|
"___syscall334" => func!(crate::syscalls::___syscall334),
|
||||||
"___syscall340" => func!(crate::syscalls::___syscall340),
|
"___syscall340" => func!(crate::syscalls::___syscall340),
|
||||||
@ -685,6 +687,7 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
|
|||||||
"nullFunc_diiii" => func!(crate::emscripten_target::nullFunc_diiii),
|
"nullFunc_diiii" => func!(crate::emscripten_target::nullFunc_diiii),
|
||||||
"nullFunc_iiid" => func!(crate::emscripten_target::nullFunc_iiid),
|
"nullFunc_iiid" => func!(crate::emscripten_target::nullFunc_iiid),
|
||||||
"nullFunc_iiji" => func!(crate::emscripten_target::nullFunc_iiji),
|
"nullFunc_iiji" => func!(crate::emscripten_target::nullFunc_iiji),
|
||||||
|
"nullFunc_iijj" => func!(crate::emscripten_target::nullFunc_iijj),
|
||||||
"nullFunc_iij" => func!(crate::emscripten_target::nullFunc_iij),
|
"nullFunc_iij" => func!(crate::emscripten_target::nullFunc_iij),
|
||||||
"nullFunc_ij" => func!(crate::emscripten_target::nullFunc_ij),
|
"nullFunc_ij" => func!(crate::emscripten_target::nullFunc_ij),
|
||||||
"nullFunc_j" => func!(crate::emscripten_target::nullFunc_j),
|
"nullFunc_j" => func!(crate::emscripten_target::nullFunc_j),
|
||||||
@ -710,6 +713,7 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
|
|||||||
"nullFunc_viiijiiiiii" => func!(crate::emscripten_target::nullFunc_viiijiiiiii),
|
"nullFunc_viiijiiiiii" => func!(crate::emscripten_target::nullFunc_viiijiiiiii),
|
||||||
"nullFunc_viij" => func!(crate::emscripten_target::nullFunc_viij),
|
"nullFunc_viij" => func!(crate::emscripten_target::nullFunc_viij),
|
||||||
"nullFunc_viiji" => func!(crate::emscripten_target::nullFunc_viiji),
|
"nullFunc_viiji" => func!(crate::emscripten_target::nullFunc_viiji),
|
||||||
|
"nullFunc_vijii" => func!(crate::emscripten_target::nullFunc_vijii),
|
||||||
"nullFunc_viijii" => func!(crate::emscripten_target::nullFunc_viijii),
|
"nullFunc_viijii" => func!(crate::emscripten_target::nullFunc_viijii),
|
||||||
"nullFunc_viiiij" => func!(crate::emscripten_target::nullFunc_viiiij),
|
"nullFunc_viiiij" => func!(crate::emscripten_target::nullFunc_viiiij),
|
||||||
"nullFunc_viijiii" => func!(crate::emscripten_target::nullFunc_viijiii),
|
"nullFunc_viijiii" => func!(crate::emscripten_target::nullFunc_viijiii),
|
||||||
|
@ -36,6 +36,7 @@ use libc::{
|
|||||||
mode_t,
|
mode_t,
|
||||||
msghdr,
|
msghdr,
|
||||||
nice,
|
nice,
|
||||||
|
off_t,
|
||||||
open,
|
open,
|
||||||
pid_t,
|
pid_t,
|
||||||
pread,
|
pread,
|
||||||
@ -80,10 +81,11 @@ use std::mem;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn wait4(pid: pid_t, status: *mut c_int, options: c_int, rusage: *mut rusage) -> pid_t;
|
pub fn wait4(pid: pid_t, status: *mut c_int, options: c_int, rusage: *mut rusage) -> pid_t;
|
||||||
pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int;
|
pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int;
|
||||||
|
pub fn fdatasync(fd: c_int) -> c_int;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "macos"))]
|
||||||
use libc::{madvise, wait4};
|
use libc::{fallocate, fdatasync, madvise, wait4};
|
||||||
|
|
||||||
// Another conditional constant for name resolution: Macos et iOS use
|
// Another conditional constant for name resolution: Macos et iOS use
|
||||||
// SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket.
|
// SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket.
|
||||||
@ -709,6 +711,15 @@ pub fn ___syscall142(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_in
|
|||||||
unsafe { select(nfds, readfds_ptr, writefds_ptr, 0 as _, 0 as _) }
|
unsafe { select(nfds, readfds_ptr, writefds_ptr, 0 as _, 0 as _) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// fdatasync
|
||||||
|
pub fn ___syscall148(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
|
||||||
|
debug!("emscripten::___syscall148 (fdatasync) {}", _which);
|
||||||
|
|
||||||
|
let fd: i32 = varargs.get(ctx);
|
||||||
|
|
||||||
|
unsafe { fdatasync(fd) }
|
||||||
|
}
|
||||||
|
|
||||||
// setpgid
|
// setpgid
|
||||||
pub fn ___syscall57(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
|
pub fn ___syscall57(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
|
||||||
debug!("emscripten::___syscall57 (setpgid) {}", _which);
|
debug!("emscripten::___syscall57 (setpgid) {}", _which);
|
||||||
@ -726,3 +737,20 @@ pub fn ___syscall122(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_in
|
|||||||
let buf_addr = emscripten_memory_pointer!(ctx.memory(0), buf) as *mut utsname;
|
let buf_addr = emscripten_memory_pointer!(ctx.memory(0), buf) as *mut utsname;
|
||||||
unsafe { uname(buf_addr) }
|
unsafe { uname(buf_addr) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// fallocate
|
||||||
|
pub fn ___syscall324(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
|
||||||
|
debug!("emscripten::___syscall324 (fallocate) {}", _which);
|
||||||
|
let _fd: c_int = varargs.get(ctx);
|
||||||
|
let _mode: c_int = varargs.get(ctx);
|
||||||
|
let _offset: off_t = varargs.get(ctx);
|
||||||
|
let _len: off_t = varargs.get(ctx);
|
||||||
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
unsafe {
|
||||||
|
fallocate(_fd, _mode, _offset, _len)
|
||||||
|
}
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
{
|
||||||
|
unimplemented!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -216,6 +216,12 @@ pub fn ___syscall142(_ctx: &mut Ctx, which: c_int, mut _varargs: VarArgs) -> c_i
|
|||||||
-1
|
-1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// fdatasync
|
||||||
|
pub fn ___syscall148(_ctx: &mut Ctx, _which: c_int, _varargs: VarArgs) -> c_int {
|
||||||
|
debug!("emscripten::___syscall148 (fdatasync) {}", _which);
|
||||||
|
unimplemented!();
|
||||||
|
}
|
||||||
|
|
||||||
// setpgid
|
// setpgid
|
||||||
pub fn ___syscall57(_ctx: &mut Ctx, which: c_int, mut _varargs: VarArgs) -> c_int {
|
pub fn ___syscall57(_ctx: &mut Ctx, which: c_int, mut _varargs: VarArgs) -> c_int {
|
||||||
debug!("emscripten::___syscall57 (setpgid) {}", which);
|
debug!("emscripten::___syscall57 (setpgid) {}", which);
|
||||||
@ -238,3 +244,9 @@ pub fn ___syscall207(_ctx: &mut Ctx, _which: c_int, _varargs: VarArgs) -> c_int
|
|||||||
debug!("emscripten::___syscall207 (fchown) {}", _which);
|
debug!("emscripten::___syscall207 (fchown) {}", _which);
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// fallocate
|
||||||
|
pub fn ___syscall324(_ctx: &mut Ctx, _which: c_int, _varargs: VarArgs) -> c_int {
|
||||||
|
debug!("emscripten::___syscall324 (fallocate) {}", _which);
|
||||||
|
unimplemented!()
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user