From 93b6d9e086c6910118a57e4332c9448ab550931f Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 11 Feb 2019 04:23:21 +0900 Subject: libstd => 2018 --- src/libstd/sys/unix/stack_overflow.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libstd/sys/unix/stack_overflow.rs') diff --git a/src/libstd/sys/unix/stack_overflow.rs b/src/libstd/sys/unix/stack_overflow.rs index d6a219a6d57..cfa019634bd 100644 --- a/src/libstd/sys/unix/stack_overflow.rs +++ b/src/libstd/sys/unix/stack_overflow.rs @@ -1,6 +1,5 @@ #![cfg_attr(test, allow(dead_code))] -use libc; use self::imp::{make_handler, drop_handler}; pub use self::imp::cleanup; @@ -34,8 +33,9 @@ impl Drop for Handler { target_os = "openbsd"))] mod imp { use super::Handler; - use mem; - use ptr; + use crate::mem; + use crate::ptr; + use libc::{sigaltstack, SIGSTKSZ, SS_DISABLE}; use libc::{sigaction, SIGBUS, SIG_DFL, SA_SIGINFO, SA_ONSTACK, sighandler_t}; @@ -44,7 +44,7 @@ mod imp { use libc::{SIGSEGV, PROT_READ, PROT_WRITE, MAP_PRIVATE, MAP_ANON}; use libc::MAP_FAILED; - use sys_common::thread_info; + use crate::sys_common::thread_info; #[cfg(any(target_os = "linux", target_os = "android"))] @@ -87,7 +87,7 @@ mod imp { unsafe extern fn signal_handler(signum: libc::c_int, info: *mut libc::siginfo_t, _data: *mut libc::c_void) { - use sys_common::util::report_overflow; + use crate::sys_common::util::report_overflow; let guard = thread_info::stack_guard().unwrap_or(0..0); let addr = siginfo_si_addr(info); @@ -193,7 +193,7 @@ mod imp { all(target_os = "netbsd", not(target_vendor = "rumprun")), target_os = "openbsd")))] mod imp { - use ptr; + use crate::ptr; pub unsafe fn init() { } -- cgit 1.4.1-3-g733a5 From 90dbf59b920054e5808718f4a54323e3653348aa Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 17 Feb 2019 22:35:20 +0900 Subject: Fix some imports and paths --- src/libstd/lib.rs | 3 --- src/libstd/sys/sgx/abi/usercalls/mod.rs | 2 +- src/libstd/sys/unix/stack_overflow.rs | 1 - src/libstd/sys_common/util.rs | 2 +- 4 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/libstd/sys/unix/stack_overflow.rs') diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 4883c607ad1..32a168619df 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -344,9 +344,6 @@ extern crate unwind; // testing gives test-std access to real-std lang items and globals. See #2912 #[cfg(test)] extern crate std as realstd; -#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] -extern crate fortanix_sgx_abi; - // The standard macros that are not built-in to the compiler. #[macro_use] mod macros; diff --git a/src/libstd/sys/sgx/abi/usercalls/mod.rs b/src/libstd/sys/sgx/abi/usercalls/mod.rs index 7361011e92d..d84b6154cbe 100644 --- a/src/libstd/sys/sgx/abi/usercalls/mod.rs +++ b/src/libstd/sys/sgx/abi/usercalls/mod.rs @@ -22,7 +22,7 @@ pub fn read(fd: Fd, buf: &mut [u8]) -> IoResult { #[unstable(feature = "sgx_platform", issue = "56975")] pub fn read_alloc(fd: Fd) -> IoResult> { unsafe { - let userbuf = ByteBuffer { data: ::ptr::null_mut(), len: 0 }; + let userbuf = ByteBuffer { data: crate::ptr::null_mut(), len: 0 }; let mut userbuf = alloc::User::new_from_enclave(&userbuf); raw::read_alloc(fd, userbuf.as_raw_mut_ptr()).from_sgx_result()?; Ok(userbuf.copy_user_buffer()) diff --git a/src/libstd/sys/unix/stack_overflow.rs b/src/libstd/sys/unix/stack_overflow.rs index cfa019634bd..8c60bddc238 100644 --- a/src/libstd/sys/unix/stack_overflow.rs +++ b/src/libstd/sys/unix/stack_overflow.rs @@ -39,7 +39,6 @@ mod imp { use libc::{sigaltstack, SIGSTKSZ, SS_DISABLE}; use libc::{sigaction, SIGBUS, SIG_DFL, SA_SIGINFO, SA_ONSTACK, sighandler_t}; - use libc; use libc::{mmap, munmap}; use libc::{SIGSEGV, PROT_READ, PROT_WRITE, MAP_PRIVATE, MAP_ANON}; use libc::MAP_FAILED; diff --git a/src/libstd/sys_common/util.rs b/src/libstd/sys_common/util.rs index b547d941f3b..206443a6736 100644 --- a/src/libstd/sys_common/util.rs +++ b/src/libstd/sys_common/util.rs @@ -11,7 +11,7 @@ pub fn dumb_print(args: fmt::Arguments) { // Other platforms should use the appropriate platform-specific mechanism for // aborting the process. If no platform-specific mechanism is available, -// ::intrinsics::abort() may be used instead. The above implementations cover +// crate::intrinsics::abort() may be used instead. The above implementations cover // all targets currently supported by libstd. pub fn abort(args: fmt::Arguments) -> ! { -- cgit 1.4.1-3-g733a5