From bd0438a19c064a53e627344e8ac17f2a0bc91533 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 14 Jan 2025 16:45:33 +0100 Subject: [PATCH] tty: assume posix systems support posix.empty_sigset It should be pretty safe to assume that posix.empty_sigset is supported on most, if not all, posix systems. Individual OSes that need a different default value may add a case to the switch like macos. This should open up support for most other posix systems. closes #151 --- src/tty.zig | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/tty.zig b/src/tty.zig index 7342a9b..e1f3a8e 100644 --- a/src/tty.zig +++ b/src/tty.zig @@ -59,9 +59,7 @@ pub const PosixTty = struct { .handler = .{ .handler = PosixTty.handleWinch }, .mask = switch (builtin.os.tag) { .macos => 0, - .linux => posix.empty_sigset, - .freebsd => posix.empty_sigset, - else => @compileError("os not supported"), + else => posix.empty_sigset, }, .flags = 0, }; @@ -95,9 +93,7 @@ pub const PosixTty = struct { .handler = .{ .handler = posix.SIG.DFL }, .mask = switch (builtin.os.tag) { .macos => 0, - .linux => posix.empty_sigset, - .freebsd => posix.empty_sigset, - else => @compileError("os not supported"), + else => posix.empty_sigset, }, .flags = 0, };