Fix indentation, remove more constants that don't work for uclibc

This commit is contained in:
Kelvin Ly 2017-04-26 23:01:05 -04:00
parent 8c592f12b3
commit c14178c305
7 changed files with 4 additions and 155 deletions

View File

@ -319,9 +319,6 @@ fn main() {
// This is actually a union, not a struct
"sigval" => true,
// These structs didn't exist when uClibc was developed
"aiocb" if uclibc => true,
_ => false
}
});
@ -400,10 +397,6 @@ fn main() {
"KERN_KDENABLE_BG_TRACE" if apple => true,
"KERN_KDDISABLE_BG_TRACE" if apple => true,
// uClibc doesn't support a LOT of constants, because its latest release
// was before they coud be implemented yet
"LC_PAPER" | "LC_NAME" | "LC_ADDRESS" | "LC_TELEPHONE" | "LC_MEASUREMENT" | "LC_IDENTIFICATION" |
"LC_PAPER_MASK" | "LC_NAME_MASK" | "LC_ADDRESS_MASK" | "LC_TELEPHONE_MASK" | "LC_MEASUREMENT_MASK" | "LC_IDENTIFICATION_MASK" | "LC_ALL_MASK" |
// not entirely sure why these don't work...
"LC_CTYPE_MASK" | "LC_NUMERIC_MASK" | "LC_TIME_MASK" | "LC_COLLATE_MASK" | "LC_MONETARY_MASK" | "LC_MESSAGES_MASK" |
"MADV_MERGEABLE" | "MADV_UNMERGEABLE" | "MADV_HWPOISON" | "IPV6_ADD_MEMBERSHIP" | "IPV6_DROP_MEMBERSHIP" | "IPV6_MULTICAST_LOOP" | "IPV6_V6ONLY" |
@ -498,7 +491,7 @@ fn main() {
"fremovexattr" |
"backtrace" |
"sysinfo" | "newlocale" | "duplocale" | "freelocale" | "uselocale" |
"nl_langinfo_l" | "wcslen" | "wcstombs" if uclibc && linux => true,
"nl_langinfo_l" | "wcslen" | "wcstombs" if uclibc => true,
_ => false,
}

View File

@ -841,9 +841,9 @@ cfg_if! {
mod uclibc;
pub use self::uclibc::*;
} else if #[cfg(any(target_os = "linux",
target_os = "android",
target_os = "emscripten",
target_os = "fuchsia"))] {
target_os = "android",
target_os = "emscripten",
target_os = "fuchsia"))] {
mod notbsd;
pub use self::notbsd::*;
} else if #[cfg(any(target_os = "macos",

View File

@ -15,23 +15,6 @@ pub type fsfilcnt_t = ::c_ulong;
pub type rlim_t = c_ulong;
s! {
pub struct aiocb {
pub aio_fildes: ::c_int,
pub aio_lio_opcode: ::c_int,
pub aio_reqprio: ::c_int,
pub aio_buf: *mut ::c_void,
pub aio_nbytes: ::size_t,
pub aio_sigevent: ::sigevent,
__next_prio: *mut aiocb,
__abs_prio: ::c_int,
__policy: ::c_int,
__error_code: ::c_int,
__return_value: ::ssize_t,
pub aio_offset: off_t,
__unused1: [::c_char; 4],
__glibc_reserved: [::c_char; 32]
}
pub struct stat {
pub st_dev: ::dev_t,
st_pad1: [::c_long; 2],

View File

@ -14,22 +14,6 @@ pub type time_t = i64;
pub type wchar_t = i32;
s! {
pub struct aiocb {
pub aio_fildes: ::c_int,
pub aio_lio_opcode: ::c_int,
pub aio_reqprio: ::c_int,
pub aio_buf: *mut ::c_void,
pub aio_nbytes: ::size_t,
pub aio_sigevent: ::sigevent,
__next_prio: *mut aiocb,
__abs_prio: ::c_int,
__policy: ::c_int,
__error_code: ::c_int,
__return_value: ::ssize_t,
pub aio_offset: off_t,
__glibc_reserved: [::c_char; 32]
}
pub struct stat {
pub st_dev: ::c_ulong,
st_pad1: [::c_long; 2],

View File

@ -150,31 +150,6 @@ pub const EOWNERDEAD: ::c_int = 165;
pub const ENOTRECOVERABLE: ::c_int = 166;
pub const ERFKILL: ::c_int = 167;
pub const LC_PAPER: ::c_int = 7;
pub const LC_NAME: ::c_int = 8;
pub const LC_ADDRESS: ::c_int = 9;
pub const LC_TELEPHONE: ::c_int = 10;
pub const LC_MEASUREMENT: ::c_int = 11;
pub const LC_IDENTIFICATION: ::c_int = 12;
pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
| ::LC_NUMERIC_MASK
| ::LC_TIME_MASK
| ::LC_COLLATE_MASK
| ::LC_MONETARY_MASK
| ::LC_MESSAGES_MASK
| LC_PAPER_MASK
| LC_NAME_MASK
| LC_ADDRESS_MASK
| LC_TELEPHONE_MASK
| LC_MEASUREMENT_MASK
| LC_IDENTIFICATION_MASK;
pub const MAP_NORESERVE: ::c_int = 0x400;
pub const MAP_ANON: ::c_int = 0x800;
pub const MAP_ANONYMOUS: ::c_int = 0x800;

View File

@ -4,24 +4,6 @@ pub type rlim_t = c_ulong;
pub type __priority_which_t = ::c_uint;
s! {
pub struct aiocb {
pub aio_fildes: ::c_int,
pub aio_lio_opcode: ::c_int,
pub aio_reqprio: ::c_int,
pub aio_buf: *mut ::c_void,
pub aio_nbytes: ::size_t,
pub aio_sigevent: ::sigevent,
__next_prio: *mut aiocb,
__abs_prio: ::c_int,
__policy: ::c_int,
__error_code: ::c_int,
__return_value: ::ssize_t,
pub aio_offset: off_t,
#[cfg(target_pointer_width = "32")]
__unused1: [::c_char; 4],
__glibc_reserved: [::c_char; 32]
}
pub struct __exit_status {
pub e_termination: ::c_short,
pub e_exit: ::c_short,
@ -204,31 +186,6 @@ pub const SOL_NFC: ::c_int = 280;
pub const MSG_TRYHARD: ::c_int = 4;
pub const LC_PAPER: ::c_int = 7;
pub const LC_NAME: ::c_int = 8;
pub const LC_ADDRESS: ::c_int = 9;
pub const LC_TELEPHONE: ::c_int = 10;
pub const LC_MEASUREMENT: ::c_int = 11;
pub const LC_IDENTIFICATION: ::c_int = 12;
pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
| ::LC_NUMERIC_MASK
| ::LC_TIME_MASK
| ::LC_COLLATE_MASK
| ::LC_MONETARY_MASK
| ::LC_MESSAGES_MASK
| LC_PAPER_MASK
| LC_NAME_MASK
| LC_ADDRESS_MASK
| LC_TELEPHONE_MASK
| LC_MEASUREMENT_MASK
| LC_IDENTIFICATION_MASK;
pub const MAP_ANON: ::c_int = 0x0020;
pub const MAP_ANONYMOUS: ::c_int = 0x0020;
pub const MAP_DENYWRITE: ::c_int = 0x0800;

View File

@ -18,24 +18,6 @@ pub type __fsword_t = ::c_long;
pub type __priority_which_t = ::c_uint;
s! {
pub struct aiocb {
pub aio_fildes: ::c_int,
pub aio_lio_opcode: ::c_int,
pub aio_reqprio: ::c_int,
pub aio_buf: *mut ::c_void,
pub aio_nbytes: ::size_t,
pub aio_sigevent: ::sigevent,
__next_prio: *mut aiocb,
__abs_prio: ::c_int,
__policy: ::c_int,
__error_code: ::c_int,
__return_value: ::ssize_t,
pub aio_offset: off_t,
#[cfg(target_pointer_width = "32")]
__unused1: [::c_char; 4],
__glibc_reserved: [::c_char; 32]
}
pub struct stat {
pub st_dev: ::dev_t,
pub st_ino: ::ino_t,
@ -368,31 +350,6 @@ pub const O_NOFOLLOW: ::c_int = 0x20000;
pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
pub const LC_PAPER: ::c_int = 7;
pub const LC_NAME: ::c_int = 8;
pub const LC_ADDRESS: ::c_int = 9;
pub const LC_TELEPHONE: ::c_int = 10;
pub const LC_MEASUREMENT: ::c_int = 11;
pub const LC_IDENTIFICATION: ::c_int = 12;
pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
| ::LC_NUMERIC_MASK
| ::LC_TIME_MASK
| ::LC_COLLATE_MASK
| ::LC_MONETARY_MASK
| ::LC_MESSAGES_MASK
| LC_PAPER_MASK
| LC_NAME_MASK
| LC_ADDRESS_MASK
| LC_TELEPHONE_MASK
| LC_MEASUREMENT_MASK
| LC_IDENTIFICATION_MASK;
pub const MAP_ANONYMOUS: ::c_int = 0x0020;
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
pub const MAP_DENYWRITE: ::c_int = 0x0800;