Add an OS-specific dylib_filename() function to the standard library
This commit is contained in:
parent
7d32f3d052
commit
a8d8ea3cf3
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user