Skip to content

Commit 309ab95

Browse files
committed
Removing ccdecl
as per #9606 (comment)
1 parent 16fc6a6 commit 309ab95

17 files changed

+52
-52
lines changed

Diff for: src/libextra/time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static NSEC_PER_SEC: i32 = 1_000_000_000_i32;
1919
pub mod rustrt {
2020
use super::Tm;
2121

22-
extern "cdecl" {
22+
extern {
2323
pub fn get_time(sec: &mut i64, nsec: &mut i32);
2424
pub fn precise_time_ns(ns: &mut u64);
2525
pub fn rust_tzset();

Diff for: src/libextra/unicode.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub mod icu {
162162

163163
// #[link_name = "icuuc"]
164164
#[link_args = "-licuuc"]
165-
extern "cdecl" {
165+
extern {
166166
pub fn u_hasBinaryProperty(c: UChar32, which: UProperty) -> UBool;
167167
pub fn u_isdigit(c: UChar32) -> UBool;
168168
pub fn u_islower(c: UChar32) -> UBool;

Diff for: src/librustc/lib/llvm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ pub mod llvm {
300300

301301
#[link_args = "-Lrustllvm -lrustllvm"]
302302
#[link_name = "rustllvm"]
303-
extern "cdecl" {
303+
extern {
304304
/* Create and destroy contexts. */
305305
pub fn LLVMContextCreate() -> ContextRef;
306306
pub fn LLVMContextDispose(C: ContextRef);

Diff for: src/libstd/io.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub mod rustrt {
7777
use libc;
7878

7979
#[link_name = "rustrt"]
80-
extern "cdecl" {
80+
extern {
8181
pub fn rust_get_stdin() -> *libc::FILE;
8282
pub fn rust_get_stdout() -> *libc::FILE;
8383
pub fn rust_get_stderr() -> *libc::FILE;

Diff for: src/libstd/libc.rs

+25-25
Original file line numberDiff line numberDiff line change
@@ -2666,7 +2666,7 @@ pub mod funcs {
26662666
pub mod ctype {
26672667
use libc::types::os::arch::c95::{c_char, c_int};
26682668

2669-
extern "cdecl" {
2669+
extern {
26702670
pub fn isalnum(c: c_int) -> c_int;
26712671
pub fn isalpha(c: c_int) -> c_int;
26722672
pub fn iscntrl(c: c_int) -> c_int;
@@ -2688,7 +2688,7 @@ pub mod funcs {
26882688
use libc::types::common::c95::{FILE, c_void, fpos_t};
26892689
use libc::types::os::arch::c95::{c_char, c_int, c_long, size_t};
26902690

2691-
extern "cdecl" {
2691+
extern {
26922692
pub fn fopen(filename: *c_char, mode: *c_char) -> *FILE;
26932693
pub fn freopen(filename: *c_char, mode: *c_char, file: *FILE)
26942694
-> *FILE;
@@ -2746,7 +2746,7 @@ pub mod funcs {
27462746
use libc::types::os::arch::c95::{c_long, c_uint, c_ulong};
27472747
use libc::types::os::arch::c95::{size_t};
27482748

2749-
extern "cdecl" {
2749+
extern {
27502750
pub fn abs(i: c_int) -> c_int;
27512751
pub fn labs(i: c_long) -> c_long;
27522752
// Omitted: div, ldiv (return pub type incomplete).
@@ -2778,7 +2778,7 @@ pub mod funcs {
27782778
use libc::types::os::arch::c95::{c_char, c_int, size_t};
27792779
use libc::types::os::arch::c95::{wchar_t};
27802780

2781-
extern "cdecl" {
2781+
extern {
27822782
pub fn strcpy(dst: *c_char, src: *c_char) -> *c_char;
27832783
pub fn strncpy(dst: *c_char, src: *c_char, n: size_t)
27842784
-> *c_char;
@@ -2826,7 +2826,7 @@ pub mod funcs {
28262826
use libc::types::os::common::posix01::stat;
28272827
use libc::types::os::arch::c95::{c_int, c_char};
28282828

2829-
extern "cdecl" {
2829+
extern {
28302830
#[link_name = "_chmod"]
28312831
pub fn chmod(path: *c_char, mode: c_int) -> c_int;
28322832
#[link_name = "_mkdir"]
@@ -2843,7 +2843,7 @@ pub mod funcs {
28432843
use libc::types::common::c95::FILE;
28442844
use libc::types::os::arch::c95::{c_int, c_char};
28452845

2846-
extern "cdecl" {
2846+
extern {
28472847
#[link_name = "_popen"]
28482848
pub fn popen(command: *c_char, mode: *c_char) -> *FILE;
28492849
#[link_name = "_pclose"]
@@ -2858,7 +2858,7 @@ pub mod funcs {
28582858
#[nolink]
28592859
pub mod fcntl {
28602860
use libc::types::os::arch::c95::{c_int, c_char};
2861-
extern "cdecl" {
2861+
extern {
28622862
#[link_name = "_open"]
28632863
pub fn open(path: *c_char, oflag: c_int, mode: c_int)
28642864
-> c_int;
@@ -2879,7 +2879,7 @@ pub mod funcs {
28792879
c_long, size_t};
28802880
use libc::types::os::arch::c99::intptr_t;
28812881

2882-
extern "cdecl" {
2882+
extern {
28832883
#[link_name = "_access"]
28842884
pub fn access(path: *c_char, amode: c_int) -> c_int;
28852885
#[link_name = "_chdir"]
@@ -2940,7 +2940,7 @@ pub mod funcs {
29402940
use libc::types::os::arch::posix88::mode_t;
29412941

29422942
#[nolink]
2943-
extern "cdecl" {
2943+
extern {
29442944
pub fn chmod(path: *c_char, mode: mode_t) -> c_int;
29452945
pub fn fchmod(fd: c_int, mode: mode_t) -> c_int;
29462946

@@ -2972,7 +2972,7 @@ pub mod funcs {
29722972
use libc::types::common::c95::FILE;
29732973
use libc::types::os::arch::c95::{c_char, c_int};
29742974

2975-
extern "cdecl" {
2975+
extern {
29762976
pub fn popen(command: *c_char, mode: *c_char) -> *FILE;
29772977
pub fn pclose(stream: *FILE) -> c_int;
29782978
pub fn fdopen(fd: c_int, mode: *c_char) -> *FILE;
@@ -2985,7 +2985,7 @@ pub mod funcs {
29852985
use libc::types::os::arch::c95::{c_char, c_int};
29862986
use libc::types::os::arch::posix88::mode_t;
29872987

2988-
extern "cdecl" {
2988+
extern {
29892989
pub fn open(path: *c_char, oflag: c_int, mode: c_int)
29902990
-> c_int;
29912991
pub fn creat(path: *c_char, mode: mode_t) -> c_int;
@@ -3013,12 +3013,12 @@ pub mod funcs {
30133013
rust_readdir(dirp)
30143014
}
30153015

3016-
extern "cdecl" {
3016+
extern {
30173017
fn rust_opendir(dirname: *c_char) -> *DIR;
30183018
fn rust_readdir(dirp: *DIR) -> *dirent_t;
30193019
}
30203020

3021-
extern "cdecl" {
3021+
extern {
30223022
pub fn closedir(dirp: *DIR) -> c_int;
30233023
pub fn rewinddir(dirp: *DIR);
30243024
pub fn seekdir(dirp: *DIR, loc: c_long);
@@ -3034,7 +3034,7 @@ pub mod funcs {
30343034
use libc::types::os::arch::posix88::{gid_t, off_t, pid_t};
30353035
use libc::types::os::arch::posix88::{ssize_t, uid_t};
30363036

3037-
extern "cdecl" {
3037+
extern {
30383038
pub fn access(path: *c_char, amode: c_int) -> c_int;
30393039
pub fn alarm(seconds: c_uint) -> c_uint;
30403040
pub fn chdir(dir: *c_char) -> c_int;
@@ -3090,7 +3090,7 @@ pub mod funcs {
30903090
use libc::types::os::arch::c95::{c_int};
30913091
use libc::types::os::arch::posix88::{pid_t};
30923092

3093-
extern "cdecl" {
3093+
extern {
30943094
pub fn kill(pid: pid_t, sig: c_int) -> c_int;
30953095
}
30963096
}
@@ -3101,7 +3101,7 @@ pub mod funcs {
31013101
use libc::types::os::arch::c95::{size_t, c_int, c_char};
31023102
use libc::types::os::arch::posix88::{mode_t, off_t};
31033103

3104-
extern "cdecl" {
3104+
extern {
31053105
pub fn mlock(addr: *c_void, len: size_t) -> c_int;
31063106
pub fn munlock(addr: *c_void, len: size_t) -> c_int;
31073107
pub fn mlockall(flags: c_int) -> c_int;
@@ -3138,7 +3138,7 @@ pub mod funcs {
31383138
use libc::types::os::arch::c95::{c_char, c_int};
31393139
use libc::types::os::arch::posix01::stat;
31403140

3141-
extern "cdecl" {
3141+
extern {
31423142
#[cfg(target_os = "linux")]
31433143
#[cfg(target_os = "freebsd")]
31443144
#[cfg(target_os = "android")]
@@ -3155,7 +3155,7 @@ pub mod funcs {
31553155
use libc::types::os::arch::c95::{c_char, c_int, size_t};
31563156
use libc::types::os::arch::posix88::{ssize_t};
31573157

3158-
extern "cdecl" {
3158+
extern {
31593159
pub fn readlink(path: *c_char,
31603160
buf: *mut c_char,
31613161
bufsz: size_t)
@@ -3181,7 +3181,7 @@ pub mod funcs {
31813181
use libc::types::os::arch::c95::{c_int};
31823182
use libc::types::os::arch::posix88::{pid_t};
31833183

3184-
extern "cdecl" {
3184+
extern {
31853185
pub fn waitpid(pid: pid_t, status: *mut c_int, options: c_int)
31863186
-> pid_t;
31873187
}
@@ -3193,7 +3193,7 @@ pub mod funcs {
31933193
use libc::types::os::common::posix01::{glob_t};
31943194
use option::Option;
31953195

3196-
extern "cdecl" {
3196+
extern {
31973197
pub fn glob(pattern: *c_char,
31983198
flags: c_int,
31993199
errfunc: Option<extern "C" fn(epath: *c_char, errno: int) -> int>,
@@ -3207,7 +3207,7 @@ pub mod funcs {
32073207
use libc::types::common::c95::{c_void};
32083208
use libc::types::os::arch::c95::{c_int, size_t};
32093209

3210-
extern "cdecl" {
3210+
extern {
32113211
pub fn posix_madvise(addr: *c_void,
32123212
len: size_t,
32133213
advice: c_int)
@@ -3250,7 +3250,7 @@ pub mod funcs {
32503250
use libc::types::os::arch::c95::{c_char, c_uchar, c_int, c_uint,
32513251
size_t};
32523252

3253-
extern "cdecl" {
3253+
extern {
32543254
pub fn sysctl(name: *c_int,
32553255
namelen: c_uint,
32563256
oldp: *mut c_void,
@@ -3283,7 +3283,7 @@ pub mod funcs {
32833283
use libc::types::common::c95::{c_void};
32843284
use libc::types::os::arch::c95::{c_uchar, c_int, size_t};
32853285

3286-
extern "cdecl" {
3286+
extern {
32873287
pub fn getdtablesize() -> c_int;
32883288
pub fn madvise(addr: *c_void, len: size_t, advice: c_int)
32893289
-> c_int;
@@ -3302,7 +3302,7 @@ pub mod funcs {
33023302
pub mod extra {
33033303
use libc::types::os::arch::c95::{c_char, c_int};
33043304

3305-
extern "cdecl" {
3305+
extern {
33063306
pub fn _NSGetExecutablePath(buf: *mut c_char, bufsize: *mut u32)
33073307
-> c_int;
33083308
}
@@ -3548,7 +3548,7 @@ pub mod funcs {
35483548
use libc::types::os::arch::c95::{c_int, c_long};
35493549

35503550
#[nolink]
3551-
extern "cdecl" {
3551+
extern {
35523552
#[link_name = "_commit"]
35533553
pub fn commit(fd: c_int) -> c_int;
35543554

Diff for: src/libstd/num/cmath.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub mod c_double_utils {
1818
use libc::{c_double, c_int};
1919

2020
#[link_name = "m"]
21-
extern "cdecl" {
21+
extern {
2222
// Alpabetically sorted by link_name
2323

2424
pub fn acos(n: c_double) -> c_double;
@@ -106,7 +106,7 @@ pub mod c_float_utils {
106106
use libc::{c_float, c_int};
107107

108108
#[link_name = "m"]
109-
extern "cdecl" {
109+
extern {
110110
// Alpabetically sorted by link_name
111111

112112
#[link_name="acosf"]

Diff for: src/test/auxiliary/anon-extern-mod-cross-crate-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
use std::libc;
1818

19-
extern "cdecl" {
19+
extern {
2020
pub fn rust_get_test_int() -> libc::intptr_t;
2121
}

Diff for: src/test/compile-fail/foreign-unsafe-fn-called.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
mod test {
14-
extern "cdecl" {
14+
extern {
1515
pub fn free();
1616
}
1717
}

Diff for: src/test/run-pass/anon-extern-mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use std::libc;
1212

1313
#[link_name = "rustrt"]
14-
extern "cdecl" {
14+
extern {
1515
fn rust_get_test_int() -> libc::intptr_t;
1616
}
1717

Diff for: src/test/run-pass/c-stack-as-value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
mod rustrt {
1212
use std::libc;
1313

14-
extern "cdecl" {
14+
extern {
1515
pub fn rust_get_test_int() -> libc::intptr_t;
1616
}
1717
}

Diff for: src/test/run-pass/c-stack-returning-int64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mod libc {
1212
use std::libc::{c_char, c_long, c_longlong};
1313

1414
#[nolink]
15-
extern "cdecl" {
15+
extern {
1616
pub fn atol(x: *c_char) -> c_long;
1717
pub fn atoll(x: *c_char) -> c_longlong;
1818
}

Diff for: src/test/run-pass/conditional-compile.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ static b: bool = true;
2121

2222
mod rustrt {
2323
#[cfg(bogus)]
24-
extern "cdecl" {
24+
extern {
2525
// This symbol doesn't exist and would be a link error if this
2626
// module was translated
2727
pub fn bogus();
2828
}
2929

30-
extern "cdecl" {}
30+
extern {}
3131
}
3232

3333
#[cfg(bogus)]
@@ -107,7 +107,7 @@ fn test_in_fn_ctxt() {
107107

108108
mod test_foreign_items {
109109
pub mod rustrt {
110-
extern "cdecl" {
110+
extern {
111111
#[cfg(bogus)]
112112
pub fn rust_get_stdin() -> ~str;
113113
pub fn rust_get_stdin() -> ~str;

Diff for: src/test/run-pass/foreign-dupe.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mod rustrt1 {
1515
use std::libc;
1616

1717
#[link_name = "rustrt"]
18-
extern "cdecl" {
18+
extern {
1919
pub fn rust_get_test_int() -> libc::intptr_t;
2020
}
2121
}
@@ -24,7 +24,7 @@ mod rustrt2 {
2424
use std::libc;
2525

2626
#[link_name = "rustrt"]
27-
extern "cdecl" {
27+
extern {
2828
pub fn rust_get_test_int() -> libc::intptr_t;
2929
}
3030
}

Diff for: src/test/run-pass/foreign-fn-linkname.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mod libc {
1414
use std::libc::{c_char, size_t};
1515

1616
#[nolink]
17-
extern "cdecl" {
17+
extern {
1818
#[link_name = "strlen"]
1919
pub fn my_strlen(str: *c_char) -> size_t;
2020
}

0 commit comments

Comments
 (0)