#![doc = include_str!("../README.md")]
#![no_std]
#![no_builtins] #![feature(thread_local)] #![feature(c_variadic)] #![feature(rustc_private)] #![feature(strict_provenance)]
#![feature(inline_const)]
#![feature(sync_unsafe_cell)]
#![deny(fuzzy_provenance_casts)]
#![deny(lossy_provenance_casts)]
#![feature(try_blocks)]
extern crate alloc;
extern crate compiler_builtins;
pub use libc::*;
#[macro_use]
mod use_libc;
#[cfg(not(target_os = "wasi"))]
mod at_fork;
mod error_str;
mod sync_ptr;
use errno::{set_errno, Errno};
mod ctype;
mod env;
mod fs;
mod io;
#[cfg(target_vendor = "mustang")]
mod malloc;
mod math;
mod mem;
#[cfg(not(target_os = "wasi"))]
mod mmap;
mod net;
#[cfg(not(target_os = "wasi"))]
mod process;
mod rand;
mod rand48;
#[cfg(not(target_os = "wasi"))]
#[cfg(target_vendor = "mustang")]
mod signal;
mod termios_;
#[cfg(feature = "threads")]
#[cfg(target_vendor = "mustang")]
mod threads;
mod errno_;
mod exec;
mod exit;
mod glibc_versioning;
mod nss;
mod posix_spawn;
mod process_;
mod rand_;
mod setjmp;
mod syscall;
mod time;
fn convert_res<T>(result: Result<T, rustix::io::Errno>) -> Option<T> {
result
.map_err(|err| set_errno(Errno(err.raw_os_error())))
.ok()
}