From 77a4683aa1bceafb54c5a34c628f26fd746cb47f Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Thu, 16 May 2019 09:55:07 +0200 Subject: Remove bitrig support See https://github.com/rust-lang/rust/pull/60775 . --- src/unix/bsd/mod.rs | 3 +- src/unix/bsd/netbsdlike/mod.rs | 2 +- src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs | 129 --------------------- src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs | 2 - .../bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs | 10 -- src/unix/bsd/netbsdlike/openbsdlike/mod.rs | 3 - src/unix/mod.rs | 6 +- 7 files changed, 4 insertions(+), 151 deletions(-) delete mode 100644 src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs delete mode 100644 src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs delete mode 100644 src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs (limited to 'src') diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 162be9d7f9..03c987dd33 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -663,8 +663,7 @@ cfg_if! { if #[cfg(any(target_os = "macos", target_os = "ios"))] { mod apple; pub use self::apple::*; - } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd", - target_os = "bitrig"))] { + } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd"))] { mod netbsdlike; pub use self::netbsdlike::*; } else if #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] { diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index c75e6de0a3..29b4dd7649 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -676,7 +676,7 @@ cfg_if! { if #[cfg(target_os = "netbsd")] { mod netbsd; pub use self::netbsd::*; - } else if #[cfg(any(target_os = "openbsd", target_os = "bitrig"))] { + } else if #[cfg(target_os = "openbsd")] { mod openbsdlike; pub use self::openbsdlike::*; } else { diff --git a/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs b/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs deleted file mode 100644 index f73d7de7b2..0000000000 --- a/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs +++ /dev/null @@ -1,129 +0,0 @@ -pub type c_char = i8; - -s! { - pub struct glob_t { - pub gl_pathc: ::c_int, - pub gl_matchc: ::c_int, - pub gl_offs: ::c_int, - pub gl_flags: ::c_int, - pub gl_pathv: *mut *mut ::c_char, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, - } - - pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, - } -} - -pub const LC_COLLATE_MASK: ::c_int = (1 << 0); -pub const LC_CTYPE_MASK: ::c_int = (1 << 1); -pub const LC_MESSAGES_MASK: ::c_int = (1 << 2); -pub const LC_MONETARY_MASK: ::c_int = (1 << 3); -pub const LC_NUMERIC_MASK: ::c_int = (1 << 4); -pub const LC_TIME_MASK: ::c_int = (1 << 5); -pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK - | LC_CTYPE_MASK - | LC_MESSAGES_MASK - | LC_MONETARY_MASK - | LC_NUMERIC_MASK - | LC_TIME_MASK; - -pub const ERA: ::nl_item = 52; -pub const ERA_D_FMT: ::nl_item = 53; -pub const ERA_D_T_FMT: ::nl_item = 54; -pub const ERA_T_FMT: ::nl_item = 55; -pub const ALT_DIGITS: ::nl_item = 56; - -pub const D_MD_ORDER: ::nl_item = 57; - -pub const ALTMON_1: ::nl_item = 58; -pub const ALTMON_2: ::nl_item = 59; -pub const ALTMON_3: ::nl_item = 60; -pub const ALTMON_4: ::nl_item = 61; -pub const ALTMON_5: ::nl_item = 62; -pub const ALTMON_6: ::nl_item = 63; -pub const ALTMON_7: ::nl_item = 64; -pub const ALTMON_8: ::nl_item = 65; -pub const ALTMON_9: ::nl_item = 66; -pub const ALTMON_10: ::nl_item = 67; -pub const ALTMON_11: ::nl_item = 68; -pub const ALTMON_12: ::nl_item = 69; - -pub const KERN_RND: ::c_int = 31; - -// https://github.com/bitrig/bitrig/blob/master/sys/net/if.h#L187 -pub const IFF_UP: ::c_int = 0x1; // interface is up -pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid -pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging -pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net -pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link -pub const IFF_NOTRAILERS: ::c_int = 0x20; // avoid use of trailers -pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated -pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol -pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets -pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets -pub const IFF_OACTIVE: ::c_int = 0x400; // transmission in progress -pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions -pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit -pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit -pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit -pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast - -pub const PTHREAD_STACK_MIN : ::size_t = 2048; -pub const SIGSTKSZ : ::size_t = 40960; - -pub const PT_FIRSTMACH: ::c_int = 32; - -extern { - pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; - pub fn duplocale(base: ::locale_t) -> ::locale_t; - pub fn freelocale(loc: ::locale_t) -> ::c_int; - pub fn newlocale(mask: ::c_int, - locale: *const ::c_char, - base: ::locale_t) -> ::locale_t; - pub fn uselocale(loc: ::locale_t) -> ::locale_t; - pub fn pledge(promises: *const ::c_char, - paths: *mut *const ::c_char) -> ::c_int; - pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char; -} - -cfg_if! { - if #[cfg(target_arch = "x86")] { - mod x86; - pub use self::x86::*; - } else if #[cfg(target_arch = "x86_64")] { - mod x86_64; - pub use self::x86_64::*; - } else { - // Unknown target_arch - } -} diff --git a/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs b/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs deleted file mode 100644 index 9b0b338b91..0000000000 --- a/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub type c_long = i32; -pub type c_ulong = u32; diff --git a/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs b/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs deleted file mode 100644 index d3971aa35b..0000000000 --- a/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs +++ /dev/null @@ -1,10 +0,0 @@ -use PT_FIRSTMACH; - -pub type c_long = i64; -pub type c_ulong = u64; - -pub const PT_STEP: ::c_int = PT_FIRSTMACH + 0; -pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 1; -pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 2; -pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 3; -pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 4; diff --git a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs index cf9dc8f551..223064b76e 100644 --- a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs @@ -939,9 +939,6 @@ cfg_if! { if #[cfg(target_os = "openbsd")] { mod openbsd; pub use self::openbsd::*; - } else if #[cfg(target_os = "bitrig")] { - mod bitrig; - pub use self::bitrig::*; } else { // Unknown target_os } diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 840769615d..375acabbc3 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -327,8 +327,7 @@ cfg_if! { } else if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "android", - target_os = "openbsd", - target_os = "bitrig"))] { + target_os = "openbsd"))] { #[link(name = "c")] #[link(name = "m")] extern {} @@ -1158,8 +1157,7 @@ cfg_if! { target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", - target_os = "netbsd", - target_os = "bitrig"))] { + target_os = "netbsd"))] { mod bsd; pub use self::bsd::*; } else if #[cfg(any(target_os = "solaris", -- cgit v1.2.1