diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs index ed38682ff7a..acf27fb2a81 100644 --- a/src/comp/lib/llvm.rs +++ b/src/comp/lib/llvm.rs @@ -112,7 +112,7 @@ const LLVMRealULE: uint = 13u; const LLVMRealUNE: uint = 14u; #[link_args = "-Lrustllvm"] -native "c-stack-cdecl" mod llvm = "rustllvm" { +native "cdecl" mod llvm = "rustllvm" { type ModuleRef; type ContextRef; diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 5ca1e46aaed..87b2cc175c0 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -2008,8 +2008,6 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item { let t = parse_str(p); if str::eq(t, "rust-intrinsic") { abi = ast::native_abi_rust_intrinsic; - } else if str::eq(t, "c-stack-cdecl") { - abi = ast::native_abi_cdecl; } else if str::eq(t, "cdecl") { abi = ast::native_abi_cdecl; } else if str::eq(t, "c-stack-stdcall") { diff --git a/src/lib/aio.rs b/src/lib/aio.rs index d369f26f256..81abac86e39 100644 --- a/src/lib/aio.rs +++ b/src/lib/aio.rs @@ -5,7 +5,7 @@ import comm; import comm::{chan, port, send, recv}; import net; -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { type socket; type server; fn aio_init(); diff --git a/src/lib/comm.rs b/src/lib/comm.rs index 7599bb24185..2d72c85bde9 100644 --- a/src/lib/comm.rs +++ b/src/lib/comm.rs @@ -37,7 +37,7 @@ export recv; export chan; export port; -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { type void; type rust_port; diff --git a/src/lib/dbg.rs b/src/lib/dbg.rs index a943c7a9231..470341308f2 100644 --- a/src/lib/dbg.rs +++ b/src/lib/dbg.rs @@ -8,7 +8,7 @@ * logging. */ -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn debug_tydesc(td: *sys::type_desc); fn debug_opaque(td: *sys::type_desc, x: T); fn debug_box(td: *sys::type_desc, x: @T); diff --git a/src/lib/fs.rs b/src/lib/fs.rs index 057f933d0a5..7c8c3ef1128 100644 --- a/src/lib/fs.rs +++ b/src/lib/fs.rs @@ -7,7 +7,7 @@ File system manipulation import os::getcwd; import os_fs; -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn rust_file_is_dir(path: str::sbuf) -> int; } diff --git a/src/lib/io.rs b/src/lib/io.rs index c2e9b0cec69..a975f3490fe 100644 --- a/src/lib/io.rs +++ b/src/lib/io.rs @@ -1,6 +1,6 @@ import os::libc; -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn rust_get_stdin() -> os::libc::FILE; fn rust_get_stdout() -> os::libc::FILE; fn rust_get_stderr() -> os::libc::FILE; diff --git a/src/lib/linux_os.rs b/src/lib/linux_os.rs index cceaf14cfd0..8d56aeade63 100644 --- a/src/lib/linux_os.rs +++ b/src/lib/linux_os.rs @@ -6,7 +6,7 @@ TODO: Restructure and document // FIXME Somehow merge stuff duplicated here and macosx_os.rs. Made difficult // by https://github.com/graydon/rust/issues#issue/268 -native "c-stack-cdecl" mod libc = "" { +native "cdecl" mod libc = "" { fn read(fd: int, buf: *u8, count: uint) -> int; fn write(fd: int, buf: *u8, count: uint) -> int; fn fread(buf: *u8, size: uint, n: uint, f: libc::FILE) -> uint; @@ -86,7 +86,7 @@ fn waitpid(pid: int) -> int { ret status; } -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn rust_getcwd() -> str; } diff --git a/src/lib/macos_os.rs b/src/lib/macos_os.rs index bc1c6bdc8dd..2d23b203552 100644 --- a/src/lib/macos_os.rs +++ b/src/lib/macos_os.rs @@ -1,5 +1,5 @@ -native "c-stack-cdecl" mod libc = "" { +native "cdecl" mod libc = "" { fn read(fd: int, buf: *u8, count: uint) -> int; fn write(fd: int, buf: *u8, count: uint) -> int; fn fread(buf: *u8, size: uint, n: uint, f: libc::FILE) -> uint; @@ -79,7 +79,7 @@ fn waitpid(pid: int) -> int { ret status; } -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn rust_getcwd() -> str; } diff --git a/src/lib/math.rs b/src/lib/math.rs index cc2d14ef1f2..fe33b133a86 100644 --- a/src/lib/math.rs +++ b/src/lib/math.rs @@ -1,6 +1,6 @@ /* Module: math */ -native "c-stack-cdecl" mod libc = "" { +native "cdecl" mod libc = "" { fn sqrt(n: float) -> float; fn sin(n: float) -> float; fn asin(n: float) -> float; diff --git a/src/lib/posix_fs.rs b/src/lib/posix_fs.rs index 2980113b6c8..0966b96d924 100644 --- a/src/lib/posix_fs.rs +++ b/src/lib/posix_fs.rs @@ -1,4 +1,4 @@ -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn rust_list_files(path: str) -> [str]; } diff --git a/src/lib/rand.rs b/src/lib/rand.rs index df265a0c7ef..e28260003d6 100644 --- a/src/lib/rand.rs +++ b/src/lib/rand.rs @@ -3,7 +3,7 @@ Module: rand Random number generation */ -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { type rctx; fn rand_new() -> rctx; fn rand_next(c: rctx) -> u32; diff --git a/src/lib/run_program.rs b/src/lib/run_program.rs index eb72ccc34aa..f8f84fa40e5 100644 --- a/src/lib/run_program.rs +++ b/src/lib/run_program.rs @@ -12,7 +12,7 @@ export program_output; export spawn_process; export waitpid; -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn rust_run_program(argv: *sbuf, in_fd: int, out_fd: int, err_fd: int) -> int; } diff --git a/src/lib/str.rs b/src/lib/str.rs index d5ed5814457..ed01677a4fe 100644 --- a/src/lib/str.rs +++ b/src/lib/str.rs @@ -15,7 +15,7 @@ export eq, lteq, hash, is_empty, is_not_empty, is_whitespace, byte_len, str_from_cstr, sbuf, as_buf, push_byte, utf8_char_width, safe_slice, contains, iter_chars, loop_chars, loop_chars_sub; -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn rust_str_push(&s: str, ch: u8); } diff --git a/src/lib/sys.rs b/src/lib/sys.rs index 874694d37c5..e7d04c4bcf4 100644 --- a/src/lib/sys.rs +++ b/src/lib/sys.rs @@ -7,7 +7,7 @@ tag type_desc { type_desc(@type_desc); } -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { // Explicitly re-export native stuff we want to be made // available outside this crate. Otherwise it's // visible-in-crate, but not re-exported. diff --git a/src/lib/task.rs b/src/lib/task.rs index 247496ebd39..3dd47576562 100644 --- a/src/lib/task.rs +++ b/src/lib/task.rs @@ -55,7 +55,7 @@ native "rust-intrinsic" mod rusti { fn task_sleep(time_in_us: uint); } -native "c-stack-cdecl" mod rustrt = "rustrt" { +native "cdecl" mod rustrt = "rustrt" { // these can run on the C stack: fn pin_task(); fn unpin_task(); diff --git a/src/lib/test.rs b/src/lib/test.rs index 649aa338d30..e14ad433752 100644 --- a/src/lib/test.rs +++ b/src/lib/test.rs @@ -26,7 +26,7 @@ export default_test_to_task; export configure_test_task; export joinable; -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn sched_threads() -> uint; } diff --git a/src/lib/time.rs b/src/lib/time.rs index 9460c96154d..39ce8c59b68 100644 --- a/src/lib/time.rs +++ b/src/lib/time.rs @@ -4,7 +4,7 @@ Module: time // FIXME: Document what these functions do -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn get_time(&sec: u32, &usec: u32); fn nano_time(&ns: u64); } diff --git a/src/lib/unicode.rs b/src/lib/unicode.rs index 13a8b39c759..3f4452ed7cc 100644 --- a/src/lib/unicode.rs +++ b/src/lib/unicode.rs @@ -148,7 +148,7 @@ mod icu { // FIXME: should be -1, change when compiler supports negative // constants - native "c-stack-cdecl" mod libicu = "icuuc" { + native "cdecl" mod libicu = "icuuc" { fn u_hasBinaryProperty(c: UChar32, which: UProperty) -> UBool; } } diff --git a/src/lib/unsafe.rs b/src/lib/unsafe.rs index 1a6f8757576..6db33a4aba2 100644 --- a/src/lib/unsafe.rs +++ b/src/lib/unsafe.rs @@ -8,7 +8,7 @@ native "rust-intrinsic" mod rusti { fn cast(src: T) -> U; } -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn leak(-thing: T); } diff --git a/src/lib/vec.rs b/src/lib/vec.rs index f1633194f90..5fc890b5359 100644 --- a/src/lib/vec.rs +++ b/src/lib/vec.rs @@ -10,7 +10,7 @@ native "rust-intrinsic" mod rusti { fn vec_len(&&v: [mutable? T]) -> uint; } -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn vec_reserve_shared(t: *sys::type_desc, &v: [mutable? T], n: uint); diff --git a/src/lib/win32_fs.rs b/src/lib/win32_fs.rs index 83e5cb9f7a8..12a33cdeeed 100644 --- a/src/lib/win32_fs.rs +++ b/src/lib/win32_fs.rs @@ -1,6 +1,6 @@ -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn rust_list_files(path: str) -> [str]; } diff --git a/src/lib/win32_os.rs b/src/lib/win32_os.rs index 2ca6eae3f1b..8c9691208cf 100644 --- a/src/lib/win32_os.rs +++ b/src/lib/win32_os.rs @@ -1,5 +1,5 @@ -native "c-stack-cdecl" mod libc = "" { +native "cdecl" mod libc = "" { fn read(fd: int, buf: *u8, count: uint) -> int; fn write(fd: int, buf: *u8, count: uint) -> int; fn fread(buf: *u8, size: uint, n: uint, f: libc::FILE) -> uint; @@ -87,7 +87,7 @@ fn fclose(file: libc::FILE) { libc::fclose(file) } -native "c-stack-cdecl" mod rustrt { +native "cdecl" mod rustrt { fn rust_process_wait(handle: int) -> int; fn rust_getcwd() -> str; }