Skip to content

Commit e839250

Browse files
committed
Merge branch 'stratact-no-dir-allocators'
closes #2885 closes #2886 closes #2888 closes #3249
2 parents a5cc758 + 064377b commit e839250

25 files changed

+1089
-411
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,5 +630,8 @@ set_target_properties(zig PROPERTIES
630630
LINK_FLAGS ${EXE_LDFLAGS}
631631
)
632632
target_link_libraries(zig compiler "${LIBUSERLAND}")
633+
if(MSVC)
634+
target_link_libraries(zig ntdll.lib)
635+
endif()
633636
add_dependencies(zig zig_build_libuserland)
634637
install(TARGETS zig DESTINATION bin)

doc/docgen.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn main() !void {
5151
var toc = try genToc(allocator, &tokenizer);
5252

5353
try fs.makePath(allocator, tmp_dir_name);
54-
defer fs.deleteTree(allocator, tmp_dir_name) catch {};
54+
defer fs.deleteTree(tmp_dir_name) catch {};
5555

5656
try genHtml(allocator, &tokenizer, &toc, &buffered_out_stream.stream, zig_exe);
5757
try buffered_out_stream.flush();

lib/std/build.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ pub const Builder = struct {
331331
if (self.verbose) {
332332
warn("rm {}\n", full_path);
333333
}
334-
fs.deleteTree(self.allocator, full_path) catch {};
334+
fs.deleteTree(full_path) catch {};
335335
}
336336

337337
// TODO remove empty directories
@@ -2687,7 +2687,7 @@ pub const RemoveDirStep = struct {
26872687
const self = @fieldParentPtr(RemoveDirStep, "step", step);
26882688

26892689
const full_path = self.builder.pathFromRoot(self.dir_path);
2690-
fs.deleteTree(self.builder.allocator, full_path) catch |err| {
2690+
fs.deleteTree(full_path) catch |err| {
26912691
warn("Unable to remove {}: {}\n", full_path, @errorName(err));
26922692
return err;
26932693
};

lib/std/c.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ pub extern "c" fn mmap(addr: ?*align(page_size) c_void, len: usize, prot: c_uint
8080
pub extern "c" fn munmap(addr: *align(page_size) c_void, len: usize) c_int;
8181
pub extern "c" fn mprotect(addr: *align(page_size) c_void, len: usize, prot: c_uint) c_int;
8282
pub extern "c" fn unlink(path: [*]const u8) c_int;
83+
pub extern "c" fn unlinkat(dirfd: fd_t, path: [*]const u8, flags: c_uint) c_int;
8384
pub extern "c" fn getcwd(buf: [*]u8, size: usize) ?[*]u8;
8485
pub extern "c" fn waitpid(pid: c_int, stat_loc: *c_uint, options: c_uint) c_int;
8586
pub extern "c" fn fork() c_int;

lib/std/event/fs.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ const test_tmp_dir = "std_event_fs_test";
13121312
//
13131313
// // TODO move this into event loop too
13141314
// try os.makePath(allocator, test_tmp_dir);
1315-
// defer os.deleteTree(allocator, test_tmp_dir) catch {};
1315+
// defer os.deleteTree(test_tmp_dir) catch {};
13161316
//
13171317
// var loop: Loop = undefined;
13181318
// try loop.initMultiThreaded(allocator);

0 commit comments

Comments
 (0)