mirror of
https://github.com/ziglang/zig.git
synced 2025-12-22 14:13:08 +00:00
std: Update more siginfo bits for BSDs
This commit is contained in:
parent
fc70db5ab5
commit
3375a580be
@ -805,6 +805,10 @@ pub const sigset_t = extern struct {
|
|||||||
__bits: [_SIG_WORDS]u32,
|
__bits: [_SIG_WORDS]u32,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize));
|
||||||
|
pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0);
|
||||||
|
pub const SIG_IGN = @intToPtr(?Sigaction.sigaction_fn, 1);
|
||||||
|
|
||||||
pub const empty_sigset = sigset_t{ .__bits = [_]u32{0} ** _SIG_WORDS };
|
pub const empty_sigset = sigset_t{ .__bits = [_]u32{0} ** _SIG_WORDS };
|
||||||
|
|
||||||
// XXX x86_64 specific
|
// XXX x86_64 specific
|
||||||
|
|||||||
@ -773,11 +773,6 @@ pub const sigval = extern union {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pub const siginfo_t = extern union {
|
pub const siginfo_t = extern union {
|
||||||
pad: [128]u8,
|
|
||||||
info: _ksiginfo,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const _ksiginfo = extern struct {
|
|
||||||
signo: c_int,
|
signo: c_int,
|
||||||
code: c_int,
|
code: c_int,
|
||||||
errno: c_int,
|
errno: c_int,
|
||||||
@ -794,11 +789,22 @@ pub const _ksiginfo = extern struct {
|
|||||||
addr: ?*c_void,
|
addr: ?*c_void,
|
||||||
trapno: c_int,
|
trapno: c_int,
|
||||||
},
|
},
|
||||||
|
__pad: [128 - 3 * @sizeOf(c_int)]u8,
|
||||||
} align(@sizeOf(usize)),
|
} align(@sizeOf(usize)),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
comptime {
|
||||||
|
std.debug.assert(@sizeOf(siginfo_t) == 128);
|
||||||
|
}
|
||||||
|
|
||||||
pub const sigset_t = c_uint;
|
pub const sigset_t = c_uint;
|
||||||
pub const empty_sigset = sigset_t(0);
|
pub const empty_sigset: sigset_t = 0;
|
||||||
|
|
||||||
|
pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize));
|
||||||
|
pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0);
|
||||||
|
pub const SIG_IGN = @intToPtr(?Sigaction.sigaction_fn, 1);
|
||||||
|
pub const SIG_CATCH = @intToPtr(?Sigaction.sigaction_fn, 2);
|
||||||
|
pub const SIG_HOLD = @intToPtr(?Sigaction.sigaction_fn, 3);
|
||||||
|
|
||||||
pub const EPERM = 1; // Operation not permitted
|
pub const EPERM = 1; // Operation not permitted
|
||||||
pub const ENOENT = 2; // No such file or directory
|
pub const ENOENT = 2; // No such file or directory
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user