about summary refs log tree commit diff
path: root/src/libstd/libc.rs
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2013-09-29 07:46:26 -0700
committerSteve Klabnik <steve@steveklabnik.com>2013-10-14 13:10:36 +0200
commit16fc6a694cac35ce962e98e180354cbce6a72f54 (patch)
tree20b5933785ac3aea831240447058df93be33ff1a /src/libstd/libc.rs
parent5b10781c7b95a182da7c85af80a706f4ca7a4b65 (diff)
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/libc.rs')
-rw-r--r--src/libstd/libc.rs76
1 files changed, 25 insertions, 51 deletions
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;