Skip to content

Commit

Permalink
Auto merge of #2855 - i509VCB:siginfo, r=Amanieu
Browse files Browse the repository at this point in the history
add BUS_ si_code constants
  • Loading branch information
bors committed Aug 7, 2022
2 parents 4c0cb81 + bdd3baa commit 9d4e780
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libc-test/semver/android.txt
Expand Up @@ -176,6 +176,11 @@ BS0
BS1
BSDLY
BUFSIZ
BUS_ADRALN
BUS_ADRERR
BUS_OBJERR
BUS_MCEERR_AR
BUS_MCEERR_AO
CBAUD
CBAUDEX
CIBAUD
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/apple.txt
Expand Up @@ -108,6 +108,9 @@ BS0
BS1
BSDLY
BUFSIZ
BUS_ADRALN
BUS_ADRERR
BUS_OBJERR
CCStatus
CCCryptorStatus
CCRandomGenerateBytes
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/dragonfly.txt
Expand Up @@ -107,6 +107,9 @@ BOOT_TIME
BPF_ALIGNMENT
BTUARTDISC
BUFSIZ
BUS_ADRALN
BUS_ADRERR
BUS_OBJERR
CCAR_OFLOW
CCTS_OFLOW
CDSR_OFLOW
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/freebsd.txt
Expand Up @@ -133,6 +133,9 @@ BIOCVERSION
BOOT_TIME
BPF_ALIGNMENT
BUFSIZ
BUS_ADRALN
BUS_ADRERR
BUS_OBJERR
CCAR_OFLOW
CCTS_OFLOW
CDSR_OFLOW
Expand Down
5 changes: 5 additions & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -198,6 +198,11 @@ BS0
BS1
BSDLY
BUFSIZ
BUS_ADRALN
BUS_ADRERR
BUS_OBJERR
BUS_MCEERR_AR
BUS_MCEERR_AO
CANFD_BRS
CANFD_ESI
CANFD_MAX_DLC
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/netbsd.txt
Expand Up @@ -123,6 +123,9 @@ BIOCSSEESENT
BIOCVERSION
BOOT_TIME
BUFSIZ
BUS_ADRALN
BUS_ADRERR
BUS_OBJERR
CCTS_OFLOW
CDTRCTS
CHWFLOW
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/openbsd.txt
Expand Up @@ -86,6 +86,9 @@ BIOCSHDRCMPLT
BIOCSRSIG
BIOCVERSION
BUFSIZ
BUS_ADRALN
BUS_ADRERR
BUS_OBJERR
CCTS_OFLOW
CHWFLOW
CIGNORE
Expand Down
6 changes: 6 additions & 0 deletions src/unix/bsd/mod.rs
Expand Up @@ -449,6 +449,12 @@ pub const TCP_MAXSEG: ::c_int = 2;

pub const PIPE_BUF: usize = 512;

// si_code values for SIGBUS signal
pub const BUS_ADRALN: ::c_int = 1;
pub const BUS_ADRERR: ::c_int = 2;
pub const BUS_OBJERR: ::c_int = 3;

// si_code values for SIGCHLD signal
pub const CLD_EXITED: ::c_int = 1;
pub const CLD_KILLED: ::c_int = 2;
pub const CLD_DUMPED: ::c_int = 3;
Expand Down
6 changes: 6 additions & 0 deletions src/unix/haiku/mod.rs
Expand Up @@ -1243,6 +1243,12 @@ pub const WEXITED: ::c_int = 0x08;
pub const WSTOPPED: ::c_int = 0x10;
pub const WNOWAIT: ::c_int = 0x20;

// si_code values for SIGBUS signal
pub const BUS_ADRALN: ::c_int = 40;
pub const BUS_ADRERR: ::c_int = 41;
pub const BUS_OBJERR: ::c_int = 42;

// si_code values for SIGCHLD signal
pub const CLD_EXITED: ::c_int = 60;
pub const CLD_KILLED: ::c_int = 61;
pub const CLD_DUMPED: ::c_int = 62;
Expand Down
9 changes: 9 additions & 0 deletions src/unix/linux_like/mod.rs
Expand Up @@ -1211,6 +1211,15 @@ pub const PIPE_BUF: usize = 4096;

pub const SI_LOAD_SHIFT: ::c_uint = 16;

// si_code values for SIGBUS signal
pub const BUS_ADRALN: ::c_int = 1;
pub const BUS_ADRERR: ::c_int = 2;
pub const BUS_OBJERR: ::c_int = 3;
// Linux-specific si_code values for SIGBUS signal
pub const BUS_MCEERR_AR: ::c_int = 4;
pub const BUS_MCEERR_AO: ::c_int = 5;

// si_code values for SIGCHLD signal
pub const CLD_EXITED: ::c_int = 1;
pub const CLD_KILLED: ::c_int = 2;
pub const CLD_DUMPED: ::c_int = 3;
Expand Down

0 comments on commit 9d4e780

Please sign in to comment.