Skip to content

Commit 6e7a919

Browse files
committed
Auto merge of #2004 - dylni:define-cld-constants-for-more-targets, r=JohnTitor
Define CLD_ constants for more targets This is an extension of #1860 to support more targets. The values for these constants should be correct, but I'm not familiar with most of the targets, so they should be verified. These files should define the constants too, but the targets are closed source, so I don't know their values: - [src/unix/solarish/mod.rs](https://github.com/rust-lang/libc/blob/master/src/unix/solarish/mod.rs) - [src/vxworks/mod.rs](https://github.com/rust-lang/libc/blob/master/src/vxworks/mod.rs)
2 parents b1ee97b + d116ee5 commit 6e7a919

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

src/fuchsia/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,6 +1986,13 @@ pub const PIPE_BUF: usize = 4096;
19861986

19871987
pub const SI_LOAD_SHIFT: ::c_uint = 16;
19881988

1989+
pub const CLD_EXITED: ::c_int = 1;
1990+
pub const CLD_KILLED: ::c_int = 2;
1991+
pub const CLD_DUMPED: ::c_int = 3;
1992+
pub const CLD_TRAPPED: ::c_int = 4;
1993+
pub const CLD_STOPPED: ::c_int = 5;
1994+
pub const CLD_CONTINUED: ::c_int = 6;
1995+
19891996
pub const SIGEV_SIGNAL: ::c_int = 0;
19901997
pub const SIGEV_NONE: ::c_int = 1;
19911998
pub const SIGEV_THREAD: ::c_int = 2;

src/unix/bsd/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,13 @@ pub const TCP_MAXSEG: ::c_int = 2;
439439

440440
pub const PIPE_BUF: usize = 512;
441441

442+
pub const CLD_EXITED: ::c_int = 1;
443+
pub const CLD_KILLED: ::c_int = 2;
444+
pub const CLD_DUMPED: ::c_int = 3;
445+
pub const CLD_TRAPPED: ::c_int = 4;
446+
pub const CLD_STOPPED: ::c_int = 5;
447+
pub const CLD_CONTINUED: ::c_int = 6;
448+
442449
pub const POLLIN: ::c_short = 0x1;
443450
pub const POLLPRI: ::c_short = 0x2;
444451
pub const POLLOUT: ::c_short = 0x4;

src/unix/haiku/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,13 @@ pub const WEXITED: ::c_int = 0x08;
10591059
pub const WSTOPPED: ::c_int = 0x10;
10601060
pub const WNOWAIT: ::c_int = 0x20;
10611061

1062+
pub const CLD_EXITED: ::c_int = 60;
1063+
pub const CLD_KILLED: ::c_int = 61;
1064+
pub const CLD_DUMPED: ::c_int = 62;
1065+
pub const CLD_TRAPPED: ::c_int = 63;
1066+
pub const CLD_STOPPED: ::c_int = 64;
1067+
pub const CLD_CONTINUED: ::c_int = 65;
1068+
10621069
pub const P_ALL: idtype_t = 0;
10631070
pub const P_PID: idtype_t = 1;
10641071
pub const P_PGID: idtype_t = 2;

src/unix/uclibc/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,13 @@ pub const PIPE_BUF: usize = 4096;
11251125

11261126
pub const SI_LOAD_SHIFT: ::c_uint = 16;
11271127

1128+
pub const CLD_EXITED: ::c_int = 1;
1129+
pub const CLD_KILLED: ::c_int = 2;
1130+
pub const CLD_DUMPED: ::c_int = 3;
1131+
pub const CLD_TRAPPED: ::c_int = 4;
1132+
pub const CLD_STOPPED: ::c_int = 5;
1133+
pub const CLD_CONTINUED: ::c_int = 6;
1134+
11281135
pub const SIGEV_SIGNAL: ::c_int = 0;
11291136
pub const SIGEV_NONE: ::c_int = 1;
11301137
pub const SIGEV_THREAD: ::c_int = 2;

0 commit comments

Comments
 (0)