Skip to content

Commit 00fe114

Browse files
committed
---
yaml --- r: 227737 b: refs/heads/try c: e136421 h: refs/heads/master i: 227735: 1e8e2b4 v: v3
1 parent 5aea928 commit 00fe114

File tree

3 files changed

+6
-78
lines changed

3 files changed

+6
-78
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: feba393b8ed60efe79f9f5207fde904d085949f5
4+
refs/heads/try: e13642163ab258c58295bcb1f2eaa27266724f73
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/libstd/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@
148148
#![feature(vec_push_all)]
149149
#![feature(wrapping)]
150150
#![feature(zero_one)]
151-
#![cfg_attr(all(unix, not(target_os = "macos"), not(target_os = "ios")),
152-
feature(num_bits_bytes))]
153151
#![cfg_attr(windows, feature(str_utf16))]
154152
#![cfg_attr(test, feature(float_from_str_radix, range_inclusive, float_extras))]
155153
#![cfg_attr(test, feature(test, rustc_private, float_consts))]

branches/try/src/libstd/sys/unix/c.rs

Lines changed: 5 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![allow(dead_code)]
1414
#![allow(non_camel_case_types)]
1515

16-
pub use self::select::fd_set;
1716
pub use self::signal::{sigaction, siginfo, sigset_t};
1817
pub use self::signal::{SA_ONSTACK, SA_RESTART, SA_RESETHAND, SA_NOCLDSTOP};
1918
pub use self::signal::{SA_NODEFER, SA_NOCLDWAIT, SA_SIGINFO, SIGCHLD};
@@ -26,45 +25,21 @@ use libc;
2625
target_os = "dragonfly",
2726
target_os = "bitrig",
2827
target_os = "openbsd"))]
29-
mod consts {
30-
use libc;
31-
pub const FIONBIO: libc::c_ulong = 0x8004667e;
32-
pub const FIOCLEX: libc::c_ulong = 0x20006601;
33-
pub const FIONCLEX: libc::c_ulong = 0x20006602;
34-
}
28+
pub const FIOCLEX: libc::c_ulong = 0x20006601;
29+
3530
#[cfg(any(all(target_os = "linux",
3631
any(target_arch = "x86",
3732
target_arch = "x86_64",
3833
target_arch = "arm",
3934
target_arch = "aarch64")),
4035
target_os = "android"))]
41-
mod consts {
42-
use libc;
43-
pub const FIONBIO: libc::c_ulong = 0x5421;
44-
pub const FIOCLEX: libc::c_ulong = 0x5451;
45-
pub const FIONCLEX: libc::c_ulong = 0x5450;
46-
}
36+
pub const FIOCLEX: libc::c_ulong = 0x5451;
37+
4738
#[cfg(all(target_os = "linux",
4839
any(target_arch = "mips",
4940
target_arch = "mipsel",
5041
target_arch = "powerpc")))]
51-
mod consts {
52-
use libc;
53-
pub const FIONBIO: libc::c_ulong = 0x667e;
54-
pub const FIOCLEX: libc::c_ulong = 0x6601;
55-
pub const FIONCLEX: libc::c_ulong = 0x6600;
56-
}
57-
pub use self::consts::*;
58-
59-
#[cfg(any(target_os = "macos",
60-
target_os = "ios",
61-
target_os = "freebsd",
62-
target_os = "dragonfly",
63-
target_os = "bitrig",
64-
target_os = "openbsd"))]
65-
pub const MSG_DONTWAIT: libc::c_int = 0x80;
66-
#[cfg(any(target_os = "linux", target_os = "android"))]
67-
pub const MSG_DONTWAIT: libc::c_int = 0x40;
42+
pub const FIOCLEX: libc::c_ulong = 0x6601;
6843

6944
pub const WNOHANG: libc::c_int = 1;
7045

@@ -123,13 +98,6 @@ pub struct passwd {
12398
}
12499

125100
extern {
126-
pub fn gettimeofday(timeval: *mut libc::timeval,
127-
tzp: *mut libc::c_void) -> libc::c_int;
128-
pub fn select(nfds: libc::c_int,
129-
readfds: *mut fd_set,
130-
writefds: *mut fd_set,
131-
errorfds: *mut fd_set,
132-
timeout: *mut libc::timeval) -> libc::c_int;
133101
pub fn getsockopt(sockfd: libc::c_int,
134102
level: libc::c_int,
135103
optname: libc::c_int,
@@ -165,44 +133,6 @@ extern {
165133
-> *mut libc::c_char;
166134
}
167135

168-
#[cfg(any(target_os = "macos", target_os = "ios"))]
169-
mod select {
170-
pub const FD_SETSIZE: usize = 1024;
171-
172-
#[repr(C)]
173-
pub struct fd_set {
174-
fds_bits: [i32; (FD_SETSIZE / 32)]
175-
}
176-
177-
pub fn fd_set(set: &mut fd_set, fd: i32) {
178-
set.fds_bits[(fd / 32) as usize] |= 1 << ((fd % 32) as usize);
179-
}
180-
}
181-
182-
#[cfg(any(target_os = "android",
183-
target_os = "freebsd",
184-
target_os = "dragonfly",
185-
target_os = "bitrig",
186-
target_os = "openbsd",
187-
target_os = "linux"))]
188-
mod select {
189-
use usize;
190-
use libc;
191-
192-
pub const FD_SETSIZE: usize = 1024;
193-
194-
#[repr(C)]
195-
pub struct fd_set {
196-
// FIXME: shouldn't this be a c_ulong?
197-
fds_bits: [libc::uintptr_t; (FD_SETSIZE / usize::BITS)]
198-
}
199-
200-
pub fn fd_set(set: &mut fd_set, fd: i32) {
201-
let fd = fd as usize;
202-
set.fds_bits[fd / usize::BITS] |= 1 << (fd % usize::BITS);
203-
}
204-
}
205-
206136
#[cfg(any(all(target_os = "linux",
207137
any(target_arch = "x86",
208138
target_arch = "x86_64",

0 commit comments

Comments
 (0)