]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #20874 - klutzy:windows-dynamic-lib, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 19 Jan 2015 10:19:23 +0000 (10:19 +0000)
committerbors <bors@rust-lang.org>
Mon, 19 Jan 2015 10:19:23 +0000 (10:19 +0000)
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.


Trivial merge