aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/bits/linux.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-11-01 22:14:56 -0500
committerGitHub <noreply@github.com>2020-11-01 22:14:56 -0500
commit909aae8153e7ac71197bc9f864e4ceb2793317f2 (patch)
tree5da829286b85ef6e79ab9a9536b96b7ab6b33e97 /lib/std/os/bits/linux.zig
parentaf60931a488ac84030900d14c2ae7d17e0c84891 (diff)
parent891c6ddd5f4aa7a2de79bf5c155ffea71417bb15 (diff)
downloadzig-909aae8153e7ac71197bc9f864e4ceb2793317f2.tar.gz
zig-909aae8153e7ac71197bc9f864e4ceb2793317f2.zip
Merge pull request #6792 from koachan/sparc64-linux
Initial sparc64-linux bringup
Diffstat (limited to 'lib/std/os/bits/linux.zig')
-rw-r--r--lib/std/os/bits/linux.zig33
1 files changed, 27 insertions, 6 deletions
diff --git a/lib/std/os/bits/linux.zig b/lib/std/os/bits/linux.zig
index 8dbf21fcf2..ce9b4a90d1 100644
--- a/lib/std/os/bits/linux.zig
+++ b/lib/std/os/bits/linux.zig
@@ -19,6 +19,7 @@ pub usingnamespace switch (builtin.arch) {
.aarch64 => @import("linux/arm64.zig"),
.arm => @import("linux/arm-eabi.zig"),
.riscv64 => @import("linux/riscv64.zig"),
+ .sparcv9 => @import("linux/sparc64.zig"),
.mips, .mipsel => @import("linux/mips.zig"),
.powerpc64, .powerpc64le => @import("linux/powerpc64.zig"),
else => struct {},
@@ -30,6 +31,7 @@ pub usingnamespace @import("linux/securebits.zig");
const is_mips = builtin.arch.isMIPS();
const is_ppc64 = builtin.arch.isPPC64();
+const is_sparc = builtin.arch.isSPARC();
pub const pid_t = i32;
pub const fd_t = i32;
@@ -182,28 +184,47 @@ pub usingnamespace if (is_mips)
pub const SA_NOCLDSTOP = 1;
pub const SA_NOCLDWAIT = 0x10000;
pub const SA_SIGINFO = 8;
+ pub const SA_RESTART = 0x10000000;
+ pub const SA_RESETHAND = 0x80000000;
+ pub const SA_ONSTACK = 0x08000000;
+ pub const SA_NODEFER = 0x40000000;
+ pub const SA_RESTORER = 0x04000000;
pub const SIG_BLOCK = 1;
pub const SIG_UNBLOCK = 2;
pub const SIG_SETMASK = 3;
}
+else if (is_sparc)
+ struct {
+ pub const SA_NOCLDSTOP = 0x8;
+ pub const SA_NOCLDWAIT = 0x100;
+ pub const SA_SIGINFO = 0x200;
+ pub const SA_RESTART = 0x2;
+ pub const SA_RESETHAND = 0x4;
+ pub const SA_ONSTACK = 0x1;
+ pub const SA_NODEFER = 0x20;
+ pub const SA_RESTORER = 0x04000000;
+
+ pub const SIG_BLOCK = 1;
+ pub const SIG_UNBLOCK = 2;
+ pub const SIG_SETMASK = 4;
+ }
else
struct {
pub const SA_NOCLDSTOP = 1;
pub const SA_NOCLDWAIT = 2;
pub const SA_SIGINFO = 4;
+ pub const SA_RESTART = 0x10000000;
+ pub const SA_RESETHAND = 0x80000000;
+ pub const SA_ONSTACK = 0x08000000;
+ pub const SA_NODEFER = 0x40000000;
+ pub const SA_RESTORER = 0x04000000;
pub const SIG_BLOCK = 0;
pub const SIG_UNBLOCK = 1;
pub const SIG_SETMASK = 2;
};
-pub const SA_ONSTACK = 0x08000000;
-pub const SA_RESTART = 0x10000000;
-pub const SA_NODEFER = 0x40000000;
-pub const SA_RESETHAND = 0x80000000;
-pub const SA_RESTORER = 0x04000000;
-
pub const SIGHUP = 1;
pub const SIGINT = 2;
pub const SIGQUIT = 3;