Improve sysconf.h on Linux

I copied the constants and definitions from musl which we can presume is
correct. Relibc is missing some features which affects our sysconf as
well, such as constants in limits.h or a working resources.h.
This commit is contained in:
Josh Megnauth
2025-08-18 02:13:01 -04:00
parent 8f9614920d
commit 70ae45ff85
5 changed files with 467 additions and 74 deletions
+5
View File
@@ -4,3 +4,8 @@ pub const HOST_NAME_MAX: usize = 64;
pub const PASS_MAX: usize = 128;
pub const PATH_MAX: usize = 4096;
pub const NGROUPS_MAX: usize = 65536;
// TODO: 4096 for most architectures as determined by a quick grep of musl's source; need a better
// way to determine it for other archs or to hard code a value.
#[cfg(target_os = "linux")]
pub const PAGE_SIZE: usize = 4096;