Skip to content

Commit 60a585a

Browse files
committed
---
yaml --- r: 46845 b: refs/heads/auto c: 87e44af h: refs/heads/master i: 46843: 9518015 v: v3
1 parent c844d71 commit 60a585a

File tree

9 files changed

+239
-196
lines changed

9 files changed

+239
-196
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: fd271adc75799435a920f1afaa0488e43badc749
17+
refs/heads/auto: 87e44af2f2731ea59207aef456caa391ef230645

branches/auto/src/libstd/arena.rs

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,26 @@ use core::sys;
4646
use core::uint;
4747
use core::vec;
4848

49-
#[abi = "rust-intrinsic"]
50-
extern mod rusti {
51-
fn move_val_init<T>(dst: &mut T, -src: T);
52-
fn needs_drop<T>() -> bool;
49+
pub mod rusti {
50+
#[abi = "rust-intrinsic"]
51+
pub extern {
52+
fn move_val_init<T>(dst: &mut T, -src: T);
53+
fn needs_drop<T>() -> bool;
54+
}
5355
}
5456

55-
extern mod rustrt {
56-
#[rust_stack]
57-
unsafe fn rust_call_tydesc_glue(root: *u8,
58-
tydesc: *TypeDesc,
59-
field: size_t);
57+
pub mod rustrt {
58+
use core::libc::size_t;
59+
use core::sys::TypeDesc;
60+
61+
pub extern {
62+
#[rust_stack]
63+
unsafe fn rust_call_tydesc_glue(root: *u8,
64+
tydesc: *TypeDesc,
65+
field: size_t);
66+
}
6067
}
68+
6169
// This probably belongs somewhere else. Needs to be kept in sync with
6270
// changes to glue...
6371
const tydesc_drop_glue_index: size_t = 3 as size_t;

branches/auto/src/libstd/dbg.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,19 @@ use core::cast::reinterpret_cast;
1414
use core::ptr;
1515
use core::sys;
1616

17-
#[abi = "cdecl"]
18-
extern mod rustrt {
19-
pub unsafe fn debug_tydesc(td: *sys::TypeDesc);
20-
pub unsafe fn debug_opaque(td: *sys::TypeDesc, x: *());
21-
pub unsafe fn debug_box(td: *sys::TypeDesc, x: *());
22-
pub unsafe fn debug_tag(td: *sys::TypeDesc, x: *());
23-
pub unsafe fn debug_fn(td: *sys::TypeDesc, x: *());
24-
pub unsafe fn debug_ptrcast(td: *sys::TypeDesc, x: *()) -> *();
25-
pub unsafe fn rust_dbg_breakpoint();
17+
pub mod rustrt {
18+
use core::sys;
19+
20+
#[abi = "cdecl"]
21+
pub extern {
22+
pub unsafe fn debug_tydesc(td: *sys::TypeDesc);
23+
pub unsafe fn debug_opaque(td: *sys::TypeDesc, x: *());
24+
pub unsafe fn debug_box(td: *sys::TypeDesc, x: *());
25+
pub unsafe fn debug_tag(td: *sys::TypeDesc, x: *());
26+
pub unsafe fn debug_fn(td: *sys::TypeDesc, x: *());
27+
pub unsafe fn debug_ptrcast(td: *sys::TypeDesc, x: *()) -> *();
28+
pub unsafe fn rust_dbg_breakpoint();
29+
}
2630
}
2731

2832
pub fn debug_tydesc<T>() {

branches/auto/src/libstd/net_tcp.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,16 @@ use core::result;
3232
use core::uint;
3333
use core::vec;
3434

35-
#[nolink]
36-
extern mod rustrt {
37-
unsafe fn rust_uv_current_kernel_malloc(size: libc::c_uint)
38-
-> *libc::c_void;
39-
unsafe fn rust_uv_current_kernel_free(mem: *libc::c_void);
40-
unsafe fn rust_uv_helper_uv_tcp_t_size() -> libc::c_uint;
35+
pub mod rustrt {
36+
use core::libc;
37+
38+
#[nolink]
39+
pub extern {
40+
unsafe fn rust_uv_current_kernel_malloc(size: libc::c_uint)
41+
-> *libc::c_void;
42+
unsafe fn rust_uv_current_kernel_free(mem: *libc::c_void);
43+
unsafe fn rust_uv_helper_uv_tcp_t_size() -> libc::c_uint;
44+
}
4145
}
4246

4347
/**

branches/auto/src/libstd/rl.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ use core::prelude::*;
1616
use core::str;
1717
use core::task;
1818

19-
extern mod rustrt {
20-
pub unsafe fn linenoise(prompt: *c_char) -> *c_char;
21-
pub unsafe fn linenoiseHistoryAdd(line: *c_char) -> c_int;
22-
pub unsafe fn linenoiseHistorySetMaxLen(len: c_int) -> c_int;
23-
pub unsafe fn linenoiseHistorySave(file: *c_char) -> c_int;
24-
pub unsafe fn linenoiseHistoryLoad(file: *c_char) -> c_int;
25-
pub unsafe fn linenoiseSetCompletionCallback(callback: *u8);
26-
pub unsafe fn linenoiseAddCompletion(completions: *(), line: *c_char);
19+
pub mod rustrt {
20+
use core::libc::{c_char, c_int};
21+
22+
pub extern {
23+
pub unsafe fn linenoise(prompt: *c_char) -> *c_char;
24+
pub unsafe fn linenoiseHistoryAdd(line: *c_char) -> c_int;
25+
pub unsafe fn linenoiseHistorySetMaxLen(len: c_int) -> c_int;
26+
pub unsafe fn linenoiseHistorySave(file: *c_char) -> c_int;
27+
pub unsafe fn linenoiseHistoryLoad(file: *c_char) -> c_int;
28+
pub unsafe fn linenoiseSetCompletionCallback(callback: *u8);
29+
pub unsafe fn linenoiseAddCompletion(completions: *(), line: *c_char);
30+
}
2731
}
2832

2933
/// Add a line to history

branches/auto/src/libstd/test.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ use core::str;
3535
use core::task;
3636
use core::vec;
3737

38-
#[abi = "cdecl"]
39-
extern mod rustrt {
40-
pub unsafe fn rust_sched_threads() -> size_t;
38+
pub mod rustrt {
39+
use core::libc::size_t;
40+
41+
#[abi = "cdecl"]
42+
pub extern {
43+
pub unsafe fn rust_sched_threads() -> size_t;
44+
}
4145
}
4246

4347
// The name of a test. By convention this follows the rules for rust

branches/auto/src/libstd/time.rs

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,26 @@ use core::str;
1919

2020
const NSEC_PER_SEC: i32 = 1_000_000_000_i32;
2121

22-
#[abi = "cdecl"]
23-
extern mod rustrt {
24-
pub unsafe fn get_time(sec: &mut i64, nsec: &mut i32);
25-
26-
pub unsafe fn precise_time_ns(ns: &mut u64);
27-
28-
pub unsafe fn rust_tzset();
29-
// FIXME: The i64 values can be passed by-val when #2064 is fixed.
30-
pub unsafe fn rust_gmtime(&&sec: i64, &&nsec: i32, &&result: Tm);
31-
pub unsafe fn rust_localtime(&&sec: i64, &&nsec: i32, &&result: Tm);
32-
pub unsafe fn rust_timegm(&&tm: Tm, sec: &mut i64);
33-
pub unsafe fn rust_mktime(&&tm: Tm, sec: &mut i64);
22+
pub mod rustrt {
23+
use super::Tm;
24+
25+
#[cfg(target_os = "linux")]
26+
#[link_args = "-lrt"]
27+
pub extern {}
28+
29+
#[abi = "cdecl"]
30+
pub extern {
31+
pub unsafe fn get_time(sec: &mut i64, nsec: &mut i32);
32+
33+
pub unsafe fn precise_time_ns(ns: &mut u64);
34+
35+
pub unsafe fn rust_tzset();
36+
// FIXME: The i64 values can be passed by-val when #2064 is fixed.
37+
pub unsafe fn rust_gmtime(&&sec: i64, &&nsec: i32, &&result: Tm);
38+
pub unsafe fn rust_localtime(&&sec: i64, &&nsec: i32, &&result: Tm);
39+
pub unsafe fn rust_timegm(&&tm: Tm, sec: &mut i64);
40+
pub unsafe fn rust_mktime(&&tm: Tm, sec: &mut i64);
41+
}
3442
}
3543

3644
/// A record specifying a time value in seconds and nanoseconds.

branches/auto/src/libstd/unicode.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,19 @@ pub mod icu {
157157

158158
pub const UCHAR_INVALID_CODE : UProperty = -1;
159159

160-
#[link_name = "icuuc"]
161-
#[abi = "cdecl"]
162-
pub extern mod libicu {
163-
unsafe fn u_hasBinaryProperty(c: UChar32, which: UProperty) -> UBool;
164-
unsafe fn u_isdigit(c: UChar32) -> UBool;
165-
unsafe fn u_islower(c: UChar32) -> UBool;
166-
unsafe fn u_isspace(c: UChar32) -> UBool;
167-
unsafe fn u_isupper(c: UChar32) -> UBool;
168-
unsafe fn u_tolower(c: UChar32) -> UChar32;
169-
unsafe fn u_toupper(c: UChar32) -> UChar32;
160+
pub mod libicu {
161+
#[link_name = "icuuc"]
162+
#[abi = "cdecl"]
163+
pub extern {
164+
unsafe fn u_hasBinaryProperty(c: UChar32, which: UProperty)
165+
-> UBool;
166+
unsafe fn u_isdigit(c: UChar32) -> UBool;
167+
unsafe fn u_islower(c: UChar32) -> UBool;
168+
unsafe fn u_isspace(c: UChar32) -> UBool;
169+
unsafe fn u_isupper(c: UChar32) -> UBool;
170+
unsafe fn u_tolower(c: UChar32) -> UChar32;
171+
unsafe fn u_toupper(c: UChar32) -> UChar32;
172+
}
170173
}
171174
}
172175

0 commit comments

Comments
 (0)