Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions src/new/vita/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
//! VITASDK system library.
// FIXME(vita): link to headers or manpages needed.

pub(crate) mod unistd;
7 changes: 0 additions & 7 deletions src/new/vita/unistd.rs

This file was deleted.

3 changes: 2 additions & 1 deletion src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ s! {
pub ipv6mr_interface: c_uint,
}

#[cfg(not(target_os = "cygwin"))]
#[cfg(all(not(target_os = "cygwin"), not(target_os = "horizon")))]
pub struct hostent {
pub h_name: *mut c_char,
pub h_aliases: *mut *mut c_char,
Expand All @@ -156,6 +156,7 @@ s! {
pub iov_len: size_t,
}

#[cfg(not(target_os = "horizon"))]
pub struct pollfd {
pub fd: c_int,
pub events: c_short,
Expand Down
10 changes: 5 additions & 5 deletions src/unix/newlib/generic.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
//! Common types used by most newlib platforms

use crate::off_t;
#[allow(unused_imports)] // needed for platforms that don't use the prelude here
use crate::prelude::*;

s! {
#[cfg(all(not(target_os = "vita"), not(target_os = "horizon")))]
pub struct sigset_t {
#[cfg(target_os = "horizon")]
__val: [c_ulong; 16],
#[cfg(not(target_os = "horizon"))]
__val: u32,
}

#[cfg(all(not(target_os = "vita"), not(target_os = "horizon")))]
pub struct stat {
pub st_dev: crate::dev_t,
pub st_ino: crate::ino_t,
Expand All @@ -19,7 +18,7 @@ s! {
pub st_uid: crate::uid_t,
pub st_gid: crate::gid_t,
pub st_rdev: crate::dev_t,
pub st_size: off_t,
pub st_size: crate::off_t,
pub st_atime: crate::time_t,
pub st_spare1: c_long,
pub st_mtime: crate::time_t,
Expand All @@ -31,6 +30,7 @@ s! {
pub st_spare4: [c_long; 2usize],
}

#[cfg(not(target_os = "vita"))]
pub struct dirent {
pub d_ino: crate::ino_t,
pub d_type: c_uchar,
Expand Down
9 changes: 6 additions & 3 deletions src/unix/newlib/horizon/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ s! {
pub h_addr_list: *mut *mut c_char,
}

pub struct pollfd {
pub fd: c_int,
pub events: c_int,
pub revents: c_int,
}

pub struct sockaddr {
pub sa_family: crate::sa_family_t,
pub sa_data: [c_char; 26usize],
Expand Down Expand Up @@ -141,9 +147,6 @@ pub const MSG_MORE: c_int = 0;
pub const MSG_NOSIGNAL: c_int = 0;
pub const SOL_CONFIG: c_uint = 65534;

pub const _SC_PAGESIZE: c_int = 8;
pub const _SC_GETPW_R_SIZE_MAX: c_int = 51;

pub const PTHREAD_STACK_MIN: size_t = 4096;
pub const WNOHANG: c_int = 1;

Expand Down
26 changes: 0 additions & 26 deletions src/unix/newlib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,6 @@ cfg_if! {
}
}

cfg_if! {
if #[cfg(not(target_os = "horizon"))] {
s! {
pub struct hostent {
pub h_name: *mut c_char,
pub h_aliases: *mut *mut c_char,
pub h_addrtype: c_int,
pub h_length: c_int,
pub h_addr_list: *mut *mut c_char,
pub h_addr: *mut c_char,
}
}
}
}

s! {
// The order of the `ai_addr` field in this struct is crucial
// for converting between the Rust and C types.
Expand Down Expand Up @@ -108,21 +93,10 @@ s! {
pub imr_interface: in_addr,
}

pub struct linger {
pub l_onoff: c_int,
pub l_linger: c_int,
}

pub struct in_addr {
pub s_addr: crate::in_addr_t,
}

pub struct pollfd {
pub fd: c_int,
pub events: c_int,
pub revents: c_int,
}

pub struct lconv {
pub decimal_point: *mut c_char,
pub thousands_sep: *mut c_char,
Expand Down
2 changes: 0 additions & 2 deletions src/unix/newlib/rtems/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ pub const EAI_SERVICE: c_int = 9;
pub const EAI_SYSTEM: c_int = 11;
pub const EAI_OVERFLOW: c_int = 14;

pub const _SC_PAGESIZE: c_int = 8;
pub const _SC_GETPW_R_SIZE_MAX: c_int = 51;
pub const PTHREAD_STACK_MIN: size_t = 0;

// sys/wait.h
Expand Down
2 changes: 0 additions & 2 deletions src/unix/newlib/vita/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ pub const EAI_MEMORY: c_int = -10;
pub const EAI_SYSTEM: c_int = -11;
pub const EAI_OVERFLOW: c_int = -12;

pub const _SC_PAGESIZE: c_int = 8;
pub const _SC_GETPW_R_SIZE_MAX: c_int = 51;
pub const PTHREAD_STACK_MIN: size_t = 32 * 1024;

pub const IP_HDRINCL: c_int = 2;
Expand Down