authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-13 19:28:38+01:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-13 19:28:38+01:00
log3375a580be51210115d43b9b76ecf8beef0d46dd
tree905b6af8d97c2ddd96af448e2056326b6db75b60
parentfc70db5ab5ab252471cf35acd48dc8dea0b0870d

std: Update more siginfo bits for BSDs


2 files changed, 16 insertions(+), 6 deletions(-)

lib/std/os/bits/netbsd.zig+4
...@@ -805,6 +805,10 @@ pub const sigset_t = extern struct {...@@ -805,6 +805,10 @@ pub const sigset_t = extern struct {
805 __bits: [_SIG_WORDS]u32,805 __bits: [_SIG_WORDS]u32,
806};806};
807807
808pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize));
809pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0);
810pub const SIG_IGN = @intToPtr(?Sigaction.sigaction_fn, 1);
811
808pub const empty_sigset = sigset_t{ .__bits = [_]u32{0} ** _SIG_WORDS };812pub const empty_sigset = sigset_t{ .__bits = [_]u32{0} ** _SIG_WORDS };
809813
810// XXX x86_64 specific814// XXX x86_64 specific
lib/std/os/bits/openbsd.zig+12-6
...@@ -773,11 +773,6 @@ pub const sigval = extern union {...@@ -773,11 +773,6 @@ pub const sigval = extern union {
773};773};
774774
775pub const siginfo_t = extern union {775pub const siginfo_t = extern union {
776 pad: [128]u8,
777 info: _ksiginfo,
778};
779
780pub const _ksiginfo = extern struct {
781 signo: c_int,776 signo: c_int,
782 code: c_int,777 code: c_int,
783 errno: c_int,778 errno: c_int,
...@@ -794,11 +789,22 @@ pub const _ksiginfo = extern struct {...@@ -794,11 +789,22 @@ pub const _ksiginfo = extern struct {
794 addr: ?*c_void,789 addr: ?*c_void,
795 trapno: c_int,790 trapno: c_int,
796 },791 },
792 __pad: [128 - 3 * @sizeOf(c_int)]u8,
797 } align(@sizeOf(usize)),793 } align(@sizeOf(usize)),
798};794};
799795
796comptime {
797 std.debug.assert(@sizeOf(siginfo_t) == 128);
798}
799
800pub const sigset_t = c_uint;800pub const sigset_t = c_uint;
801pub const empty_sigset = sigset_t(0);801pub const empty_sigset: sigset_t = 0;
802
803pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize));
804pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0);
805pub const SIG_IGN = @intToPtr(?Sigaction.sigaction_fn, 1);
806pub const SIG_CATCH = @intToPtr(?Sigaction.sigaction_fn, 2);
807pub const SIG_HOLD = @intToPtr(?Sigaction.sigaction_fn, 3);
802808
803pub const EPERM = 1; // Operation not permitted809pub const EPERM = 1; // Operation not permitted
804pub const ENOENT = 2; // No such file or directory810pub const ENOENT = 2; // No such file or directory