Skip to content
Draft
Changes from all commits
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
19 changes: 6 additions & 13 deletions src/unix/newlib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,17 @@ pub type blksize_t = i32;
pub type clockid_t = c_ulong;

cfg_if! {
if #[cfg(any(target_os = "espidf"))] {
if #[cfg(any(target_os = "espidf", target_os = "vita"))] {
pub type dev_t = c_short;
pub type ino_t = c_ushort;
pub type off_t = c_long;
} else if #[cfg(any(target_os = "vita"))] {
pub type dev_t = c_short;
pub type ino_t = c_ushort;
pub type off_t = c_int;
} else {
pub type dev_t = u32;
pub type ino_t = u32;
pub type off_t = i64;
}
}

pub type off_t = c_long;

pub type fsblkcnt_t = u64;
pub type fsfilcnt_t = u32;
pub type id_t = u32;
Expand Down Expand Up @@ -54,13 +50,10 @@ cfg_if! {
pub type useconds_t = u32;

cfg_if! {
if #[cfg(any(
target_os = "horizon",
all(target_os = "espidf", not(espidf_time32))
))] {
pub type time_t = c_longlong;
} else {
if #[cfg(all(target_os = "espidf", espidf_time32))] {
pub type time_t = i32;
} else {
pub type time_t = i64;
}
}

Expand Down
Loading