aboutsummaryrefslogtreecommitdiff
path: root/std/os/bits/linux.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-07-02 13:27:40 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-07-02 13:41:16 -0400
commit1a1598c58cf506217355c6b8eec84c0e9a3a6d2e (patch)
tree2ec9f7e299e4e9d22459e305fd69eef64523a3a8 /std/os/bits/linux.zig
parent0dd2e93e4cb28205823e840d5fdb0fccce9cc2e7 (diff)
downloadzig-1a1598c58cf506217355c6b8eec84c0e9a3a6d2e.tar.gz
zig-1a1598c58cf506217355c6b8eec84c0e9a3a6d2e.zip
stack traces on segfault by default for linux-x86_64
closes #2355
Diffstat (limited to 'std/os/bits/linux.zig')
-rw-r--r--std/os/bits/linux.zig15
1 files changed, 9 insertions, 6 deletions
diff --git a/std/os/bits/linux.zig b/std/os/bits/linux.zig
index 0b355cd819..a11d843f88 100644
--- a/std/os/bits/linux.zig
+++ b/std/os/bits/linux.zig
@@ -12,6 +12,8 @@ pub usingnamespace switch (builtin.arch) {
pub const pid_t = i32;
pub const fd_t = i32;
+pub const uid_t = i32;
+pub const clock_t = isize;
pub const PATH_MAX = 4096;
pub const IOV_MAX = 1024;
@@ -712,22 +714,23 @@ pub const all_mask = [_]u32{ 0xffffffff, 0xffffffff };
pub const app_mask = [_]u32{ 0xfffffffc, 0x7fffffff };
pub const k_sigaction = extern struct {
- handler: extern fn (i32) void,
+ sigaction: ?extern fn (i32, *siginfo_t, *c_void) void,
flags: usize,
restorer: extern fn () void,
mask: [2]u32,
};
/// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall.
-pub const Sigaction = struct {
- handler: extern fn (i32) void,
+pub const Sigaction = extern struct {
+ sigaction: ?extern fn (i32, *siginfo_t, *c_void) void,
mask: sigset_t,
flags: u32,
+ restorer: ?extern fn () void = null,
};
-pub const SIG_ERR = @intToPtr(extern fn (i32) void, maxInt(usize));
-pub const SIG_DFL = @intToPtr(extern fn (i32) void, 0);
-pub const SIG_IGN = @intToPtr(extern fn (i32) void, 1);
+pub const SIG_ERR = @intToPtr(extern fn (i32, *siginfo_t, *c_void) void, maxInt(usize));
+pub const SIG_DFL = @intToPtr(?extern fn (i32, *siginfo_t, *c_void) void, 0);
+pub const SIG_IGN = @intToPtr(extern fn (i32, *siginfo_t, *c_void) void, 1);
pub const empty_sigset = [_]usize{0} ** sigset_t.len;
pub const in_port_t = u16;