Skip to content

Commit 9ea7f7f

Browse files
committed
---
yaml --- r: 226075 b: refs/heads/stable c: e136421 h: refs/heads/master i: 226073: 516ad5c 226071: 0c38715 v: v3
1 parent 603e400 commit 9ea7f7f

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
@@ -29,6 +29,6 @@ refs/heads/tmp: e5d90d98402475b6e154ce216f9efcb80da1a747
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 1fe32ca12c51afcd761d9962f51a74ff0d07a591
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: feba393b8ed60efe79f9f5207fde904d085949f5
32+
refs/heads/stable: e13642163ab258c58295bcb1f2eaa27266724f73
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b

branches/stable/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/stable/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)