mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
Remove remaining nolink usages.(fixes #12810)
This commit is contained in:
parent
9959188d0e
commit
aac6e31763
@ -1472,7 +1472,6 @@ and are instead terminated by a semicolon.
|
||||
|
||||
~~~~
|
||||
# use std::libc::{c_char, FILE};
|
||||
# #[nolink]
|
||||
|
||||
extern {
|
||||
fn fopen(filename: *c_char, mode: *c_char) -> *FILE;
|
||||
|
@ -335,7 +335,6 @@ pub fn readdir(p: &CString) -> IoResult<~[Path]> {
|
||||
}).map(|path| root.join(path)).collect()
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
extern {
|
||||
fn rust_list_dir_wfd_size() -> libc::size_t;
|
||||
fn rust_list_dir_wfd_fp_buf(wfd: *libc::c_void) -> *u16;
|
||||
|
@ -979,7 +979,7 @@ static other_attrs: &'static [&'static str] = &[
|
||||
"macro_export", "must_use",
|
||||
|
||||
//mod-level
|
||||
"path", "link_name", "link_args", "nolink", "macro_escape", "no_implicit_prelude",
|
||||
"path", "link_name", "link_args", "macro_escape", "no_implicit_prelude",
|
||||
|
||||
// fn-level
|
||||
"test", "bench", "should_fail", "ignore", "inline", "lang", "main", "start",
|
||||
|
@ -150,7 +150,6 @@ mod darwin_fd_limit {
|
||||
rlim_cur: rlim_t,
|
||||
rlim_max: rlim_t
|
||||
}
|
||||
#[nolink]
|
||||
extern {
|
||||
// name probably doesn't need to be mut, but the C function doesn't specify const
|
||||
fn sysctl(name: *mut libc::c_int, namelen: libc::c_uint,
|
||||
|
@ -3306,7 +3306,6 @@ pub mod funcs {
|
||||
// or anything. The same is not true of POSIX.
|
||||
|
||||
pub mod c95 {
|
||||
#[nolink]
|
||||
pub mod ctype {
|
||||
use libc::types::os::arch::c95::{c_char, c_int};
|
||||
|
||||
@ -3327,7 +3326,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
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};
|
||||
@ -3383,7 +3381,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod stdlib {
|
||||
use libc::types::common::c95::c_void;
|
||||
use libc::types::os::arch::c95::{c_char, c_double, c_int};
|
||||
@ -3416,7 +3413,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod string {
|
||||
use libc::types::common::c95::c_void;
|
||||
use libc::types::os::arch::c95::{c_char, c_int, size_t};
|
||||
@ -3461,7 +3457,6 @@ pub mod funcs {
|
||||
|
||||
#[cfg(target_os = "win32")]
|
||||
pub mod posix88 {
|
||||
#[nolink]
|
||||
pub mod stat_ {
|
||||
use libc::types::os::common::posix01::{stat, utimbuf};
|
||||
use libc::types::os::arch::c95::{c_int, c_char, wchar_t};
|
||||
@ -3486,7 +3481,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod stdio {
|
||||
use libc::types::common::c95::FILE;
|
||||
use libc::types::os::arch::c95::{c_int, c_char};
|
||||
@ -3503,7 +3497,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod fcntl {
|
||||
use libc::types::os::arch::c95::{c_int, c_char, wchar_t};
|
||||
extern {
|
||||
@ -3518,12 +3511,10 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod dirent {
|
||||
// Not supplied at all.
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod unistd {
|
||||
use libc::types::common::c95::c_void;
|
||||
use libc::types::os::arch::c95::{c_int, c_uint, c_char,
|
||||
@ -3590,7 +3581,6 @@ pub mod funcs {
|
||||
use libc::types::os::arch::posix01::stat;
|
||||
use libc::types::os::arch::posix88::mode_t;
|
||||
|
||||
#[nolink]
|
||||
extern {
|
||||
pub fn chmod(path: *c_char, mode: mode_t) -> c_int;
|
||||
pub fn fchmod(fd: c_int, mode: mode_t) -> c_int;
|
||||
@ -3618,7 +3608,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod stdio {
|
||||
use libc::types::common::c95::FILE;
|
||||
use libc::types::os::arch::c95::{c_char, c_int};
|
||||
@ -3631,7 +3620,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod fcntl {
|
||||
use libc::types::os::arch::c95::{c_char, c_int};
|
||||
use libc::types::os::arch::posix88::mode_t;
|
||||
@ -3644,7 +3632,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod dirent {
|
||||
use libc::types::common::posix88::{DIR, dirent_t};
|
||||
use libc::types::os::arch::c95::{c_char, c_int, c_long};
|
||||
@ -3678,7 +3665,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod unistd {
|
||||
use libc::types::common::c95::c_void;
|
||||
use libc::types::os::arch::c95::{c_char, c_int, c_long, c_uint};
|
||||
@ -3748,7 +3734,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod signal {
|
||||
use libc::types::os::arch::c95::{c_int};
|
||||
use libc::types::os::arch::posix88::{pid_t};
|
||||
@ -3758,7 +3743,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod mman {
|
||||
use libc::types::common::c95::{c_void};
|
||||
use libc::types::os::arch::c95::{size_t, c_int, c_char};
|
||||
@ -3796,7 +3780,6 @@ pub mod funcs {
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
pub mod posix01 {
|
||||
#[nolink]
|
||||
pub mod stat_ {
|
||||
use libc::types::os::arch::c95::{c_char, c_int};
|
||||
use libc::types::os::arch::posix01::stat;
|
||||
@ -3813,7 +3796,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod unistd {
|
||||
use libc::types::os::arch::c95::{c_char, c_int, size_t};
|
||||
use libc::types::os::arch::posix88::{ssize_t, off_t};
|
||||
@ -3841,7 +3823,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod wait {
|
||||
use libc::types::os::arch::c95::{c_int};
|
||||
use libc::types::os::arch::posix88::{pid_t};
|
||||
@ -3852,7 +3833,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod glob {
|
||||
use libc::types::os::arch::c95::{c_char, c_int};
|
||||
use libc::types::os::common::posix01::{glob_t};
|
||||
@ -3867,7 +3847,6 @@ pub mod funcs {
|
||||
}
|
||||
}
|
||||
|
||||
#[nolink]
|
||||
pub mod mman {
|
||||
use libc::types::common::c95::{c_void};
|
||||
use libc::types::os::arch::c95::{c_int, size_t};
|
||||
@ -4032,7 +4011,6 @@ pub mod funcs {
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[nolink]
|
||||
pub mod extra {
|
||||
use libc::types::os::arch::c95::{c_char, c_int};
|
||||
|
||||
@ -4256,7 +4234,6 @@ pub mod funcs {
|
||||
use libc::types::os::arch::c95::{c_int, c_long};
|
||||
use libc::types::os::arch::c99::intptr_t;
|
||||
|
||||
#[nolink]
|
||||
extern {
|
||||
#[link_name = "_commit"]
|
||||
pub fn commit(fd: c_int) -> c_int;
|
||||
|
@ -615,7 +615,6 @@ pub fn errno() -> int {
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
fn errno_location() -> *c_int {
|
||||
#[nolink]
|
||||
extern {
|
||||
fn __error() -> *c_int;
|
||||
}
|
||||
@ -627,7 +626,6 @@ pub fn errno() -> int {
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_os = "android")]
|
||||
fn errno_location() -> *c_int {
|
||||
#[nolink]
|
||||
extern {
|
||||
fn __errno_location() -> *c_int;
|
||||
}
|
||||
@ -665,7 +663,6 @@ pub fn last_os_error() -> ~str {
|
||||
#[cfg(target_os = "freebsd")]
|
||||
fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: libc::size_t)
|
||||
-> c_int {
|
||||
#[nolink]
|
||||
extern {
|
||||
fn strerror_r(errnum: c_int, buf: *mut c_char,
|
||||
buflen: libc::size_t) -> c_int;
|
||||
@ -681,7 +678,6 @@ pub fn last_os_error() -> ~str {
|
||||
#[cfg(target_os = "linux")]
|
||||
fn strerror_r(errnum: c_int, buf: *mut c_char,
|
||||
buflen: libc::size_t) -> c_int {
|
||||
#[nolink]
|
||||
extern {
|
||||
fn __xpg_strerror_r(errnum: c_int,
|
||||
buf: *mut c_char,
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
use std::libc;
|
||||
|
||||
#[nolink]
|
||||
extern {
|
||||
static mut rust_dbg_static_mut: libc::c_int;
|
||||
pub fn rust_dbg_static_mut_check_four();
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
use std::libc;
|
||||
|
||||
#[nolink]
|
||||
extern {
|
||||
pub fn bare_type1(size: int); //~ ERROR: found rust type
|
||||
pub fn bare_type2(size: uint); //~ ERROR: found rust type
|
||||
|
@ -17,7 +17,6 @@ the compiler output. */
|
||||
#[feature(link_args)];
|
||||
|
||||
#[link_args = "aFdEfSeVEEE"]
|
||||
#[nolink]
|
||||
extern {}
|
||||
|
||||
fn main() { }
|
||||
|
@ -11,7 +11,6 @@
|
||||
mod libc {
|
||||
use std::libc::{c_char, c_long, c_longlong};
|
||||
|
||||
#[nolink]
|
||||
extern {
|
||||
pub fn atol(x: *c_char) -> c_long;
|
||||
pub fn atoll(x: *c_char) -> c_longlong;
|
||||
|
@ -13,7 +13,6 @@ extern crate extra;
|
||||
mod libc {
|
||||
use std::libc::{c_char, size_t};
|
||||
|
||||
#[nolink]
|
||||
extern {
|
||||
#[link_name = "strlen"]
|
||||
pub fn my_strlen(str: *c_char) -> size_t;
|
||||
|
@ -11,7 +11,6 @@
|
||||
mod foo {
|
||||
use std::libc::c_int;
|
||||
|
||||
#[nolink]
|
||||
extern {
|
||||
pub static errno: c_int;
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ pub enum void { }
|
||||
mod bindgen {
|
||||
use super::void;
|
||||
|
||||
#[nolink]
|
||||
extern {
|
||||
pub fn printf(v: void);
|
||||
}
|
||||
|
@ -9,26 +9,22 @@
|
||||
// except according to those terms.
|
||||
|
||||
mod bar {
|
||||
#[nolink]
|
||||
extern {}
|
||||
}
|
||||
|
||||
mod zed {
|
||||
#[nolink]
|
||||
extern {}
|
||||
}
|
||||
|
||||
mod libc {
|
||||
use std::libc::{c_int, c_void, size_t, ssize_t};
|
||||
|
||||
#[nolink]
|
||||
extern {
|
||||
pub fn write(fd: c_int, buf: *c_void, count: size_t) -> ssize_t;
|
||||
}
|
||||
}
|
||||
|
||||
mod baz {
|
||||
#[nolink]
|
||||
extern {}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
// Issue #901
|
||||
mod libc {
|
||||
#[nolink]
|
||||
extern {
|
||||
pub fn printf(x: ());
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
#[allow(ctypes)];
|
||||
|
||||
mod libc {
|
||||
#[nolink]
|
||||
extern {
|
||||
pub fn malloc(size: int) -> *u8;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user