Skip to content

illumos: add some recently-added constants #3999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libc-test/semver/illumos.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
F_DUPFD_CLOFORK
F_DUP2FD_CLOEXEC
F_DUP2FD_CLOFORK
F_DUP3FD
FD_CLOFORK
MSG_CMSG_CLOEXEC
MSG_CMSG_CLOFORK
O_CLOFORK
O_RSYNC
POLLRDHUP
POSIX_FADV_DONTNEED
Expand Down
19 changes: 19 additions & 0 deletions src/unix/solarish/illumos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ pub const EFD_SEMAPHORE: ::c_int = 0x1;
pub const EFD_NONBLOCK: ::c_int = 0x800;
pub const EFD_CLOEXEC: ::c_int = 0x80000;

pub const POLLRDHUP: ::c_short = 0x4000;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a revert of #3864.


pub const TCP_KEEPIDLE: ::c_int = 34;
pub const TCP_KEEPCNT: ::c_int = 35;
pub const TCP_KEEPINTVL: ::c_int = 36;
Expand All @@ -171,7 +173,12 @@ pub const F_FLOCK: ::c_int = 53;
pub const F_FLOCKW: ::c_int = 54;

pub const F_DUPFD_CLOEXEC: ::c_int = 37;
pub const F_DUPFD_CLOFORK: ::c_int = 58;
pub const F_DUP2FD_CLOEXEC: ::c_int = 36;
pub const F_DUP2FD_CLOFORK: ::c_int = 57;
pub const F_DUP3FD: ::c_int = 59;

pub const FD_CLOFORK: ::c_int = 2;
Comment on lines +176 to +181
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are new.


pub const FIL_ATTACH: ::c_int = 0x1;
pub const FIL_DETACH: ::c_int = 0x2;
Expand All @@ -184,9 +191,20 @@ pub const SOL_FILTER: ::c_int = 0xfffc;

pub const MADV_PURGE: ::c_int = 9;

pub const POSIX_FADV_NORMAL: ::c_int = 0;
pub const POSIX_FADV_RANDOM: ::c_int = 1;
pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
pub const POSIX_FADV_WILLNEED: ::c_int = 3;
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
Comment on lines +194 to +199
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert.


pub const SIGINFO: ::c_int = 41;

pub const O_DIRECT: ::c_int = 0x2000000;
pub const O_CLOFORK: ::c_int = 0x4000000;

pub const MSG_CMSG_CLOEXEC: ::c_int = 0x1000;
pub const MSG_CMSG_CLOFORK: ::c_int = 0x2000;
Comment on lines +204 to +207
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New.


pub const PBIND_HARD: ::processorid_t = -3;
pub const PBIND_SOFT: ::processorid_t = -4;
Expand Down Expand Up @@ -305,6 +323,7 @@ extern "C" {
stackaddr: *mut ::c_void,
) -> ::c_int;

pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advice: ::c_int) -> ::c_int;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert.

pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t;
pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t)
-> ::ssize_t;
Expand Down