/// Finds the default, native libc. pub fn findNative(self: *LibCInstallation, allocator: *Allocator) !void { self.* = .{}; if (is_windows) { if (is_gnu) { var batch = Batch(FindError!void, 3, .auto_async).init(); batch.add(&async self.findNativeIncludeDirPosix(allocator)); batch.add(&async self.findNativeCrtDirPosix(allocator)); batch.add(&async self.findNativeStaticCrtDirPosix(allocator)); try await batch.wait(); } else { var sdk: *ZigWindowsSDK = undefined; switch (zig_find_windows_sdk(&sdk)) { .None => { defer zig_free_windows_sdk(sdk); var batch = Batch(FindError!void, 5, .auto_async).init(); batch.add(&async self.findNativeMsvcIncludeDir(allocator, sdk)); batch.add(&async self.findNativeMsvcLibDir(allocator, sdk)); batch.add(&async self.findNativeKernel32LibDir(allocator, sdk)); batch.add(&async self.findNativeIncludeDirWindows(allocator, sdk)); batch.add(&async self.findNativeCrtDirWindows(allocator, sdk)); try await batch.wait(); }, .OutOfMemory => return error.OutOfMemory, .NotFound => return error.NotFound, .PathTooLong => return error.NotFound, } } } else { var batch = Batch(FindError!void, 2, .auto_async).init(); batch.add(&async self.findNativeIncludeDirPosix(allocator)); if (is_freebsd or is_netbsd) { self.crt_dir = try std.mem.dupeZ(allocator, u8, "/usr/lib"); } else if (is_linux or is_dragonfly) { batch.add(&async self.findNativeCrtDirPosix(allocator)); } try await batch.wait(); } }