Skip to content

Commit

Permalink
remove unwarranted entries
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Nov 24, 2024
1 parent 7363a77 commit d547966
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions src/shims/unix/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
// the machine's fd table does not start with a pre-allocated size but just the
// standard streams so we can't use it here and the spec imposes
// a minimum of `_POSIX_OPEN_MAX` (20).
("_SC_OPEN_MAX", |this| Scalar::from_int(20, this.pointer_size())),
// The spec imposes a minimum of `_POSIX_ARG_MAX` (4096).
("_SC_ARG_MAX", |this| Scalar::from_int(4096, this.pointer_size())),
// The spec imposes a minimum of `_POSIX_CHILD_MAX` (25).
("_SC_CHILD_MAX", |this| Scalar::from_int(25, this.pointer_size())),
// 16 here is the least common denominator (i.e. macos, solarish).
("_SC_NGROUPS_MAX", |this| Scalar::from_int(16, this.pointer_size())),
("_SC_OPEN_MAX", |this| Scalar::from_int(65536, this.pointer_size())),
];
for &(sysconf_name, value) in sysconfs {
let sysconf_name = this.eval_libc_i32(sysconf_name);
Expand Down
8 changes: 1 addition & 7 deletions tests/pass-dep/libc/libc-sysconf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@ fn test_sysconfbasic() {
let gwmax = libc::sysconf(libc::_SC_GETPW_R_SIZE_MAX);
assert!(gwmax >= 512);
let omax = libc::sysconf(libc::_SC_OPEN_MAX);
assert_eq!(omax, 20);
let amax = libc::sysconf(libc::_SC_ARG_MAX);
assert_eq!(amax, 4096);
let cmax = libc::sysconf(libc::_SC_CHILD_MAX);
assert_eq!(cmax, 25);
let nmax = libc::sysconf(libc::_SC_NGROUPS_MAX);
assert_eq!(nmax, 16);
assert_eq!(omax, 65536);
}
}

Expand Down

0 comments on commit d547966

Please sign in to comment.