| 493 | #[cfg(not(any(target_os = "espidf", target_os = "nto", target_os = "wasi")))] |
| 494 | #[inline] |
| 495 | pub(crate) fn cfmakeraw(termios: &mut Termios) { |
| 496 | unsafe { |
| 497 | // On AIX, cfmakeraw() has a return type of 'int' instead of 'void'. |
| 498 | // If the argument 'termios' is NULL, it returns -1; otherwise, it returns 0. |
| 499 | // We believe it is safe to ignore the return value. |
| 500 | #[cfg(target_os = "aix")] |
| 501 | { |
| 502 | let _ = c::cfmakeraw(as_mut_ptr(termios).cast()); |
| 503 | } |
| 504 | |
| 505 | #[cfg(not(target_os = "aix"))] |
| 506 | { |
| 507 | c::cfmakeraw(as_mut_ptr(termios).cast()); |
| 508 | } |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | pub(crate) fn isatty(fd: BorrowedFd<'_>) -> bool { |
| 513 | // Use the return value of `isatty` alone. We don't check `errno` because |