-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #110638 - nikarh:vita, r=Mark-Simulacrum
STD support for PSVita This PR adds std support for `armv7-sony-vita-newlibeabihf` target. The work here is fairly similar to #95897, just for a different target platform. This depends on the following pull requests: rust-lang/backtrace-rs#523 rust-lang/libc#3209
- Loading branch information
Showing
20 changed files
with
322 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule backtrace
updated
5 files
+19 −17 | .github/workflows/main.yml | |
+2 −1 | src/backtrace/libunwind.rs | |
+1 −1 | src/dbghelp.rs | |
+1 −1 | src/print/fuchsia.rs | |
+1 −1 | src/symbolize/gimli/mmap_windows.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#![stable(feature = "metadata_ext", since = "1.1.0")] | ||
|
||
use crate::fs::Metadata; | ||
use crate::sys_common::AsInner; | ||
|
||
/// OS-specific extensions to [`fs::Metadata`]. | ||
/// | ||
/// [`fs::Metadata`]: crate::fs::Metadata | ||
#[stable(feature = "metadata_ext", since = "1.1.0")] | ||
pub trait MetadataExt { | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_dev(&self) -> u64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_ino(&self) -> u64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_mode(&self) -> u32; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_nlink(&self) -> u64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_uid(&self) -> u32; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_gid(&self) -> u32; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_rdev(&self) -> u64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_size(&self) -> u64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_atime(&self) -> i64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_atime_nsec(&self) -> i64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_mtime(&self) -> i64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_mtime_nsec(&self) -> i64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_ctime(&self) -> i64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_ctime_nsec(&self) -> i64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_blksize(&self) -> u64; | ||
#[stable(feature = "metadata_ext2", since = "1.8.0")] | ||
fn st_blocks(&self) -> u64; | ||
} | ||
|
||
#[stable(feature = "metadata_ext", since = "1.1.0")] | ||
impl MetadataExt for Metadata { | ||
fn st_dev(&self) -> u64 { | ||
self.as_inner().as_inner().st_dev as u64 | ||
} | ||
fn st_ino(&self) -> u64 { | ||
self.as_inner().as_inner().st_ino as u64 | ||
} | ||
fn st_mode(&self) -> u32 { | ||
self.as_inner().as_inner().st_mode as u32 | ||
} | ||
fn st_nlink(&self) -> u64 { | ||
self.as_inner().as_inner().st_nlink as u64 | ||
} | ||
fn st_uid(&self) -> u32 { | ||
self.as_inner().as_inner().st_uid as u32 | ||
} | ||
fn st_gid(&self) -> u32 { | ||
self.as_inner().as_inner().st_gid as u32 | ||
} | ||
fn st_rdev(&self) -> u64 { | ||
self.as_inner().as_inner().st_rdev as u64 | ||
} | ||
fn st_size(&self) -> u64 { | ||
self.as_inner().as_inner().st_size as u64 | ||
} | ||
fn st_atime(&self) -> i64 { | ||
self.as_inner().as_inner().st_atime as i64 | ||
} | ||
fn st_atime_nsec(&self) -> i64 { | ||
0 | ||
} | ||
fn st_mtime(&self) -> i64 { | ||
self.as_inner().as_inner().st_mtime as i64 | ||
} | ||
fn st_mtime_nsec(&self) -> i64 { | ||
0 | ||
} | ||
fn st_ctime(&self) -> i64 { | ||
self.as_inner().as_inner().st_ctime as i64 | ||
} | ||
fn st_ctime_nsec(&self) -> i64 { | ||
0 | ||
} | ||
fn st_blksize(&self) -> u64 { | ||
self.as_inner().as_inner().st_blksize as u64 | ||
} | ||
fn st_blocks(&self) -> u64 { | ||
self.as_inner().as_inner().st_blocks as u64 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//! Definitions for vita | ||
|
||
#![stable(feature = "raw_ext", since = "1.1.0")] | ||
|
||
pub mod fs; | ||
pub(crate) mod raw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
//! vita raw type definitions | ||
|
||
#![stable(feature = "raw_ext", since = "1.1.0")] | ||
#![deprecated( | ||
since = "1.8.0", | ||
note = "these type aliases are no longer supported by \ | ||
the standard library, the `libc` crate on \ | ||
crates.io should be used instead for the correct \ | ||
definitions" | ||
)] | ||
#![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")] | ||
pub type pthread_t = libc::pthread_t; | ||
|
||
#[stable(feature = "raw_ext", since = "1.1.0")] | ||
pub type blkcnt_t = libc::blkcnt_t; | ||
|
||
#[stable(feature = "raw_ext", since = "1.1.0")] | ||
pub type blksize_t = libc::blksize_t; | ||
#[stable(feature = "raw_ext", since = "1.1.0")] | ||
pub type dev_t = libc::dev_t; | ||
#[stable(feature = "raw_ext", since = "1.1.0")] | ||
pub type ino_t = libc::ino_t; | ||
#[stable(feature = "raw_ext", since = "1.1.0")] | ||
pub type mode_t = libc::mode_t; | ||
#[stable(feature = "raw_ext", since = "1.1.0")] | ||
pub type nlink_t = libc::nlink_t; | ||
#[stable(feature = "raw_ext", since = "1.1.0")] | ||
pub type off_t = libc::off_t; | ||
|
||
#[stable(feature = "raw_ext", since = "1.1.0")] | ||
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], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.