Skip to content

Commit

Permalink
shim more Windows functions
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jul 13, 2018
1 parent 52ec21e commit 3f632d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/fn_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,14 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
// any non zero value works for the stdlib. This is just used for stackoverflows anyway
self.write_scalar(dest, Scalar::from_u128(1), usize)?;
},
"std::sys::windows::c::::GetModuleHandleW" |
"std::sys::windows::c::::GetProcAddress" |
"std::sys::windows::c::::SetLastError" |
"std::sys::windows::c::::GetLastError" => {
let usize = self.tcx.types.usize;
// pretend these do not exist/nothing happened, by returning zero
self.write_scalar(dest, Scalar::from_u128(0), usize)?;
},
_ => return err!(NoMirFor(path)),
}

Expand Down

0 comments on commit 3f632d9

Please sign in to comment.