Skip to content

Commit 88740ef

Browse files
committed
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`
2 parents 7e3c99c + e57e4a7 commit 88740ef

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

libc-test/semver/netbsd.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1055,9 +1055,13 @@ VM_PROC_MAP
10551055
VREPRINT
10561056
VSTATUS
10571057
VWERASE
1058+
WALLSIG
1059+
WALTSIG
10581060
WEXITED
10591061
WNOWAIT
1062+
WNOZOMBIE
10601063
WSTOPPED
1064+
WTRAPPED
10611065
YESEXPR
10621066
YESSTR
10631067
_IOFBF

libc-test/semver/openbsd.txt

+7
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,9 @@ O_RSYNC
618618
O_SHLOCK
619619
O_SYNC
620620
PENDIN
621+
P_ALL
622+
P_PGID
623+
P_PID
621624
PF_APPLETALK
622625
PF_BLUETOOTH
623626
PF_BPF
@@ -835,6 +838,10 @@ UTIME_OMIT
835838
UT_HOSTSIZE
836839
UT_LINESIZE
837840
UT_NAMESIZE
841+
WEXITED
842+
WNOWAIT
843+
WSTOPPED
844+
WTRAPPED
838845
VDISCARD
839846
VDSUSP
840847
VLNEXT

src/unix/bsd/netbsdlike/netbsd/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,11 @@ pub const WCONTINUED: ::c_int = 0x00000010;
22202220
pub const WEXITED: ::c_int = 0x000000020;
22212221
pub const WNOWAIT: ::c_int = 0x00010000;
22222222

2223+
pub const WALTSIG: ::c_int = 0x00000004;
2224+
pub const WALLSIG: ::c_int = 0x00000008;
2225+
pub const WTRAPPED: ::c_int = 0x00000040;
2226+
pub const WNOZOMBIE: ::c_int = 0x00020000;
2227+
22232228
pub const P_ALL: idtype_t = 0;
22242229
pub const P_PID: idtype_t = 1;
22252230
pub const P_PGID: idtype_t = 4;

src/unix/bsd/netbsdlike/openbsd/mod.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pub type sigset_t = ::c_uint;
77
pub type blksize_t = i32;
88
pub type fsblkcnt_t = u64;
99
pub type fsfilcnt_t = u64;
10+
pub type idtype_t = ::c_uint;
1011
pub type pthread_attr_t = *mut ::c_void;
1112
pub type pthread_mutex_t = *mut ::c_void;
1213
pub type pthread_mutexattr_t = *mut ::c_void;
@@ -1615,7 +1616,15 @@ pub const BIOCSDLT: ::c_ulong = 0x8004427a;
16151616

16161617
pub const PTRACE_FORK: ::c_int = 0x0002;
16171618

1618-
pub const WCONTINUED: ::c_int = 8;
1619+
pub const WCONTINUED: ::c_int = 0x08;
1620+
pub const WEXITED: ::c_int = 0x04;
1621+
pub const WSTOPPED: ::c_int = 0x02; // same as WUNTRACED
1622+
pub const WNOWAIT: ::c_int = 0x10;
1623+
pub const WTRAPPED: ::c_int = 0x20;
1624+
1625+
pub const P_ALL: ::idtype_t = 0;
1626+
pub const P_PGID: ::idtype_t = 1;
1627+
pub const P_PID: ::idtype_t = 2;
16191628

16201629
// search.h
16211630
pub const FIND: ::ACTION = 0;

0 commit comments

Comments
 (0)