Skip to content

Commit

Permalink
Auto merge of #2004 - dylni:define-cld-constants-for-more-targets, r=…
Browse files Browse the repository at this point in the history
…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)
  • Loading branch information
bors committed Dec 24, 2020
2 parents b1ee97b + d116ee5 commit 6e7a919
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/fuchsia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1986,6 +1986,13 @@ pub const PIPE_BUF: usize = 4096;

pub const SI_LOAD_SHIFT: ::c_uint = 16;

pub const CLD_EXITED: ::c_int = 1;
pub const CLD_KILLED: ::c_int = 2;
pub const CLD_DUMPED: ::c_int = 3;
pub const CLD_TRAPPED: ::c_int = 4;
pub const CLD_STOPPED: ::c_int = 5;
pub const CLD_CONTINUED: ::c_int = 6;

pub const SIGEV_SIGNAL: ::c_int = 0;
pub const SIGEV_NONE: ::c_int = 1;
pub const SIGEV_THREAD: ::c_int = 2;
Expand Down
7 changes: 7 additions & 0 deletions src/unix/bsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,13 @@ pub const TCP_MAXSEG: ::c_int = 2;

pub const PIPE_BUF: usize = 512;

pub const CLD_EXITED: ::c_int = 1;
pub const CLD_KILLED: ::c_int = 2;
pub const CLD_DUMPED: ::c_int = 3;
pub const CLD_TRAPPED: ::c_int = 4;
pub const CLD_STOPPED: ::c_int = 5;
pub const CLD_CONTINUED: ::c_int = 6;

pub const POLLIN: ::c_short = 0x1;
pub const POLLPRI: ::c_short = 0x2;
pub const POLLOUT: ::c_short = 0x4;
Expand Down
7 changes: 7 additions & 0 deletions src/unix/haiku/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,13 @@ pub const WEXITED: ::c_int = 0x08;
pub const WSTOPPED: ::c_int = 0x10;
pub const WNOWAIT: ::c_int = 0x20;

pub const CLD_EXITED: ::c_int = 60;
pub const CLD_KILLED: ::c_int = 61;
pub const CLD_DUMPED: ::c_int = 62;
pub const CLD_TRAPPED: ::c_int = 63;
pub const CLD_STOPPED: ::c_int = 64;
pub const CLD_CONTINUED: ::c_int = 65;

pub const P_ALL: idtype_t = 0;
pub const P_PID: idtype_t = 1;
pub const P_PGID: idtype_t = 2;
Expand Down
7 changes: 7 additions & 0 deletions src/unix/uclibc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,13 @@ pub const PIPE_BUF: usize = 4096;

pub const SI_LOAD_SHIFT: ::c_uint = 16;

pub const CLD_EXITED: ::c_int = 1;
pub const CLD_KILLED: ::c_int = 2;
pub const CLD_DUMPED: ::c_int = 3;
pub const CLD_TRAPPED: ::c_int = 4;
pub const CLD_STOPPED: ::c_int = 5;
pub const CLD_CONTINUED: ::c_int = 6;

pub const SIGEV_SIGNAL: ::c_int = 0;
pub const SIGEV_NONE: ::c_int = 1;
pub const SIGEV_THREAD: ::c_int = 2;
Expand Down

0 comments on commit 6e7a919

Please sign in to comment.