mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 16:20:49 +00:00
Fixed wasi isatty tests when being generated
This commit is contained in:
parent
62e1526037
commit
c287170166
@ -1,3 +1,5 @@
|
||||
// We don't have access to libc, so we just use isatty
|
||||
// as an external function
|
||||
// use libc::isatty;
|
||||
|
||||
extern "C" {
|
||||
@ -5,7 +7,14 @@ extern "C" {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
println!("stdin: {}", unsafe { isatty(0) });
|
||||
println!("stdout: {}", unsafe { isatty(1) });
|
||||
println!("stderr: {}", unsafe { isatty(2) });
|
||||
#[cfg(target = "wasi")] {
|
||||
println!("stdin: {}", unsafe { isatty(0) });
|
||||
println!("stdout: {}", unsafe { isatty(1) });
|
||||
println!("stderr: {}", unsafe { isatty(2) });
|
||||
}
|
||||
#[cfg(not(target = "wasi"))] {
|
||||
println!("stdin: 1");
|
||||
println!("stdout: 1");
|
||||
println!("stderr: 1");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user