From e57e4a79fdc5207dbdacf7ccc1559a584248626e Mon Sep 17 00:00:00 2001 From: Val Packett Date: Wed, 5 Apr 2023 15:11:50 -0300 Subject: [PATCH] netbsd,openbsd: add more waitid related constants --- libc-test/semver/netbsd.txt | 4 ++++ libc-test/semver/openbsd.txt | 7 +++++++ src/unix/bsd/netbsdlike/netbsd/mod.rs | 5 +++++ src/unix/bsd/netbsdlike/openbsd/mod.rs | 11 ++++++++++- 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt index b8fd4a194cd36..1ae531f55a8ea 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 d95190ee8c090..090311982c89f 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 b100b3e14259a..402257fd3bb9d 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 7f8f9400df510..8099bad1d114d 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;