Skip to content

Commit ed01c6d

Browse files
committed
---
yaml --- r: 24531 b: refs/heads/try2 c: debb7e4 h: refs/heads/master i: 24529: c458c1c 24527: 5358239 v: v3
1 parent ea6f845 commit ed01c6d

File tree

128 files changed

+250
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+250
-250
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 7259195caff1fdcce6266e6ecf51c0fd614e041f
8+
refs/heads/try2: debb7e4641af2ea71cf8733b3f071d614803dcbd
99
refs/heads/incoming: 05543fd04dfb3f63b453a331e239ceb1a9a219f9
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/src/fuzzer/fuzzer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ fn content_is_dangerous_to_run(code: str) -> bool {
454454
let dangerous_patterns =
455455
~["xfail-test",
456456
"import", // espeically fs, run
457-
"native",
457+
"extern",
458458
"unsafe",
459459
"log"]; // python --> rust pipe deadlock?
460460

branches/try2/src/libcore/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export arc, get, clone, shared_arc, get_arc;
99
export exclusive, methods;
1010

1111
#[abi = "cdecl"]
12-
native mod rustrt {
12+
extern mod rustrt {
1313
#[rust_stack]
1414
fn rust_atomic_increment(p: &mut libc::intptr_t)
1515
-> libc::intptr_t;

branches/try2/src/libcore/cmath.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import libc::c_double;
1717

1818
#[link_name = "m"]
1919
#[abi = "cdecl"]
20-
native mod c_double {
20+
extern mod c_double {
2121

2222
// Alpabetically sorted by link_name
2323

@@ -95,7 +95,7 @@ native mod c_double {
9595

9696
#[link_name = "m"]
9797
#[abi = "cdecl"]
98-
native mod c_float {
98+
extern mod c_float {
9999

100100
// Alpabetically sorted by link_name
101101

branches/try2/src/libcore/comm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ enum rust_port {}
258258
type port_id = int;
259259

260260
#[abi = "cdecl"]
261-
native mod rustrt {
261+
extern mod rustrt {
262262
fn rust_port_id_send(target_port: port_id, data: *()) -> libc::uintptr_t;
263263

264264
fn new_port(unit_sz: libc::size_t) -> *rust_port;
@@ -280,7 +280,7 @@ native mod rustrt {
280280
}
281281

282282
#[abi = "rust-intrinsic"]
283-
native mod rusti {
283+
extern mod rusti {
284284
fn init<T>() -> T;
285285
}
286286

branches/try2/src/libcore/io.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import libc::consts::os::extra::*;
1414
type fd_t = c_int;
1515

1616
#[abi = "cdecl"]
17-
native mod rustrt {
17+
extern mod rustrt {
1818
fn rust_get_stdin() -> *libc::FILE;
1919
fn rust_get_stdout() -> *libc::FILE;
2020
fn rust_get_stderr() -> *libc::FILE;
@@ -377,11 +377,11 @@ impl of writer for fd_t {
377377
}
378378
}
379379
fn seek(_offset: int, _whence: seek_style) {
380-
#error("need 64-bit native calls for seek, sorry");
380+
#error("need 64-bit foreign calls for seek, sorry");
381381
fail;
382382
}
383383
fn tell() -> uint {
384-
#error("need 64-bit native calls for tell, sorry");
384+
#error("need 64-bit foreign calls for tell, sorry");
385385
fail;
386386
}
387387
fn flush() -> int { 0 }

branches/try2/src/libcore/libc.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ mod funcs {
731731

732732
#[nolink]
733733
#[abi = "cdecl"]
734-
native mod ctype {
734+
extern mod ctype {
735735
fn isalnum(c: c_int) -> c_int;
736736
fn isalpha(c: c_int) -> c_int;
737737
fn iscntrl(c: c_int) -> c_int;
@@ -749,7 +749,7 @@ mod funcs {
749749

750750
#[nolink]
751751
#[abi = "cdecl"]
752-
native mod stdio {
752+
extern mod stdio {
753753

754754
fn fopen(filename: *c_char, mode: *c_char) -> *FILE;
755755
fn freopen(filename: *c_char, mode: *c_char,
@@ -793,7 +793,7 @@ mod funcs {
793793

794794
#[nolink]
795795
#[abi = "cdecl"]
796-
native mod stdlib {
796+
extern mod stdlib {
797797
fn abs(i: c_int) -> c_int;
798798
fn labs(i: c_long) -> c_long;
799799
// Omitted: div, ldiv (return type incomplete).
@@ -818,7 +818,7 @@ mod funcs {
818818

819819
#[nolink]
820820
#[abi = "cdecl"]
821-
native mod string {
821+
extern mod string {
822822

823823
fn strcpy(dst: *c_char, src: *c_char) -> *c_char;
824824
fn strncpy(dst: *c_char, src: *c_char, n: size_t) -> *c_char;
@@ -856,7 +856,7 @@ mod funcs {
856856

857857
#[nolink]
858858
#[abi = "cdecl"]
859-
native mod stat {
859+
extern mod stat {
860860
#[link_name = "_chmod"]
861861
fn chmod(path: *c_char, mode: c_int) -> c_int;
862862

@@ -866,7 +866,7 @@ mod funcs {
866866

867867
#[nolink]
868868
#[abi = "cdecl"]
869-
native mod stdio {
869+
extern mod stdio {
870870
#[link_name = "_popen"]
871871
fn popen(command: *c_char, mode: *c_char) -> *FILE;
872872

@@ -882,7 +882,7 @@ mod funcs {
882882

883883
#[nolink]
884884
#[abi = "cdecl"]
885-
native mod fcntl {
885+
extern mod fcntl {
886886
#[link_name = "_open"]
887887
fn open(path: *c_char, oflag: c_int, mode: c_int) -> c_int;
888888

@@ -892,13 +892,13 @@ mod funcs {
892892

893893
#[nolink]
894894
#[abi = "cdecl"]
895-
native mod dirent {
895+
extern mod dirent {
896896
// Not supplied at all.
897897
}
898898

899899
#[nolink]
900900
#[abi = "cdecl"]
901-
native mod unistd {
901+
extern mod unistd {
902902
#[link_name = "_access"]
903903
fn access(path: *c_char, amode: c_int) -> c_int;
904904

@@ -966,7 +966,7 @@ mod funcs {
966966

967967
#[nolink]
968968
#[abi = "cdecl"]
969-
native mod stat {
969+
extern mod stat {
970970
fn chmod(path: *c_char, mode: mode_t) -> c_int;
971971
fn fchmod(fd: c_int, mode: mode_t) -> c_int;
972972
fn mkdir(path: *c_char, mode: mode_t) -> c_int;
@@ -975,7 +975,7 @@ mod funcs {
975975

976976
#[nolink]
977977
#[abi = "cdecl"]
978-
native mod stdio {
978+
extern mod stdio {
979979
fn popen(command: *c_char, mode: *c_char) -> *FILE;
980980
fn pclose(stream: *FILE) -> c_int;
981981
fn fdopen(fd: c_int, mode: *c_char) -> *FILE;
@@ -984,15 +984,15 @@ mod funcs {
984984

985985
#[nolink]
986986
#[abi = "cdecl"]
987-
native mod fcntl {
987+
extern mod fcntl {
988988
fn open(path: *c_char, oflag: c_int, mode: c_int) -> c_int;
989989
fn creat(path: *c_char, mode: mode_t) -> c_int;
990990
fn fcntl(fd: c_int, cmd: c_int) -> c_int;
991991
}
992992

993993
#[nolink]
994994
#[abi = "cdecl"]
995-
native mod dirent {
995+
extern mod dirent {
996996
fn opendir(dirname: *c_char) -> *DIR;
997997
fn closedir(dirp: *DIR) -> c_int;
998998
fn readdir(dirp: *DIR) -> *dirent;
@@ -1003,7 +1003,7 @@ mod funcs {
10031003

10041004
#[nolink]
10051005
#[abi = "cdecl"]
1006-
native mod unistd {
1006+
extern mod unistd {
10071007
fn access(path: *c_char, amode: c_int) -> c_int;
10081008
fn alarm(seconds: c_uint) -> c_uint;
10091009
fn chdir(dir: *c_char) -> c_int;
@@ -1056,7 +1056,7 @@ mod funcs {
10561056

10571057
#[nolink]
10581058
#[abi = "cdecl"]
1059-
native mod unistd {
1059+
extern mod unistd {
10601060
fn readlink(path: *c_char, buf: *mut c_char,
10611061
bufsz: size_t) -> ssize_t;
10621062

@@ -1073,7 +1073,7 @@ mod funcs {
10731073

10741074
#[nolink]
10751075
#[abi = "cdecl"]
1076-
native mod wait {
1076+
extern mod wait {
10771077
fn waitpid(pid: pid_t, status: *mut c_int,
10781078
options: c_int) -> pid_t;
10791079
}
@@ -1082,7 +1082,7 @@ mod funcs {
10821082
#[cfg(target_os = "win32")]
10831083
mod posix01 {
10841084
#[nolink]
1085-
native mod unistd { }
1085+
extern mod unistd { }
10861086
}
10871087

10881088

@@ -1092,15 +1092,15 @@ mod funcs {
10921092
#[cfg(target_os = "freebsd")]
10931093
mod posix08 {
10941094
#[nolink]
1095-
native mod unistd { }
1095+
extern mod unistd { }
10961096
}
10971097

10981098

10991099
#[cfg(target_os = "macos")]
11001100
#[cfg(target_os = "freebsd")]
11011101
#[nolink]
11021102
#[abi = "cdecl"]
1103-
native mod bsd44 {
1103+
extern mod bsd44 {
11041104

11051105
fn sysctl(name: *c_int, namelen: c_uint,
11061106
oldp: *mut c_void, oldlenp: *mut size_t,
@@ -1124,7 +1124,7 @@ mod funcs {
11241124
#[cfg(target_os = "macos")]
11251125
#[nolink]
11261126
#[abi = "cdecl"]
1127-
native mod extra {
1127+
extern mod extra {
11281128
fn _NSGetExecutablePath(buf: *mut c_char,
11291129
bufsize: *mut u32) -> c_int;
11301130
}
@@ -1141,7 +1141,7 @@ mod funcs {
11411141
import types::os::arch::extra::*;
11421142

11431143
#[abi = "stdcall"]
1144-
native mod kernel32 {
1144+
extern mod kernel32 {
11451145
fn GetEnvironmentVariableW(n: LPCWSTR,
11461146
v: LPWSTR,
11471147
nsize: DWORD) -> DWORD;
@@ -1165,7 +1165,7 @@ mod funcs {
11651165

11661166
#[abi = "cdecl"]
11671167
#[nolink]
1168-
native mod msvcrt {
1168+
extern mod msvcrt {
11691169
#[link_name = "_commit"]
11701170
fn commit(fd: c_int) -> c_int;
11711171
}

branches/try2/src/libcore/logging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
export console_on, console_off;
44

55
#[nolink]
6-
native mod rustrt {
6+
extern mod rustrt {
77
fn rust_log_console_on();
88
fn rust_log_console_off();
99
}

branches/try2/src/libcore/os.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export walk_dir;
3939
// FIXME: move these to str perhaps? #2620
4040
export as_c_charp, fill_charp_buf;
4141

42-
native mod rustrt {
42+
extern mod rustrt {
4343
fn rust_env_pairs() -> ~[str];
4444
fn rust_getcwd() -> str;
4545
fn rust_path_is_dir(path: *libc::c_char) -> c_int;
@@ -135,7 +135,7 @@ mod global_env {
135135
export getenv;
136136
export setenv;
137137

138-
native mod rustrt {
138+
extern mod rustrt {
139139
fn rust_global_env_chan_ptr() -> *libc::uintptr_t;
140140
}
141141

branches/try2/src/libcore/priv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import compare_and_swap = rustrt::rust_compare_and_swap_ptr;
66

77
type rust_port_id = uint;
88

9-
native mod rustrt {
9+
extern mod rustrt {
1010
fn rust_compare_and_swap_ptr(address: *libc::uintptr_t,
1111
oldval: libc::uintptr_t,
1212
newval: libc::uintptr_t) -> bool;

branches/try2/src/libcore/ptr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import libc::{c_void, size_t};
1919

2020
#[nolink]
2121
#[abi = "cdecl"]
22-
native mod libc_ {
22+
extern mod libc_ {
2323
#[rust_stack]
2424
fn memcpy(dest: *c_void, src: *c_void, n: libc::size_t) -> *c_void;
2525
#[rust_stack]
@@ -29,7 +29,7 @@ native mod libc_ {
2929
}
3030

3131
#[abi = "rust-intrinsic"]
32-
native mod rusti {
32+
extern mod rusti {
3333
fn addr_of<T>(val: T) -> *T;
3434
}
3535

branches/try2/src/libcore/rand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export xorshift, seeded_xorshift;
66
enum rctx {}
77

88
#[abi = "cdecl"]
9-
native mod rustrt {
9+
extern mod rustrt {
1010
fn rand_seed() -> ~[u8];
1111
fn rand_new() -> *rctx;
1212
fn rand_new_seeded(seed: ~[u8]) -> *rctx;

branches/try2/src/libcore/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export spawn_process;
1010
export waitpid;
1111

1212
#[abi = "cdecl"]
13-
native mod rustrt {
13+
extern mod rustrt {
1414
fn rust_run_program(argv: **libc::c_char, envp: *c_void,
1515
dir: *libc::c_char,
1616
in_fd: c_int, out_fd: c_int, err_fd: c_int)

branches/try2/src/libcore/stackwalk.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn walk_stack(visit: fn(frame) -> bool) {
3434
if *frame_address == 0u {
3535
#debug("encountered task_start_wrapper. ending walk");
3636
// This is the task_start_wrapper_frame. There is
37-
// no stack beneath it and it is a native frame.
37+
// no stack beneath it and it is a foreign frame.
3838
break;
3939
}
4040
}
@@ -72,11 +72,11 @@ fn frame_address(f: fn(*u8)) {
7272
rusti::frame_address(f)
7373
}
7474

75-
native mod rustrt {
75+
extern mod rustrt {
7676
fn rust_dbg_breakpoint();
7777
}
7878

7979
#[abi = "rust-intrinsic"]
80-
native mod rusti {
80+
extern mod rusti {
8181
fn frame_address(f: fn(*u8));
8282
}

0 commit comments

Comments
 (0)