mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-27 23:51:33 +00:00
fix master; add some emscripten calls
This commit is contained in:
@ -23,3 +23,8 @@ pub fn ___cxa_begin_catch(_ctx: &mut Ctx, _exception_object_ptr: u32) -> i32 {
|
||||
pub fn ___cxa_end_catch(_ctx: &mut Ctx) {
|
||||
debug!("emscripten::___cxa_end_catch");
|
||||
}
|
||||
|
||||
pub fn ___cxa_uncaught_exception(_ctx: &mut Ctx) -> i32 {
|
||||
debug!("emscripten::___cxa_uncaught_exception");
|
||||
-1
|
||||
}
|
||||
|
@ -607,6 +607,7 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
|
||||
"___cxa_throw" => func!(crate::exception::___cxa_throw),
|
||||
"___cxa_begin_catch" => func!(crate::exception::___cxa_begin_catch),
|
||||
"___cxa_end_catch" => func!(crate::exception::___cxa_end_catch),
|
||||
"___cxa_uncaught_exception" => func!(crate::exception::___cxa_uncaught_exception),
|
||||
|
||||
// Time
|
||||
"_gettimeofday" => func!(crate::time::_gettimeofday),
|
||||
@ -619,6 +620,7 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
|
||||
"_localtime" => func!(crate::time::_localtime),
|
||||
"_time" => func!(crate::time::_time),
|
||||
"_strftime" => func!(crate::time::_strftime),
|
||||
"_strftime_l" => func!(crate::time::_strftime_l),
|
||||
"_localtime_r" => func!(crate::time::_localtime_r),
|
||||
"_gmtime_r" => func!(crate::time::_gmtime_r),
|
||||
"_mktime" => func!(crate::time::_mktime),
|
||||
|
@ -310,3 +310,20 @@ pub fn _strftime(
|
||||
);
|
||||
0
|
||||
}
|
||||
|
||||
/// emscripten: _strftime_l
|
||||
pub fn _strftime_l(
|
||||
ctx: &mut Ctx,
|
||||
s_ptr: c_int,
|
||||
maxsize: u32,
|
||||
format_ptr: c_int,
|
||||
tm_ptr: c_int,
|
||||
_last: c_int,
|
||||
) -> i32 {
|
||||
debug!(
|
||||
"emscripten::_strftime_l {} {} {} {}",
|
||||
s_ptr, maxsize, format_ptr, tm_ptr
|
||||
);
|
||||
|
||||
_strftime(ctx, s_ptr, maxsize, format_ptr, tm_ptr)
|
||||
}
|
||||
|
Reference in New Issue
Block a user