Rollup merge of #128315 - zetanumbers:psvita-unsafe-in-unsafe, r=workingjubilee
Fix vita build of std and forbid unsafe in unsafe in the os/vita module See #127747 r? `@workingjubilee` `@pheki` `@nikarh`
This commit is contained in:
commit
f396a42ed6
@ -1,5 +1,6 @@
|
|||||||
//! Definitions for vita
|
//! Definitions for vita
|
||||||
|
|
||||||
|
#![forbid(unsafe_op_in_unsafe_fn)]
|
||||||
#![stable(feature = "raw_ext", since = "1.1.0")]
|
#![stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
|
|
||||||
pub mod fs;
|
pub mod fs;
|
||||||
|
@ -10,9 +10,6 @@
|
|||||||
)]
|
)]
|
||||||
#![allow(deprecated)]
|
#![allow(deprecated)]
|
||||||
|
|
||||||
use crate::os::raw::c_long;
|
|
||||||
use crate::os::unix::raw::{gid_t, uid_t};
|
|
||||||
|
|
||||||
#[stable(feature = "pthread_t", since = "1.8.0")]
|
#[stable(feature = "pthread_t", since = "1.8.0")]
|
||||||
pub type pthread_t = libc::pthread_t;
|
pub type pthread_t = libc::pthread_t;
|
||||||
|
|
||||||
@ -34,37 +31,3 @@
|
|||||||
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
#[stable(feature = "raw_ext", since = "1.1.0")]
|
||||||
pub type time_t = libc::time_t;
|
pub type time_t = libc::time_t;
|
||||||
|
|
||||||
#[repr(C)]
|
|
||||||
#[derive(Clone)]
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub struct stat {
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_dev: dev_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_ino: ino_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_mode: mode_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_nlink: nlink_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_uid: uid_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_gid: gid_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_rdev: dev_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_size: off_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_atime: time_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_mtime: time_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_ctime: time_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_blksize: blksize_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_blocks: blkcnt_t,
|
|
||||||
#[stable(feature = "raw_ext", since = "1.1.0")]
|
|
||||||
pub st_spare4: [c_long; 2usize],
|
|
||||||
}
|
|
||||||
|
@ -166,6 +166,7 @@ unsafe fn reset_sigpipe(#[allow(unused_variables)] sigpipe: u8) {
|
|||||||
target_os = "fuchsia",
|
target_os = "fuchsia",
|
||||||
target_os = "horizon",
|
target_os = "horizon",
|
||||||
target_os = "vxworks",
|
target_os = "vxworks",
|
||||||
|
target_os = "vita",
|
||||||
// Unikraft's `signal` implementation is currently broken:
|
// Unikraft's `signal` implementation is currently broken:
|
||||||
// https://github.com/unikraft/lib-musl/issues/57
|
// https://github.com/unikraft/lib-musl/issues/57
|
||||||
target_vendor = "unikraft",
|
target_vendor = "unikraft",
|
||||||
@ -212,6 +213,7 @@ mod sigpipe {
|
|||||||
target_os = "fuchsia",
|
target_os = "fuchsia",
|
||||||
target_os = "horizon",
|
target_os = "horizon",
|
||||||
target_os = "vxworks",
|
target_os = "vxworks",
|
||||||
|
target_os = "vita",
|
||||||
)))]
|
)))]
|
||||||
static ON_BROKEN_PIPE_FLAG_USED: crate::sync::atomic::AtomicBool =
|
static ON_BROKEN_PIPE_FLAG_USED: crate::sync::atomic::AtomicBool =
|
||||||
crate::sync::atomic::AtomicBool::new(false);
|
crate::sync::atomic::AtomicBool::new(false);
|
||||||
@ -222,6 +224,7 @@ mod sigpipe {
|
|||||||
target_os = "fuchsia",
|
target_os = "fuchsia",
|
||||||
target_os = "horizon",
|
target_os = "horizon",
|
||||||
target_os = "vxworks",
|
target_os = "vxworks",
|
||||||
|
target_os = "vita",
|
||||||
)))]
|
)))]
|
||||||
pub(crate) fn on_broken_pipe_flag_used() -> bool {
|
pub(crate) fn on_broken_pipe_flag_used() -> bool {
|
||||||
ON_BROKEN_PIPE_FLAG_USED.load(crate::sync::atomic::Ordering::Relaxed)
|
ON_BROKEN_PIPE_FLAG_USED.load(crate::sync::atomic::Ordering::Relaxed)
|
||||||
|
@ -124,6 +124,7 @@ pub struct StdioPipes {
|
|||||||
|
|
||||||
// passed to do_exec() with configuration of what the child stdio should look
|
// passed to do_exec() with configuration of what the child stdio should look
|
||||||
// like
|
// like
|
||||||
|
#[cfg_attr(target_os = "vita", allow(dead_code))]
|
||||||
pub struct ChildPipes {
|
pub struct ChildPipes {
|
||||||
pub stdin: ChildStdio,
|
pub stdin: ChildStdio,
|
||||||
pub stdout: ChildStdio,
|
pub stdout: ChildStdio,
|
||||||
|
Loading…
Reference in New Issue
Block a user