mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 13:05:18 +03:00
Add an OS-specific dylib_filename() function to the standard library
This commit is contained in:
@@ -57,6 +57,10 @@ fn target_os() -> str {
|
||||
ret "linux";
|
||||
}
|
||||
|
||||
fn dylib_filename(str base) -> str {
|
||||
ret "lib" + base + ".so";
|
||||
}
|
||||
|
||||
fn pipe() -> tup(int, int) {
|
||||
let vec[mutable int] fds = vec(mutable 0, 0);
|
||||
check(os.libc.pipe(_vec.buf[mutable int](fds)) == 0);
|
||||
|
||||
@@ -54,6 +54,10 @@ fn target_os() -> str {
|
||||
ret "macos";
|
||||
}
|
||||
|
||||
fn dylib_filename(str base) -> str {
|
||||
ret "lib" + base + ".dylib";
|
||||
}
|
||||
|
||||
fn pipe() -> tup(int, int) {
|
||||
let vec[mutable int] fds = vec(mutable 0, 0);
|
||||
check(os.libc.pipe(_vec.buf[mutable int](fds)) == 0);
|
||||
|
||||
@@ -42,6 +42,10 @@ fn target_os() -> str {
|
||||
ret "win32";
|
||||
}
|
||||
|
||||
fn dylib_filename(str base) -> str {
|
||||
ret base + ".dll";
|
||||
}
|
||||
|
||||
fn pipe() -> tup(int, int) {
|
||||
let vec[mutable int] fds = vec(mutable 0, 0);
|
||||
check(os.libc._pipe(_vec.buf[mutable int](fds), 1024u,
|
||||
|
||||
Reference in New Issue
Block a user