this.write_scalar(Scalar::from_int(result, dest.layout.size), dest)?;
}
+ // Other shims
"posix_memalign" => {
let ret = this.deref_operand(args[0])?;
let align = this.read_scalar(args[1])?.to_machine_usize(this)?;
this.write_scalar(Scalar::from_int(result, dest.layout.size), dest)?;
}
+ // Other shims
"pthread_getattr_np" => {
this.write_null(dest)?;
}
this.write_scalar(Scalar::from_int(result, dest.layout.size), dest)?;
}
- // macOS API stubs.
+ // Other shims
"pthread_attr_get_np" => {
this.write_null(dest)?;
}
let tcx = &{ this.tcx.tcx };
match link_name {
+ // Windows API stubs.
+ // HANDLE = isize
+ // DWORD = ULONG = u32
+ // BOOL = i32
+
// Environment related shims
"GetEnvironmentVariableW" => {
// args[0] : LPCWSTR lpName (32-bit ptr to a const string of 16-bit Unicode chars)
dest,
)?;
}
- // Windows API stubs.
- // HANDLE = isize
- // DWORD = ULONG = u32
- // BOOL = i32
+
+ // Other shims
"GetProcessHeap" => {
// Just fake a HANDLE
this.write_scalar(Scalar::from_int(1, this.pointer_size()), dest)?;