Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ check-cfg = [
'cfg(lower_upper_exp_for_non_zero)',
'cfg(sanitize_memory)',
'cfg(netbsdlike)',
'cfg(nto)',
'cfg(rustc_diagnostics)',
'cfg(solarish)',
'cfg(staged_api)',
Expand Down
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ fn main() {
if os == "solaris" || os == "illumos" {
use_feature("solarish");
}
// QNX Neutrino. QNX 7.x and the QNX SDP 8.0 toolchain targets say `target_os = "nto"`;
// upstream Rust's QNX 8.0 targets (`x86_64-pc-qnx`, `aarch64-unknown-qnx`) say
// `target_os = "qnx"`. libc puts both in its `nto` module.
if os == "nto" || os == "qnx" {
use_feature("nto");
}
if apple || freebsdlike || netbsdlike {
use_feature("bsd");
}
Expand Down
10 changes: 2 additions & 8 deletions examples/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,7 @@ fn show<Fd: AsFd>(fd: Fd) -> io::Result<()> {
if term.input_modes.contains(InputModes::ICRNL) {
print!(" ICRNL");
}
#[cfg(any(
linux_kernel,
solarish,
target_os = "aix",
target_os = "haiku",
target_os = "nto"
))]
#[cfg(any(linux_kernel, solarish, target_os = "aix", target_os = "haiku", nto))]
if term.input_modes.contains(InputModes::IUCLC) {
print!(" IUCLC");
}
Expand Down Expand Up @@ -301,7 +295,7 @@ fn show<Fd: AsFd>(fd: Fd) -> io::Result<()> {
target_os = "aix",
target_os = "haiku",
target_os = "hurd",
target_os = "nto",
nto,
)))]
println!(
" VSWTC={}",
Expand Down
12 changes: 6 additions & 6 deletions src/backend/libc/fs/dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
solarish,
target_os = "aix",
target_os = "haiku",
target_os = "nto",
nto,
target_os = "vita"
)))]
use super::types::FileType;
Expand All @@ -18,7 +18,7 @@ use crate::fs::{fstat, Stat};
target_os = "haiku",
target_os = "horizon",
target_os = "netbsd",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
target_os = "wasi",
Expand Down Expand Up @@ -205,7 +205,7 @@ impl Dir {
solarish,
target_os = "aix",
target_os = "haiku",
target_os = "nto",
nto,
target_os = "vita"
)))]
d_type: dirent.d_type,
Expand Down Expand Up @@ -247,7 +247,7 @@ impl Dir {
target_os = "haiku",
target_os = "horizon",
target_os = "netbsd",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
target_os = "wasi",
Expand Down Expand Up @@ -323,7 +323,7 @@ pub struct DirEntry {
solarish,
target_os = "aix",
target_os = "haiku",
target_os = "nto",
nto,
target_os = "vita"
)))]
d_type: u8,
Expand Down Expand Up @@ -375,7 +375,7 @@ impl DirEntry {
solarish,
target_os = "aix",
target_os = "haiku",
target_os = "nto",
nto,
target_os = "vita"
)))]
#[inline]
Expand Down
10 changes: 5 additions & 5 deletions src/backend/libc/fs/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::fs::AtFlags;
target_os = "dragonfly",
target_os = "espidf",
target_os = "horizon",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
)))]
Expand All @@ -43,7 +43,7 @@ use crate::fs::SealFlags;
target_os = "haiku",
target_os = "horizon",
target_os = "netbsd",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
target_os = "wasi",
Expand Down Expand Up @@ -255,7 +255,7 @@ pub(crate) fn openat(
target_os = "haiku",
target_os = "horizon",
target_os = "netbsd",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
target_os = "wasi",
Expand Down Expand Up @@ -1609,7 +1609,7 @@ fn fstat_old(fd: BorrowedFd<'_>) -> io::Result<Stat> {
target_os = "haiku",
target_os = "horizon",
target_os = "netbsd",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
target_os = "wasi",
Expand Down Expand Up @@ -1754,7 +1754,7 @@ fn futimens_old(fd: BorrowedFd<'_>, times: &Timestamps) -> io::Result<()> {
target_os = "dragonfly",
target_os = "espidf",
target_os = "horizon",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
)))]
Expand Down
8 changes: 4 additions & 4 deletions src/backend/libc/fs/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ impl FileType {
target_os = "espidf",
target_os = "haiku",
target_os = "horizon",
target_os = "nto",
nto,
target_os = "vita"
)))]
#[inline]
Expand Down Expand Up @@ -776,7 +776,7 @@ bitflags! {
netbsdlike,
target_os = "espidf",
target_os = "horizon",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita"
)))]
Expand Down Expand Up @@ -1071,7 +1071,7 @@ pub struct Stat {
target_os = "haiku",
target_os = "horizon",
target_os = "netbsd",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
target_os = "wasi",
Expand All @@ -1093,7 +1093,7 @@ pub type StatFs = c::statfs64;
target_os = "espidf",
target_os = "haiku",
target_os = "horizon",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
target_os = "wasi",
Expand Down
28 changes: 14 additions & 14 deletions src/backend/libc/io/errno.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand Down Expand Up @@ -282,7 +282,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
target_os = "wasi",
Expand Down Expand Up @@ -333,7 +333,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand All @@ -350,7 +350,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand All @@ -367,7 +367,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand All @@ -384,7 +384,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand Down Expand Up @@ -537,7 +537,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand Down Expand Up @@ -567,7 +567,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand Down Expand Up @@ -648,7 +648,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand All @@ -670,7 +670,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand Down Expand Up @@ -773,7 +773,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand Down Expand Up @@ -902,7 +902,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand Down Expand Up @@ -934,7 +934,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
target_os = "wasi",
Expand Down Expand Up @@ -1034,7 +1034,7 @@ impl Errno {
target_os = "horizon",
target_os = "hurd",
target_os = "l4re",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi",
)))]
Expand Down
8 changes: 4 additions & 4 deletions src/backend/libc/io/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::fd::{AsFd as _, BorrowedFd, OwnedFd, RawFd};
target_os = "aix",
target_os = "espidf",
target_os = "horizon",
target_os = "nto",
nto,
target_os = "vita",
target_os = "wasi"
)))]
Expand Down Expand Up @@ -98,7 +98,7 @@ pub(crate) fn writev(fd: BorrowedFd<'_>, bufs: &[IoSlice<'_>]) -> io::Result<usi
target_os = "espidf",
target_os = "haiku",
target_os = "horizon",
target_os = "nto",
nto,
target_os = "solaris",
target_os = "vita",
)))]
Expand Down Expand Up @@ -127,7 +127,7 @@ pub(crate) fn preadv(
target_os = "cygwin",
target_os = "espidf",
target_os = "haiku",
target_os = "nto",
nto,
target_os = "horizon",
target_os = "solaris",
target_os = "vita",
Expand Down Expand Up @@ -271,7 +271,7 @@ pub(crate) fn dup2(fd: BorrowedFd<'_>, new: &mut OwnedFd) -> io::Result<()> {
target_os = "espidf",
target_os = "haiku",
target_os = "horizon",
target_os = "nto",
nto,
target_os = "redox",
target_os = "vita",
target_os = "wasi",
Expand Down
Loading
Loading