Skip to content

Commit d46a7dd

Browse files
committed
---
yaml --- r: 120734 b: refs/heads/dist-snap c: cd6fb59 h: refs/heads/master v: v3
1 parent 94788b9 commit d46a7dd

File tree

10 files changed

+122
-30
lines changed

10 files changed

+122
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 8c5a8e10b25fdd2e12de78f04d2f538a22776024
9+
refs/heads/dist-snap: cd6fb59ee266d0eeb60a9bcfdd1c513a88a50c5c
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ then
725725
if [ -z "$CC" ]
726726
then
727727
CFG_CC="clang"
728+
CFG_CXX="clang++"
728729
fi
729730
;;
730731
(*)

branches/dist-snap/src/libcore/mem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ pub unsafe fn overwrite<T>(dst: *mut T, src: T) {
160160
intrinsics::move_val_init(&mut *dst, src)
161161
}
162162

163-
/// Deprecated, use move_val_init() instead
163+
/// Deprecated, use `overwrite` instead
164164
#[inline]
165-
#[deprecated = "this function has been renamed to move_val_init()"]
165+
#[deprecated = "this function has been renamed to `overwrite`"]
166166
pub unsafe fn move_val_init<T>(dst: &mut T, src: T) {
167167
overwrite(dst, src)
168168
}

branches/dist-snap/src/libgreen/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ fn initialize_call_frame(regs: &mut Registers, fptr: InitFn, arg: uint,
270270
type Registers = [uint, ..32];
271271

272272
#[cfg(target_arch = "mips")]
273-
fn new_regs() -> Box<Registers> { box [0, .. 32] }
273+
fn new_regs() -> Box<Registers> { box {[0, .. 32]} }
274274

275275
#[cfg(target_arch = "mips")]
276276
fn initialize_call_frame(regs: &mut Registers, fptr: InitFn, arg: uint,

branches/dist-snap/src/liblibc/lib.rs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2476,6 +2476,9 @@ pub mod consts {
24762476
}
24772477
pub mod posix08 {
24782478
}
2479+
#[cfg(target_arch = "arm")]
2480+
#[cfg(target_arch = "x86")]
2481+
#[cfg(target_arch = "x86_64")]
24792482
pub mod bsd44 {
24802483
use types::os::arch::c95::c_int;
24812484

@@ -2518,6 +2521,49 @@ pub mod consts {
25182521
pub static SHUT_WR: c_int = 1;
25192522
pub static SHUT_RDWR: c_int = 2;
25202523
}
2524+
#[cfg(target_arch = "mips")]
2525+
pub mod bsd44 {
2526+
use types::os::arch::c95::c_int;
2527+
2528+
pub static MADV_NORMAL : c_int = 0;
2529+
pub static MADV_RANDOM : c_int = 1;
2530+
pub static MADV_SEQUENTIAL : c_int = 2;
2531+
pub static MADV_WILLNEED : c_int = 3;
2532+
pub static MADV_DONTNEED : c_int = 4;
2533+
pub static MADV_REMOVE : c_int = 9;
2534+
pub static MADV_DONTFORK : c_int = 10;
2535+
pub static MADV_DOFORK : c_int = 11;
2536+
pub static MADV_MERGEABLE : c_int = 12;
2537+
pub static MADV_UNMERGEABLE : c_int = 13;
2538+
pub static MADV_HWPOISON : c_int = 100;
2539+
2540+
pub static AF_UNIX: c_int = 1;
2541+
pub static AF_INET: c_int = 2;
2542+
pub static AF_INET6: c_int = 10;
2543+
pub static SOCK_STREAM: c_int = 2;
2544+
pub static SOCK_DGRAM: c_int = 1;
2545+
pub static IPPROTO_TCP: c_int = 6;
2546+
pub static IPPROTO_IP: c_int = 0;
2547+
pub static IPPROTO_IPV6: c_int = 41;
2548+
pub static IP_MULTICAST_TTL: c_int = 33;
2549+
pub static IP_MULTICAST_LOOP: c_int = 34;
2550+
pub static IP_TTL: c_int = 2;
2551+
pub static IP_ADD_MEMBERSHIP: c_int = 35;
2552+
pub static IP_DROP_MEMBERSHIP: c_int = 36;
2553+
pub static IPV6_ADD_MEMBERSHIP: c_int = 20;
2554+
pub static IPV6_DROP_MEMBERSHIP: c_int = 21;
2555+
2556+
pub static TCP_NODELAY: c_int = 1;
2557+
pub static SOL_SOCKET: c_int = 65535;
2558+
pub static SO_KEEPALIVE: c_int = 8;
2559+
pub static SO_BROADCAST: c_int = 32;
2560+
pub static SO_REUSEADDR: c_int = 4;
2561+
pub static SO_ERROR: c_int = 4103;
2562+
2563+
pub static SHUT_RD: c_int = 0;
2564+
pub static SHUT_WR: c_int = 1;
2565+
pub static SHUT_RDWR: c_int = 2;
2566+
}
25212567
#[cfg(target_arch = "x86")]
25222568
#[cfg(target_arch = "x86_64")]
25232569
#[cfg(target_arch = "arm")]

branches/dist-snap/src/libnative/io/c_unix.rs

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,20 @@ use libc;
2222
#[cfg(target_os = "macos")]
2323
#[cfg(target_os = "freebsd")]
2424
pub static FIONBIO: libc::c_ulong = 0x8004667e;
25-
#[cfg(target_os = "linux")]
25+
#[cfg(target_os = "linux", not(target_arch = "mips"))]
2626
#[cfg(target_os = "android")]
2727
pub static FIONBIO: libc::c_ulong = 0x5421;
28+
#[cfg(target_os = "linux", target_arch = "mips")]
29+
pub static FIONBIO: libc::c_ulong = 0x667e;
30+
2831
#[cfg(target_os = "macos")]
2932
#[cfg(target_os = "freebsd")]
3033
pub static FIOCLEX: libc::c_ulong = 0x20006601;
31-
#[cfg(target_os = "linux")]
34+
#[cfg(target_os = "linux", not(target_arch = "mips"))]
3235
#[cfg(target_os = "android")]
3336
pub static FIOCLEX: libc::c_ulong = 0x5451;
37+
#[cfg(target_os = "linux", target_arch = "mips")]
38+
pub static FIOCLEX: libc::c_ulong = 0x6601;
3439

3540
#[cfg(target_os = "macos")]
3641
#[cfg(target_os = "freebsd")]
@@ -100,7 +105,7 @@ mod select {
100105
}
101106
}
102107

103-
#[cfg(target_os = "linux")]
108+
#[cfg(target_os = "linux", not(target_arch = "mips"))]
104109
#[cfg(target_os = "android")]
105110
mod signal {
106111
use libc;
@@ -143,6 +148,44 @@ mod signal {
143148
}
144149
}
145150

151+
#[cfg(target_os = "linux", target_arch = "mips")]
152+
mod signal {
153+
use libc;
154+
155+
pub static SA_NOCLDSTOP: libc::c_ulong = 0x00000001;
156+
pub static SA_NOCLDWAIT: libc::c_ulong = 0x00010000;
157+
pub static SA_NODEFER: libc::c_ulong = 0x40000000;
158+
pub static SA_ONSTACK: libc::c_ulong = 0x08000000;
159+
pub static SA_RESETHAND: libc::c_ulong = 0x80000000;
160+
pub static SA_RESTART: libc::c_ulong = 0x10000000;
161+
pub static SA_SIGINFO: libc::c_ulong = 0x00000008;
162+
pub static SIGCHLD: libc::c_int = 18;
163+
164+
// This definition is not as accurate as it could be, {pid, uid, status} is
165+
// actually a giant union. Currently we're only interested in these fields,
166+
// however.
167+
pub struct siginfo {
168+
si_signo: libc::c_int,
169+
si_code: libc::c_int,
170+
si_errno: libc::c_int,
171+
pub pid: libc::pid_t,
172+
pub uid: libc::uid_t,
173+
pub status: libc::c_int,
174+
}
175+
176+
pub struct sigaction {
177+
pub sa_flags: libc::c_uint,
178+
pub sa_handler: extern fn(libc::c_int),
179+
pub sa_mask: sigset_t,
180+
sa_restorer: *mut libc::c_void,
181+
sa_resv: [libc::c_int, ..1],
182+
}
183+
184+
pub struct sigset_t {
185+
__val: [libc::c_ulong, ..32],
186+
}
187+
}
188+
146189
#[cfg(target_os = "macos")]
147190
#[cfg(target_os = "freebsd")]
148191
mod signal {

branches/dist-snap/src/libnative/io/net.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ enum InAddr {
4242
fn ip_to_inaddr(ip: ip::IpAddr) -> InAddr {
4343
match ip {
4444
ip::Ipv4Addr(a, b, c, d) => {
45+
let ip = (a as u32 << 24) |
46+
(b as u32 << 16) |
47+
(c as u32 << 8) |
48+
(d as u32 << 0);
4549
InAddr(libc::in_addr {
46-
s_addr: (d as u32 << 24) |
47-
(c as u32 << 16) |
48-
(b as u32 << 8) |
49-
(a as u32 << 0)
50+
s_addr: mem::from_be32(ip)
5051
})
5152
}
5253
ip::Ipv6Addr(a, b, c, d, e, f, g, h) => {
@@ -174,11 +175,11 @@ pub fn sockaddr_to_addr(storage: &libc::sockaddr_storage,
174175
let storage: &libc::sockaddr_in = unsafe {
175176
mem::transmute(storage)
176177
};
177-
let addr = storage.sin_addr.s_addr as u32;
178-
let a = (addr >> 0) as u8;
179-
let b = (addr >> 8) as u8;
180-
let c = (addr >> 16) as u8;
181-
let d = (addr >> 24) as u8;
178+
let ip = mem::to_be32(storage.sin_addr.s_addr as u32);
179+
let a = (ip >> 24) as u8;
180+
let b = (ip >> 16) as u8;
181+
let c = (ip >> 8) as u8;
182+
let d = (ip >> 0) as u8;
182183
Ok(ip::SocketAddr {
183184
ip: ip::Ipv4Addr(a, b, c, d),
184185
port: ntohs(storage.sin_port),

branches/dist-snap/src/librustdoc/html/render.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,10 +1094,10 @@ impl<'a> Item<'a> {
10941094
let path = cache.external_paths.get(&self.item.def_id);
10951095
let root = match *cache.extern_locations.get(&self.item.def_id.krate) {
10961096
Remote(ref s) => s.to_string(),
1097-
Local => format!("{}/..", self.cx.root_path),
1097+
Local => self.cx.root_path.clone(),
10981098
Unknown => return None,
10991099
};
1100-
Some(format!("{root}/{path}/{file}?gotosrc={goto}",
1100+
Some(format!("{root}{path}/{file}?gotosrc={goto}",
11011101
root = root,
11021102
path = path.slice_to(path.len() - 1).connect("/"),
11031103
file = item_path(self.item),

branches/dist-snap/src/librustuv/net.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ pub fn sockaddr_to_addr(storage: &libc::sockaddr_storage,
4343
let storage: &libc::sockaddr_in = unsafe {
4444
mem::transmute(storage)
4545
};
46-
let addr = storage.sin_addr.s_addr as u32;
47-
let a = (addr >> 0) as u8;
48-
let b = (addr >> 8) as u8;
49-
let c = (addr >> 16) as u8;
50-
let d = (addr >> 24) as u8;
46+
let ip = mem::to_be32(storage.sin_addr.s_addr as u32);
47+
let a = (ip >> 24) as u8;
48+
let b = (ip >> 16) as u8;
49+
let c = (ip >> 8) as u8;
50+
let d = (ip >> 0) as u8;
5151
ip::SocketAddr {
5252
ip: ip::Ipv4Addr(a, b, c, d),
5353
port: ntohs(storage.sin_port),
@@ -82,15 +82,16 @@ fn addr_to_sockaddr(addr: ip::SocketAddr) -> (libc::sockaddr_storage, uint) {
8282
let mut storage: libc::sockaddr_storage = mem::zeroed();
8383
let len = match addr.ip {
8484
ip::Ipv4Addr(a, b, c, d) => {
85+
let ip = (a as u32 << 24) |
86+
(b as u32 << 16) |
87+
(c as u32 << 8) |
88+
(d as u32 << 0);
8589
let storage: &mut libc::sockaddr_in =
8690
mem::transmute(&mut storage);
8791
(*storage).sin_family = libc::AF_INET as libc::sa_family_t;
8892
(*storage).sin_port = htons(addr.port);
8993
(*storage).sin_addr = libc::in_addr {
90-
s_addr: (d as u32 << 24) |
91-
(c as u32 << 16) |
92-
(b as u32 << 8) |
93-
(a as u32 << 0)
94+
s_addr: mem::from_be32(ip)
9495
};
9596
mem::size_of::<libc::sockaddr_in>()
9697
}

branches/dist-snap/src/libstd/macros.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,11 @@ macro_rules! vec(
331331
)
332332

333333

334-
/// A macro to select an event from a number of ports.
334+
/// A macro to select an event from a number of receivers.
335335
///
336336
/// This macro is used to wait for the first event to occur on a number of
337-
/// ports. It places no restrictions on the types of ports given to this macro,
338-
/// this can be viewed as a heterogeneous select.
337+
/// receivers. It places no restrictions on the types of receivers given to
338+
/// this macro, this can be viewed as a heterogeneous select.
339339
///
340340
/// # Example
341341
///

0 commit comments

Comments
 (0)