Skip to content

Commit

Permalink
Fix android SA_* constants
Browse files Browse the repository at this point in the history
  • Loading branch information
malbarbo committed Feb 3, 2017
1 parent 04d2c7a commit a42b0ea
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
9 changes: 9 additions & 0 deletions src/unix/notbsd/android/b32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ pub type c_ulong = u32;
pub type mode_t = u16;
pub type off64_t = ::c_longlong;

// These constants must be of the same type of sigaction.sa_flags
pub const SA_NOCLDSTOP: ::c_ulong = 0x00000001;
pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002;
pub const SA_NODEFER: ::c_ulong = 0x40000000;
pub const SA_ONSTACK: ::c_ulong = 0x08000000;
pub const SA_RESETHAND: ::c_ulong = 0x80000000;
pub const SA_RESTART: ::c_ulong = 0x10000000;
pub const SA_SIGINFO: ::c_ulong = 0x00000004;

s! {
pub struct sigaction {
pub sa_sigaction: ::sighandler_t,
Expand Down
9 changes: 9 additions & 0 deletions src/unix/notbsd/android/b64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ pub type c_ulong = u64;
pub type mode_t = u32;
pub type off64_t = i64;

// These constants must be of the same type of sigaction.sa_flags
pub const SA_NOCLDSTOP: ::c_uint = 0x00000001;
pub const SA_NOCLDWAIT: ::c_uint = 0x00000002;
pub const SA_NODEFER: ::c_uint = 0x40000000;
pub const SA_ONSTACK: ::c_uint = 0x08000000;
pub const SA_RESETHAND: ::c_uint = 0x80000000;
pub const SA_RESTART: ::c_uint = 0x10000000;
pub const SA_SIGINFO: ::c_uint = 0x00000004;

s! {
pub struct sigaction {
pub sa_flags: ::c_uint,
Expand Down
8 changes: 0 additions & 8 deletions src/unix/notbsd/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@ pub const ECOMM: ::c_int = 70;
pub const EPROTO: ::c_int = 71;
pub const EDOTDOT: ::c_int = 73;

pub const SA_NODEFER: ::c_int = 0x40000000;
pub const SA_RESETHAND: ::c_int = 0x80000000;
pub const SA_RESTART: ::c_int = 0x10000000;
pub const SA_NOCLDSTOP: ::c_int = 0x00000001;

pub const EPOLL_CLOEXEC: ::c_int = 0x80000;

pub const EFD_CLOEXEC: ::c_int = 0x80000;
Expand Down Expand Up @@ -253,9 +248,6 @@ pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;

pub const FIOCLEX: ::c_int = 0x5451;

pub const SA_ONSTACK: ::c_ulong = 0x08000000;
pub const SA_SIGINFO: ::c_ulong = 0x00000004;
pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002;
pub const SIGCHLD: ::c_int = 17;
pub const SIGBUS: ::c_int = 7;
pub const SIGUSR1: ::c_int = 10;
Expand Down

0 comments on commit a42b0ea

Please sign in to comment.