about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorklutzy <klutzytheklutzy@gmail.com>2015-01-10 22:53:22 +0900
committerklutzy <klutzytheklutzy@gmail.com>2015-01-19 00:12:45 +0900
commitd053ccb45fafc12a52629f209122c1ce9bbfabed (patch)
treef51caa00a27c5f369b7044f54ea2c5539793e3b1 /src/rustllvm/RustWrapper.cpp
parentdcaeb6aa23ecba2dc2af870668a9239136d20fa3 (diff)
downloadrust-d053ccb45fafc12a52629f209122c1ce9bbfabed.tar.gz
rust-d053ccb45fafc12a52629f209122c1ce9bbfabed.zip
std::dynamic_lib: Fix Windows error handling
This is a [breaking-change] since `std::dynamic_lib::dl` is now
private.

When `LoadLibraryW()` fails, original code called `errno()` to get error
code.  However, there was local allocation of `Vec` before
`LoadLibraryW()`, and it drops before `errno()`, and the drop
(deallocation) changed `errno`! Therefore `dynamic_lib::open()` thought
it always succeeded.
This commit fixes the issue.

This commit also sets Windows error mode during `LoadLibrary()` to
prevent "dll load failed" dialog.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions