diff options
author | bors <bors@rust-lang.org> | 2023-04-12 12:08:36 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-04-12 12:08:36 +0000 |
commit | 88740efbf6e093bb021f2b67e518e247a47a61fd (patch) | |
tree | 9a6c40065f105e3aad6c06de68da456896c4d346 | |
parent | 7e3c99cd162fae59d1919ab2fddb66bfea634216 (diff) | |
parent | e57e4a79fdc5207dbdacf7ccc1559a584248626e (diff) | |
download | rust-libc-88740efbf6e093bb021f2b67e518e247a47a61fd.tar.gz |
Auto merge of #3188 - valpackett:waitconst, r=JohnTitor
netbsd,openbsd: add more waitid related constants
`P_ALL`/`P_PID`/`WEXITED`/`WNOWAIT`/`WSTOPPED` in particular are what's required for rustix to support waitid and they were missing on OpenBSD; while here add NetBSD's custom ones.
ping `@semarie`
-rw-r--r-- | libc-test/semver/netbsd.txt | 4 | ||||
-rw-r--r-- | libc-test/semver/openbsd.txt | 7 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/netbsd/mod.rs | 5 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/openbsd/mod.rs | 11 |
4 files changed, 26 insertions, 1 deletions
diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt index b8fd4a194c..1ae531f55a 100644 --- a/libc-test/semver/netbsd.txt +++ b/libc-test/semver/netbsd.txt @@ -1055,9 +1055,13 @@ VM_PROC_MAP VREPRINT VSTATUS VWERASE +WALLSIG +WALTSIG WEXITED WNOWAIT +WNOZOMBIE WSTOPPED +WTRAPPED YESEXPR YESSTR _IOFBF diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt index d95190ee8c..090311982c 100644 --- a/libc-test/semver/openbsd.txt +++ b/libc-test/semver/openbsd.txt @@ -618,6 +618,9 @@ O_RSYNC O_SHLOCK O_SYNC PENDIN +P_ALL +P_PGID +P_PID PF_APPLETALK PF_BLUETOOTH PF_BPF @@ -835,6 +838,10 @@ UTIME_OMIT UT_HOSTSIZE UT_LINESIZE UT_NAMESIZE +WEXITED +WNOWAIT +WSTOPPED +WTRAPPED VDISCARD VDSUSP VLNEXT diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index b100b3e142..402257fd3b 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -2220,6 +2220,11 @@ pub const WCONTINUED: ::c_int = 0x00000010; pub const WEXITED: ::c_int = 0x000000020; pub const WNOWAIT: ::c_int = 0x00010000; +pub const WALTSIG: ::c_int = 0x00000004; +pub const WALLSIG: ::c_int = 0x00000008; +pub const WTRAPPED: ::c_int = 0x00000040; +pub const WNOZOMBIE: ::c_int = 0x00020000; + pub const P_ALL: idtype_t = 0; pub const P_PID: idtype_t = 1; pub const P_PGID: idtype_t = 4; diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs index 7f8f9400df..8099bad1d1 100644 --- a/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -7,6 +7,7 @@ pub type sigset_t = ::c_uint; pub type blksize_t = i32; pub type fsblkcnt_t = u64; pub type fsfilcnt_t = u64; +pub type idtype_t = ::c_uint; pub type pthread_attr_t = *mut ::c_void; pub type pthread_mutex_t = *mut ::c_void; pub type pthread_mutexattr_t = *mut ::c_void; @@ -1615,7 +1616,15 @@ pub const BIOCSDLT: ::c_ulong = 0x8004427a; pub const PTRACE_FORK: ::c_int = 0x0002; -pub const WCONTINUED: ::c_int = 8; +pub const WCONTINUED: ::c_int = 0x08; +pub const WEXITED: ::c_int = 0x04; +pub const WSTOPPED: ::c_int = 0x02; // same as WUNTRACED +pub const WNOWAIT: ::c_int = 0x10; +pub const WTRAPPED: ::c_int = 0x20; + +pub const P_ALL: ::idtype_t = 0; +pub const P_PGID: ::idtype_t = 1; +pub const P_PID: ::idtype_t = 2; // search.h pub const FIND: ::ACTION = 0; |