Skip to content

Commit

Permalink
Moved dirent to generic.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikarh committed Sep 24, 2023
1 parent b9c8323 commit 53c6b31
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/unix/newlib/aarch64/mod.rs
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
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
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
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
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
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
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

0 comments on commit 53c6b31

Please sign in to comment.