| ... | ... | @@ -750,6 +750,8 @@ const NSIG = 33; |
| 750 | 750 | pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize)); |
| 751 | 751 | pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0); |
| 752 | 752 | pub const SIG_IGN = @intToPtr(?Sigaction.sigaction_fn, 1); |
| 753 | pub const SIG_CATCH = @intToPtr(?Sigaction.sigaction_fn, 2); |
| 754 | pub const SIG_HOLD = @intToPtr(?Sigaction.sigaction_fn, 3); |
| 753 | 755 | |
| 754 | 756 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 755 | 757 | pub const Sigaction = extern struct { |
| ... | ... | @@ -772,7 +774,7 @@ pub const sigval = extern union { |
| 772 | 774 | ptr: ?*c_void, |
| 773 | 775 | }; |
| 774 | 776 | |
| 775 | | pub const siginfo_t = extern union { |
| 777 | pub const siginfo_t = extern struct { |
| 776 | 778 | signo: c_int, |
| 777 | 779 | code: c_int, |
| 778 | 780 | errno: c_int, |
| ... | ... | @@ -790,22 +792,20 @@ pub const siginfo_t = extern union { |
| 790 | 792 | trapno: c_int, |
| 791 | 793 | }, |
| 792 | 794 | __pad: [128 - 3 * @sizeOf(c_int)]u8, |
| 793 | | } align(@sizeOf(usize)), |
| 795 | }, |
| 794 | 796 | }; |
| 795 | 797 | |
| 796 | 798 | comptime { |
| 797 | | std.debug.assert(@sizeOf(siginfo_t) == 128); |
| 799 | if (@sizeOf(usize) == 4) |
| 800 | std.debug.assert(@sizeOf(siginfo_t) == 128) |
| 801 | else |
| 802 | // Take into account the padding between errno and data fields. |
| 803 | std.debug.assert(@sizeOf(siginfo_t) == 136); |
| 798 | 804 | } |
| 799 | 805 | |
| 800 | 806 | pub const sigset_t = c_uint; |
| 801 | 807 | pub const empty_sigset: sigset_t = 0; |
| 802 | 808 | |
| 803 | | pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize)); |
| 804 | | pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0); |
| 805 | | pub const SIG_IGN = @intToPtr(?Sigaction.sigaction_fn, 1); |
| 806 | | pub const SIG_CATCH = @intToPtr(?Sigaction.sigaction_fn, 2); |
| 807 | | pub const SIG_HOLD = @intToPtr(?Sigaction.sigaction_fn, 3); |
| 808 | | |
| 809 | 809 | pub const EPERM = 1; // Operation not permitted |
| 810 | 810 | pub const ENOENT = 2; // No such file or directory |
| 811 | 811 | pub const ESRCH = 3; // No such process |