diff options
| author | bors <bors@rust-lang.org> | 2015-11-10 06:56:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-10 06:56:30 +0000 |
| commit | 6aee7c5d2c3e5796844671cf072487f6fb04cb9b (patch) | |
| tree | 955886bbc19c1ce0943377edf689ad4dd1842749 /src/libstd/sys/windows/stack_overflow.rs | |
| parent | 2968dfa28597e50b748b641f9b881c7012b041c6 (diff) | |
| parent | 3d28b8b98e6e4f55ef4ecd8babf0a050f48a3d11 (diff) | |
| download | rust-6aee7c5d2c3e5796844671cf072487f6fb04cb9b.tar.gz rust-6aee7c5d2c3e5796844671cf072487f6fb04cb9b.zip | |
Auto merge of #29546 - alexcrichton:new-libc, r=brson
This commit replaces the in-tree liblibc with the [external clone](https://github.com/rust-lang-nursery/libc) which has no evolved beyond the in-tree version in light of its [recent redesign](https://github.com/rust-lang/rfcs/pull/1291).
The primary changes here are:
* `src/liblibc/lib.rs` was deleted
* `src/liblibc` is now a submodule pointing at the external repository
* `src/libstd/sys/unix/{c.rs,sync.rs}` were both deleted having all bindings folded into the external liblibc.
* Many ad-hoc `extern` blocks in the standard library were removed in favor of bindings now being in the external liblibc.
* Many functions/types were added to `src/libstd/sys/windows/c.rs`, and the scattered definitions throughout the standard library were consolidated here.
At the API level this commit is **not a breaking change**, although it is only very lightly tested on the *BSD variants and is probably going to break almost all of their builds! Follow-up commits to liblibc should in theory be all that's necessary to get the build working on the *BSDs again.
Diffstat (limited to 'src/libstd/sys/windows/stack_overflow.rs')
| -rw-r--r-- | src/libstd/sys/windows/stack_overflow.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstd/sys/windows/stack_overflow.rs b/src/libstd/sys/windows/stack_overflow.rs index d1c2144ef0d..01317bec0de 100644 --- a/src/libstd/sys/windows/stack_overflow.rs +++ b/src/libstd/sys/windows/stack_overflow.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use libc::{self, LONG}; use sys_common::util::report_overflow; use sys::c; @@ -19,7 +18,7 @@ impl Handler { // This API isn't available on XP, so don't panic in that case and just // pray it works out ok. if c::SetThreadStackGuarantee(&mut 0x5000) == 0 { - if libc::GetLastError() as u32 != libc::ERROR_CALL_NOT_IMPLEMENTED as u32 { + if c::GetLastError() as u32 != c::ERROR_CALL_NOT_IMPLEMENTED as u32 { panic!("failed to reserve stack space for exception handling"); } } @@ -28,7 +27,7 @@ impl Handler { } extern "system" fn vectored_handler(ExceptionInfo: *mut c::EXCEPTION_POINTERS) - -> LONG { + -> c::LONG { unsafe { let rec = &(*(*ExceptionInfo).ExceptionRecord); let code = rec.ExceptionCode; |
