0.3.0: converge relibc to upstream 0.6.0 + Red Bear patches

This commit is contained in:
2026-07-06 19:13:08 +03:00
parent 1a0edd8eeb
commit 4ef7e57571
1466 changed files with 75236 additions and 13644 deletions
+15 -2
View File
@@ -1,4 +1,4 @@
use crate::platform::types::*;
use crate::platform::types::{c_int, c_uint, int32_t, off_t};
pub const EOF: c_int = -1;
pub const BUFSIZ: c_int = 1024;
@@ -24,13 +24,26 @@ pub const _IOFBF: c_int = 0;
pub const _IOLBF: c_int = 1;
pub const _IONBF: c_int = 2;
// renameat2
// (uint instead of int is intentional)
/// Rename but don't replace the target if it exists.
pub const RENAME_NOREPLACE: c_uint = 0x01;
/// Atomically swap two files.
#[cfg(target_os = "linux")]
pub const RENAME_EXCHANGE: c_uint = 0x02;
#[cfg(target_os = "linux")]
pub const RENAME_WHITEOUT: c_uint = 0x04;
// /dev/tty + nul
pub const L_ctermid: usize = 9;
// form of name is /XXXXXX, so 7
pub const L_tmpnam: c_int = 7;
// 36^6 (26 letters + 10 digits) is larger than i32::MAX, so just set to that
// for now
pub const TMP_MAX: int32_t = 2_147_483_647;
// XXX: defined manually in bits/stdio.h as well because cbindgen can't handle
// XXX: defined manually in cbindgen as well because it can't handle
// string constants in any form AFAICT
/// cbindgen:ignore
pub const P_tmpdir: &[u8; 5] = b"/tmp\0";
#[allow(non_camel_case_types)]