Skip to content

Commit

Permalink
posix
Browse files Browse the repository at this point in the history
  • Loading branch information
donpdonp committed Jul 9, 2024
1 parent db294b2 commit ce8968f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ pub fn build(b: *std.Build) void {
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});

// const module = b.addModule("curl", .{});
// module.addIncludePath( .{ .src_path = .{ .sub_path = "/usr/include/x86_64-linux-gnu", .owner = b } });
// const lib = b.addStaticLibrary(.{
// .name = "zootdeck",
// // In this case the main source file is merely a path, however, in more
Expand All @@ -36,6 +38,8 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
exe.linkLibC();
exe.addIncludePath(.{ .src_path = .{ .sub_path = "/usr/include/x86_64-linux-gnu", .owner = b } });
exe.addIncludePath(.{ .cwd_relative = "." });

// This declares intent for the executable to be installed into the
// standard location when the user invokes the "install" step (the default
Expand Down
2 changes: 1 addition & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ fn guiback(command: *thread.Command) void {
}
if (command.id == 11) { // Quit
warn("byebye...\n", .{});
std.os.exit(0);
std.posix.exit(0);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/simple_buffer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub const SimpleU8 = struct {
pub fn append(self: *SimpleU8, m: []const u8) !void {
const old_len = self.len();
try self.resize(old_len + m.len);
std.mem.copy(u8, self.list.items[old_len..], m);
std.mem.copyForwards(u8, self.list.items[old_len..], m);
}

pub fn appendByte(self: *SimpleU8, byte: u8) !void {
Expand Down

0 comments on commit ce8968f

Please sign in to comment.