Skip to content

Commit 01b4985

Browse files
authored
More cfg cleanups. (#550)
* More `cfg` cleanups. Use the new OS feature groups in more places.
1 parent 56ec0d1 commit 01b4985

39 files changed

+460
-1920
lines changed

examples/process.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,17 @@ fn main() -> io::Result<()> {
4848
println!("Stack Limit: {:?}", getrlimit(Resource::Stack));
4949
#[cfg(not(target_os = "haiku"))]
5050
println!("Core Limit: {:?}", getrlimit(Resource::Core));
51-
#[cfg(not(any(target_os = "haiku", target_os = "illumos", target_os = "solaris")))]
51+
#[cfg(not(any(solarish, target_os = "haiku")))]
5252
println!("Rss Limit: {:?}", getrlimit(Resource::Rss));
53-
#[cfg(not(any(target_os = "haiku", target_os = "illumos", target_os = "solaris")))]
53+
#[cfg(not(any(solarish, target_os = "haiku")))]
5454
println!("Nproc Limit: {:?}", getrlimit(Resource::Nproc));
5555
#[cfg(not(target_os = "solaris"))]
5656
println!("Nofile Limit: {:?}", getrlimit(Resource::Nofile));
57-
#[cfg(not(any(target_os = "haiku", target_os = "illumos", target_os = "solaris")))]
57+
#[cfg(not(any(solarish, target_os = "haiku")))]
5858
println!("Memlock Limit: {:?}", getrlimit(Resource::Memlock));
5959
#[cfg(not(target_os = "openbsd"))]
6060
println!("As Limit: {:?}", getrlimit(Resource::As));
61-
#[cfg(not(any(
62-
apple,
63-
freebsdlike,
64-
solarish,
65-
target_os = "haiku",
66-
target_os = "netbsd",
67-
target_os = "openbsd",
68-
)))]
61+
#[cfg(not(any(bsd, solarish, target_os = "haiku")))]
6962
println!("Locks Limit: {:?}", getrlimit(Resource::Locks));
7063
#[cfg(not(any(bsd, solarish, target_os = "haiku")))]
7164
println!("Sigpending Limit: {:?}", getrlimit(Resource::Sigpending));

0 commit comments

Comments
 (0)