diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2013-09-29 07:46:26 -0700 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2013-10-14 13:10:36 +0200 |
| commit | 16fc6a694cac35ce962e98e180354cbce6a72f54 (patch) | |
| tree | 20b5933785ac3aea831240447058df93be33ff1a /src/libstd | |
| parent | 5b10781c7b95a182da7c85af80a706f4ca7a4b65 (diff) | |
| download | rust-16fc6a694cac35ce962e98e180354cbce6a72f54.tar.gz rust-16fc6a694cac35ce962e98e180354cbce6a72f54.zip | |
Remove unused abi attributes.
They've been replaced by putting the name on the extern block.
#[abi = "foo"]
goes to
extern "foo" { }
Closes #9483.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io.rs | 3 | ||||
| -rw-r--r-- | src/libstd/libc.rs | 76 | ||||
| -rw-r--r-- | src/libstd/num/cmath.rs | 6 | ||||
| -rw-r--r-- | src/libstd/os.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/thread_local_storage.rs | 1 | ||||
| -rw-r--r-- | src/libstd/unstable/intrinsics.rs | 1 |
6 files changed, 28 insertions, 61 deletions
diff --git a/src/libstd/io.rs b/src/libstd/io.rs index 791616d330e..c3f4de20938 100644 --- a/src/libstd/io.rs +++ b/src/libstd/io.rs @@ -76,9 +76,8 @@ pub type fd_t = c_int; pub mod rustrt { use libc; - #[abi = "cdecl"] #[link_name = "rustrt"] - extern { + extern "cdecl" { pub fn rust_get_stdin() -> *libc::FILE; pub fn rust_get_stdout() -> *libc::FILE; pub fn rust_get_stderr() -> *libc::FILE; diff --git a/src/libstd/libc.rs b/src/libstd/libc.rs index f579e12054b..67df68df6e4 100644 --- a/src/libstd/libc.rs +++ b/src/libstd/libc.rs @@ -2663,11 +2663,10 @@ pub mod funcs { pub mod c95 { #[nolink] - #[abi = "cdecl"] pub mod ctype { use libc::types::os::arch::c95::{c_char, c_int}; - extern { + extern "cdecl" { pub fn isalnum(c: c_int) -> c_int; pub fn isalpha(c: c_int) -> c_int; pub fn iscntrl(c: c_int) -> c_int; @@ -2685,12 +2684,11 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod stdio { use libc::types::common::c95::{FILE, c_void, fpos_t}; use libc::types::os::arch::c95::{c_char, c_int, c_long, size_t}; - extern { + extern "cdecl" { pub fn fopen(filename: *c_char, mode: *c_char) -> *FILE; pub fn freopen(filename: *c_char, mode: *c_char, file: *FILE) -> *FILE; @@ -2742,14 +2740,13 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod stdlib { use libc::types::common::c95::c_void; use libc::types::os::arch::c95::{c_char, c_double, c_int}; use libc::types::os::arch::c95::{c_long, c_uint, c_ulong}; use libc::types::os::arch::c95::{size_t}; - extern { + extern "cdecl" { pub fn abs(i: c_int) -> c_int; pub fn labs(i: c_long) -> c_long; // Omitted: div, ldiv (return pub type incomplete). @@ -2776,13 +2773,12 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod string { use libc::types::common::c95::c_void; use libc::types::os::arch::c95::{c_char, c_int, size_t}; use libc::types::os::arch::c95::{wchar_t}; - extern { + extern "cdecl" { pub fn strcpy(dst: *c_char, src: *c_char) -> *c_char; pub fn strncpy(dst: *c_char, src: *c_char, n: size_t) -> *c_char; @@ -2826,12 +2822,11 @@ pub mod funcs { #[cfg(target_os = "win32")] pub mod posix88 { #[nolink] - #[abi = "cdecl"] pub mod stat_ { use libc::types::os::common::posix01::stat; use libc::types::os::arch::c95::{c_int, c_char}; - extern { + extern "cdecl" { #[link_name = "_chmod"] pub fn chmod(path: *c_char, mode: c_int) -> c_int; #[link_name = "_mkdir"] @@ -2844,12 +2839,11 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod stdio { use libc::types::common::c95::FILE; use libc::types::os::arch::c95::{c_int, c_char}; - extern { + extern "cdecl" { #[link_name = "_popen"] pub fn popen(command: *c_char, mode: *c_char) -> *FILE; #[link_name = "_pclose"] @@ -2862,10 +2856,9 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod fcntl { use libc::types::os::arch::c95::{c_int, c_char}; - extern { + extern "cdecl" { #[link_name = "_open"] pub fn open(path: *c_char, oflag: c_int, mode: c_int) -> c_int; @@ -2875,20 +2868,18 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod dirent { // Not supplied at all. } #[nolink] - #[abi = "cdecl"] pub mod unistd { use libc::types::common::c95::c_void; use libc::types::os::arch::c95::{c_int, c_uint, c_char, c_long, size_t}; use libc::types::os::arch::c99::intptr_t; - extern { + extern "cdecl" { #[link_name = "_access"] pub fn access(path: *c_char, amode: c_int) -> c_int; #[link_name = "_chdir"] @@ -2949,8 +2940,7 @@ pub mod funcs { use libc::types::os::arch::posix88::mode_t; #[nolink] - #[abi = "cdecl"] - extern { + extern "cdecl" { pub fn chmod(path: *c_char, mode: mode_t) -> c_int; pub fn fchmod(fd: c_int, mode: mode_t) -> c_int; @@ -2978,12 +2968,11 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod stdio { use libc::types::common::c95::FILE; use libc::types::os::arch::c95::{c_char, c_int}; - extern { + extern "cdecl" { pub fn popen(command: *c_char, mode: *c_char) -> *FILE; pub fn pclose(stream: *FILE) -> c_int; pub fn fdopen(fd: c_int, mode: *c_char) -> *FILE; @@ -2992,12 +2981,11 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod fcntl { use libc::types::os::arch::c95::{c_char, c_int}; use libc::types::os::arch::posix88::mode_t; - extern { + extern "cdecl" { pub fn open(path: *c_char, oflag: c_int, mode: c_int) -> c_int; pub fn creat(path: *c_char, mode: mode_t) -> c_int; @@ -3006,7 +2994,6 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod dirent { use libc::types::common::posix88::{DIR, dirent_t}; use libc::types::os::arch::c95::{c_char, c_int, c_long}; @@ -3026,12 +3013,12 @@ pub mod funcs { rust_readdir(dirp) } - extern { + extern "cdecl" { fn rust_opendir(dirname: *c_char) -> *DIR; fn rust_readdir(dirp: *DIR) -> *dirent_t; } - extern { + extern "cdecl" { pub fn closedir(dirp: *DIR) -> c_int; pub fn rewinddir(dirp: *DIR); pub fn seekdir(dirp: *DIR, loc: c_long); @@ -3040,7 +3027,6 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod unistd { use libc::types::common::c95::c_void; use libc::types::os::arch::c95::{c_char, c_int, c_long, c_uint}; @@ -3048,7 +3034,7 @@ pub mod funcs { use libc::types::os::arch::posix88::{gid_t, off_t, pid_t}; use libc::types::os::arch::posix88::{ssize_t, uid_t}; - extern { + extern "cdecl" { pub fn access(path: *c_char, amode: c_int) -> c_int; pub fn alarm(seconds: c_uint) -> c_uint; pub fn chdir(dir: *c_char) -> c_int; @@ -3100,24 +3086,22 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod signal { use libc::types::os::arch::c95::{c_int}; use libc::types::os::arch::posix88::{pid_t}; - extern { + extern "cdecl" { pub fn kill(pid: pid_t, sig: c_int) -> c_int; } } #[nolink] - #[abi = "cdecl"] pub mod mman { use libc::types::common::c95::{c_void}; use libc::types::os::arch::c95::{size_t, c_int, c_char}; use libc::types::os::arch::posix88::{mode_t, off_t}; - extern { + extern "cdecl" { pub fn mlock(addr: *c_void, len: size_t) -> c_int; pub fn munlock(addr: *c_void, len: size_t) -> c_int; pub fn mlockall(flags: c_int) -> c_int; @@ -3150,12 +3134,11 @@ pub mod funcs { #[cfg(target_os = "freebsd")] pub mod posix01 { #[nolink] - #[abi = "cdecl"] pub mod stat_ { use libc::types::os::arch::c95::{c_char, c_int}; use libc::types::os::arch::posix01::stat; - extern { + extern "cdecl" { #[cfg(target_os = "linux")] #[cfg(target_os = "freebsd")] #[cfg(target_os = "android")] @@ -3168,12 +3151,11 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod unistd { use libc::types::os::arch::c95::{c_char, c_int, size_t}; use libc::types::os::arch::posix88::{ssize_t}; - extern { + extern "cdecl" { pub fn readlink(path: *c_char, buf: *mut c_char, bufsz: size_t) @@ -3195,25 +3177,23 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod wait { use libc::types::os::arch::c95::{c_int}; use libc::types::os::arch::posix88::{pid_t}; - extern { + extern "cdecl" { pub fn waitpid(pid: pid_t, status: *mut c_int, options: c_int) -> pid_t; } } #[nolink] - #[abi = "cdecl"] pub mod glob { use libc::types::os::arch::c95::{c_char, c_int}; use libc::types::os::common::posix01::{glob_t}; use option::Option; - extern { + extern "cdecl" { pub fn glob(pattern: *c_char, flags: c_int, errfunc: Option<extern "C" fn(epath: *c_char, errno: int) -> int>, @@ -3223,12 +3203,11 @@ pub mod funcs { } #[nolink] - #[abi = "cdecl"] pub mod mman { use libc::types::common::c95::{c_void}; use libc::types::os::arch::c95::{c_int, size_t}; - extern { + extern "cdecl" { pub fn posix_madvise(addr: *c_void, len: size_t, advice: c_int) @@ -3271,8 +3250,7 @@ pub mod funcs { use libc::types::os::arch::c95::{c_char, c_uchar, c_int, c_uint, size_t}; - #[abi = "cdecl"] - extern { + extern "cdecl" { pub fn sysctl(name: *c_int, namelen: c_uint, oldp: *mut c_void, @@ -3305,8 +3283,7 @@ pub mod funcs { use libc::types::common::c95::{c_void}; use libc::types::os::arch::c95::{c_uchar, c_int, size_t}; - #[abi = "cdecl"] - extern { + extern "cdecl" { pub fn getdtablesize() -> c_int; pub fn madvise(addr: *c_void, len: size_t, advice: c_int) -> c_int; @@ -3325,8 +3302,7 @@ pub mod funcs { pub mod extra { use libc::types::os::arch::c95::{c_char, c_int}; - #[abi = "cdecl"] - extern { + extern "cdecl" { pub fn _NSGetExecutablePath(buf: *mut c_char, bufsize: *mut u32) -> c_int; } @@ -3358,7 +3334,6 @@ pub mod funcs { use libc::types::os::arch::extra::{HANDLE, LPHANDLE}; #[cfg(target_arch = "x86")] - #[abi = "stdcall"] extern "stdcall" { pub fn GetEnvironmentVariableW(n: LPCWSTR, v: LPWSTR, @@ -3572,9 +3547,8 @@ pub mod funcs { pub mod msvcrt { use libc::types::os::arch::c95::{c_int, c_long}; - #[abi = "cdecl"] #[nolink] - extern { + extern "cdecl" { #[link_name = "_commit"] pub fn commit(fd: c_int) -> c_int; diff --git a/src/libstd/num/cmath.rs b/src/libstd/num/cmath.rs index 0c515538266..aed3601060b 100644 --- a/src/libstd/num/cmath.rs +++ b/src/libstd/num/cmath.rs @@ -18,8 +18,7 @@ pub mod c_double_utils { use libc::{c_double, c_int}; #[link_name = "m"] - #[abi = "cdecl"] - extern { + extern "cdecl" { // Alpabetically sorted by link_name pub fn acos(n: c_double) -> c_double; @@ -107,8 +106,7 @@ pub mod c_float_utils { use libc::{c_float, c_int}; #[link_name = "m"] - #[abi = "cdecl"] - extern { + extern "cdecl" { // Alpabetically sorted by link_name #[link_name="acosf"] diff --git a/src/libstd/os.rs b/src/libstd/os.rs index e7cba0895e4..b7921d7527b 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -1039,7 +1039,6 @@ pub fn errno() -> uint { #[cfg(target_arch = "x86")] #[link_name = "kernel32"] - #[abi = "stdcall"] extern "stdcall" { fn GetLastError() -> DWORD; } @@ -1118,7 +1117,6 @@ pub fn last_os_error() -> ~str { #[cfg(target_arch = "x86")] #[link_name = "kernel32"] - #[abi = "stdcall"] extern "stdcall" { fn FormatMessageW(flags: DWORD, lpSrc: LPVOID, diff --git a/src/libstd/rt/thread_local_storage.rs b/src/libstd/rt/thread_local_storage.rs index 26eabca2d9d..cd89d09ffc0 100644 --- a/src/libstd/rt/thread_local_storage.rs +++ b/src/libstd/rt/thread_local_storage.rs @@ -84,7 +84,6 @@ pub unsafe fn get(key: Key) -> *mut c_void { } #[cfg(windows, target_arch = "x86")] -#[abi = "stdcall"] extern "stdcall" { fn TlsAlloc() -> DWORD; fn TlsSetValue(dwTlsIndex: DWORD, lpTlsvalue: LPVOID) -> BOOL; diff --git a/src/libstd/unstable/intrinsics.rs b/src/libstd/unstable/intrinsics.rs index 26ebde34775..59b3c264b99 100644 --- a/src/libstd/unstable/intrinsics.rs +++ b/src/libstd/unstable/intrinsics.rs @@ -170,7 +170,6 @@ pub trait TyVisitor { fn visit_closure_ptr(&mut self, ck: uint) -> bool; } -#[abi = "rust-intrinsic"] extern "rust-intrinsic" { /// Atomic compare and exchange, sequentially consistent. |
