Skip to content

Switch resource.h enum to c_int instead of u64

Josh Megnauth requested to merge josh/relibc:rlimit_constants_i32 into master

Most platforms use a c_int though glibc uses a u32. GNU defines a type, __rlimit_resource_t, for the RLIMIT enum that is a u32.

Using a c_int is nicer for a few reasons. The first is that our (unimplemented) functions receive a c_int for the enum - using a u64 is technically wrong but doesn't affect anything since the constants are turned into macros by cbindgen.

The second reason is that a c_int is nicer for libc and nix (the crate) too since we don't need to pollute the crates with guards for Redox.

Merge request reports

Loading