File tree Expand file tree Collapse file tree 8 files changed +13
-48
lines changed
Expand file tree Collapse file tree 8 files changed +13
-48
lines changed Original file line number Diff line number Diff line change 11//! VITASDK system library.
22// FIXME(vita): link to headers or manpages needed.
3-
4- pub ( crate ) mod unistd;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 142142 pub ipv6mr_interface: c_uint,
143143 }
144144
145- #[ cfg( not( target_os = "cygwin" ) ) ]
145+ #[ cfg( all ( not( target_os = "cygwin" ) , not ( target_os = "horizon" ) ) ) ]
146146 pub struct hostent {
147147 pub h_name: * mut c_char,
148148 pub h_aliases: * mut * mut c_char,
156156 pub iov_len: size_t,
157157 }
158158
159+ #[ cfg( not( target_os = "horizon" ) ) ]
159160 pub struct pollfd {
160161 pub fd: c_int,
161162 pub events: c_short,
Original file line number Diff line number Diff line change 11//! Common types used by most newlib platforms
22
3- use crate :: off_t ;
3+ # [ allow ( unused_imports ) ] // needed for platforms that don't use the prelude here
44use crate :: prelude:: * ;
55
66s ! {
7+ #[ cfg( all( not( target_os = "vita" ) , not( target_os = "horizon" ) ) ) ]
78 pub struct sigset_t {
8- #[ cfg( target_os = "horizon" ) ]
9- __val: [ c_ulong; 16 ] ,
10- #[ cfg( not( target_os = "horizon" ) ) ]
119 __val: u32 ,
1210 }
1311
12+ #[ cfg( all( not( target_os = "vita" ) , not( target_os = "horizon" ) ) ) ]
1413 pub struct stat {
1514 pub st_dev: crate :: dev_t,
1615 pub st_ino: crate :: ino_t,
1918 pub st_uid: crate :: uid_t,
2019 pub st_gid: crate :: gid_t,
2120 pub st_rdev: crate :: dev_t,
22- pub st_size: off_t,
21+ pub st_size: crate :: off_t,
2322 pub st_atime: crate :: time_t,
2423 pub st_spare1: c_long,
2524 pub st_mtime: crate :: time_t,
3130 pub st_spare4: [ c_long; 2usize ] ,
3231 }
3332
33+ #[ cfg( not( target_os = "vita" ) ) ]
3434 pub struct dirent {
3535 pub d_ino: crate :: ino_t,
3636 pub d_type: c_uchar,
Original file line number Diff line number Diff line change 2828 pub h_addr_list: * mut * mut c_char,
2929 }
3030
31+ pub struct pollfd {
32+ pub fd: c_int,
33+ pub events: c_int,
34+ pub revents: c_int,
35+ }
36+
3137 pub struct sockaddr {
3238 pub sa_family: crate :: sa_family_t,
3339 pub sa_data: [ c_char; 26usize ] ,
@@ -141,9 +147,6 @@ pub const MSG_MORE: c_int = 0;
141147pub const MSG_NOSIGNAL : c_int = 0 ;
142148pub const SOL_CONFIG : c_uint = 65534 ;
143149
144- pub const _SC_PAGESIZE: c_int = 8 ;
145- pub const _SC_GETPW_R_SIZE_MAX: c_int = 51 ;
146-
147150pub const PTHREAD_STACK_MIN : size_t = 4096 ;
148151pub const WNOHANG : c_int = 1 ;
149152
Original file line number Diff line number Diff line change @@ -64,21 +64,6 @@ cfg_if! {
6464 }
6565}
6666
67- cfg_if ! {
68- if #[ cfg( not( target_os = "horizon" ) ) ] {
69- s! {
70- pub struct hostent {
71- pub h_name: * mut c_char,
72- pub h_aliases: * mut * mut c_char,
73- pub h_addrtype: c_int,
74- pub h_length: c_int,
75- pub h_addr_list: * mut * mut c_char,
76- pub h_addr: * mut c_char,
77- }
78- }
79- }
80- }
81-
8267s ! {
8368 // The order of the `ai_addr` field in this struct is crucial
8469 // for converting between the Rust and C types.
@@ -108,21 +93,10 @@ s! {
10893 pub imr_interface: in_addr,
10994 }
11095
111- pub struct linger {
112- pub l_onoff: c_int,
113- pub l_linger: c_int,
114- }
115-
11696 pub struct in_addr {
11797 pub s_addr: crate :: in_addr_t,
11898 }
11999
120- pub struct pollfd {
121- pub fd: c_int,
122- pub events: c_int,
123- pub revents: c_int,
124- }
125-
126100 pub struct lconv {
127101 pub decimal_point: * mut c_char,
128102 pub thousands_sep: * mut c_char,
Original file line number Diff line number Diff line change @@ -73,8 +73,6 @@ pub const EAI_SERVICE: c_int = 9;
7373pub const EAI_SYSTEM : c_int = 11 ;
7474pub const EAI_OVERFLOW : c_int = 14 ;
7575
76- pub const _SC_PAGESIZE: c_int = 8 ;
77- pub const _SC_GETPW_R_SIZE_MAX: c_int = 51 ;
7876pub const PTHREAD_STACK_MIN : size_t = 0 ;
7977
8078// sys/wait.h
Original file line number Diff line number Diff line change @@ -164,8 +164,6 @@ pub const EAI_MEMORY: c_int = -10;
164164pub const EAI_SYSTEM : c_int = -11 ;
165165pub const EAI_OVERFLOW : c_int = -12 ;
166166
167- pub const _SC_PAGESIZE: c_int = 8 ;
168- pub const _SC_GETPW_R_SIZE_MAX: c_int = 51 ;
169167pub const PTHREAD_STACK_MIN : size_t = 32 * 1024 ;
170168
171169pub const IP_HDRINCL : c_int = 2 ;
You can’t perform that action at this time.
0 commit comments