1 use crate::io as std_io;
4 pub use core::slice::memchr::{memchr, memrchr};
7 pub use crate::sys_common::os_str_bytes as os_str;
9 // This is not necessarily correct. May want to consider making it part of the
11 use crate::os::raw::c_char;
13 // SAFETY: must be called only once during runtime initialization.
14 pub unsafe fn init() {}
16 // SAFETY: must be called only once during runtime cleanup.
17 pub unsafe fn cleanup() {}
19 pub fn unsupported<T>() -> std_io::Result<T> {
20 Err(unsupported_err())
23 pub fn unsupported_err() -> std_io::Error {
24 std_io::Error::new_const(
25 std_io::ErrorKind::Unsupported,
26 &"operation not supported on this platform",
30 pub fn decode_error_kind(_code: i32) -> crate::io::ErrorKind {
31 crate::io::ErrorKind::Other
34 pub fn abort_internal() -> ! {
35 core::intrinsics::abort();
38 pub fn hashmap_random_keys() -> (u64, u64) {
42 pub unsafe fn strlen(mut s: *const c_char) -> usize {
43 // SAFETY: The caller must guarantee `s` points to a valid 0-terminated string.