Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing PS Vita definitions, fix some unused ones #3284

Merged
merged 2 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Moved dirent to generic.rs
  • Loading branch information
nikarh committed Sep 24, 2023
commit 53c6b31638bc10065e9adb698ec622840459e0d3
2 changes: 1 addition & 1 deletion src/unix/newlib/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ pub const MSG_WAITALL: ::c_int = 0;
pub const MSG_MORE: ::c_int = 0;
pub const MSG_NOSIGNAL: ::c_int = 0;

pub use crate::unix::newlib::generic::{sigset_t, stat};
pub use crate::unix::newlib::generic::{dirent, sigset_t, stat};
2 changes: 1 addition & 1 deletion src/unix/newlib/arm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ pub const MSG_WAITALL: ::c_int = 0;
pub const MSG_MORE: ::c_int = 0;
pub const MSG_NOSIGNAL: ::c_int = 0;

pub use crate::unix::newlib::generic::{sigset_t, stat};
pub use crate::unix::newlib::generic::{dirent, sigset_t, stat};
7 changes: 0 additions & 7 deletions src/unix/newlib/dirent.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/unix/newlib/espidf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ extern "C" {
pub fn eventfd(initval: ::c_uint, flags: ::c_int) -> ::c_int;
}

pub use crate::unix::newlib::generic::{sigset_t, stat};
pub use crate::unix::newlib::generic::{dirent, sigset_t, stat};
6 changes: 6 additions & 0 deletions src/unix/newlib/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@ s! {
pub st_blocks: ::blkcnt_t,
pub st_spare4: [::c_long; 2usize],
}

pub struct dirent {
pub d_ino: ::ino_t,
pub d_type: ::c_uchar,
pub d_name: [::c_char; 256usize],
}
}
2 changes: 2 additions & 0 deletions src/unix/newlib/horizon/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,5 @@ extern "C" {

pub fn gethostid() -> ::c_long;
}

pub use crate::unix::newlib::generic::dirent;
7 changes: 0 additions & 7 deletions src/unix/newlib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -786,13 +786,6 @@ cfg_if! {
}
}

cfg_if! {
if #[cfg(not(target_os = "vita"))] {
mod dirent;
pub use self::dirent::*;
}
}

cfg_if! {
if #[cfg(libc_align)] {
#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion src/unix/newlib/powerpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub type wchar_t = ::c_int;
pub type c_long = i32;
pub type c_ulong = u32;

pub use crate::unix::newlib::generic::{sigset_t, stat};
pub use crate::unix::newlib::generic::{dirent, sigset_t, stat};

// the newlib shipped with devkitPPC does not support the following components:
// - sockaddr
Expand Down