build: update zig

This commit is contained in:
CJ van den Berg 2024-03-22 11:10:09 +01:00
parent 5c5fa22c68
commit 314b8d4909
7 changed files with 17 additions and 17 deletions

View file

@ -167,7 +167,7 @@ pub fn Collection(comptime Namespace: type) type {
const Fields = @Type(.{
.Struct = .{
.is_tuple = false,
.layout = .Auto,
.layout = .auto,
.decls = &.{},
.fields = &fields,
},

View file

@ -247,7 +247,7 @@ const Fire = struct {
.plane = plane,
.prng = std.rand.DefaultPrng.init(blk: {
var seed: u64 = undefined;
try std.os.getrandom(std.mem.asBytes(&seed));
try std.posix.getrandom(std.mem.asBytes(&seed));
break :blk seed;
}),
.FIRE_H = FIRE_H,

View file

@ -203,7 +203,7 @@ fn show_project(self: *Self) void {
fn abbrv_home(self: *Self) void {
if (std.fs.path.isAbsolute(self.name)) {
if (std.os.getenv("HOME")) |homedir| {
if (std.posix.getenv("HOME")) |homedir| {
const homerelpath = std.fs.path.relative(self.a, homedir, self.name) catch return;
if (homerelpath.len == 0) {
self.name = "~";

View file

@ -189,7 +189,7 @@ fn deinit(self: *Self) void {
fn listen_sigwinch(self: *Self) tp.result {
if (self.sigwinch_signal) |old| old.deinit();
self.sigwinch_signal = tp.signal.init(std.os.SIG.WINCH, tp.message.fmt(.{"sigwinch"})) catch |e| return tp.exit_error(e);
self.sigwinch_signal = tp.signal.init(std.posix.SIG.WINCH, tp.message.fmt(.{"sigwinch"})) catch |e| return tp.exit_error(e);
}
fn receive(self: *Self, from: tp.pid_ref, m: tp.message) tp.result {
@ -854,7 +854,7 @@ const OSC22_cursor_reply = OSC ++ "22:";
pub fn set_terminal_title(text: []const u8) void {
var writer = std.io.getStdOut().writer();
var buf: [std.os.PATH_MAX]u8 = undefined;
var buf: [std.posix.PATH_MAX]u8 = undefined;
const term_cmd = std.fmt.bufPrint(&buf, OSC0_title ++ "{s}" ++ BEL, .{text}) catch return;
_ = writer.write(term_cmd) catch return;
}