mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
commit
6810ffa424
@ -415,7 +415,7 @@ pub fn main() !void {
|
||||
else => return err,
|
||||
};
|
||||
|
||||
var w = if (watch) try Watch.init() else undefined;
|
||||
var w: Watch = if (watch and Watch.have_impl) try Watch.init() else undefined;
|
||||
|
||||
try run.thread_pool.init(thread_pool_options);
|
||||
defer run.thread_pool.deinit();
|
||||
@ -435,6 +435,9 @@ pub fn main() !void {
|
||||
else => return err,
|
||||
};
|
||||
if (fuzz) {
|
||||
if (builtin.single_threaded) {
|
||||
fatal("--fuzz not yet implemented for single-threaded builds", .{});
|
||||
}
|
||||
switch (builtin.os.tag) {
|
||||
// Current implementation depends on two things that need to be ported to Windows:
|
||||
// * Memory-mapping to share data between the fuzzer and build runner.
|
||||
|
||||
@ -600,7 +600,7 @@ const Os = switch (builtin.os.tag) {
|
||||
};
|
||||
}
|
||||
},
|
||||
.dragonfly, .freebsd, .netbsd, .openbsd, .ios, .macos, .tvos, .visionos, .watchos, .haiku => struct {
|
||||
.dragonfly, .freebsd, .netbsd, .openbsd, .ios, .macos, .tvos, .visionos, .watchos => struct {
|
||||
const posix = std.posix;
|
||||
|
||||
kq_fd: i32,
|
||||
|
||||
@ -5703,6 +5703,9 @@ pub const SOCK = switch (native_os) {
|
||||
pub const RAW = 3;
|
||||
pub const SEQPACKET = 5;
|
||||
pub const MISC = 255;
|
||||
|
||||
pub const NONBLOCK = 0x40000;
|
||||
pub const CLOEXEC = 0x80000;
|
||||
},
|
||||
.openbsd => struct {
|
||||
pub const STREAM = 1;
|
||||
@ -10824,8 +10827,8 @@ pub const LC = enum(c_int) {
|
||||
|
||||
pub extern "c" fn setlocale(category: LC, locale: ?[*:0]const u8) ?[*:0]const u8;
|
||||
|
||||
pub const getcontext = if (builtin.target.abi.isAndroid() or builtin.target.os.tag == .openbsd)
|
||||
{} // android bionic and openbsd libc does not implement getcontext
|
||||
pub const getcontext = if (builtin.target.abi.isAndroid() or builtin.target.os.tag == .openbsd or builtin.target.os.tag == .haiku)
|
||||
{} // libc does not implement getcontext
|
||||
else if (native_os == .linux and builtin.target.abi.isMusl())
|
||||
linux.getcontext
|
||||
else
|
||||
|
||||
@ -23,6 +23,11 @@ pub extern "root" fn get_system_info(system_info: *system_info) usize;
|
||||
pub extern "root" fn _get_team_info(team: i32, team_info: *team_info, size: usize) i32;
|
||||
pub extern "root" fn _get_next_area_info(team: i32, cookie: *i64, area_info: *area_info, size: usize) i32;
|
||||
pub extern "root" fn _get_next_image_info(team: i32, cookie: *i32, image_info: *image_info, size: usize) i32;
|
||||
pub extern "root" fn _kern_get_current_team() team_id;
|
||||
pub extern "root" fn _kern_open_dir(fd: fd_t, path: [*:0]const u8) fd_t;
|
||||
pub extern "root" fn _kern_read_dir(fd: fd_t, buffer: [*]u8, bufferSize: usize, maxCount: u32) isize;
|
||||
pub extern "root" fn _kern_rewind_dir(fd: fd_t) status_t;
|
||||
pub extern "root" fn _kern_read_stat(fd: fd_t, path: [*:0]const u8, traverseLink: bool, stat: *std.c.Stat, statSize: usize) status_t;
|
||||
|
||||
pub const area_info = extern struct {
|
||||
area: u32,
|
||||
|
||||
@ -64,6 +64,7 @@ pub fn rescan(cb: *Bundle, gpa: Allocator) RescanError!void {
|
||||
.netbsd => return rescanWithPath(cb, gpa, "/etc/openssl/certs/ca-certificates.crt"),
|
||||
.dragonfly => return rescanWithPath(cb, gpa, "/usr/local/etc/ssl/cert.pem"),
|
||||
.solaris, .illumos => return rescanWithPath(cb, gpa, "/etc/ssl/cacert.pem"),
|
||||
.haiku => return rescanWithPath(cb, gpa, "/boot/system/data/ssl/CARootCertificates.pem"),
|
||||
// https://github.com/SerenityOS/serenity/blob/222acc9d389bc6b490d4c39539761b043a4bfcb0/Ports/ca-certificates/package.sh#L19
|
||||
.serenity => return rescanWithPath(cb, gpa, "/etc/ssl/certs/ca-certificates.crt"),
|
||||
.windows => return rescanWindows(cb, gpa),
|
||||
|
||||
@ -13,6 +13,7 @@ pub const Entry = struct {
|
||||
|
||||
const IteratorError = error{
|
||||
AccessDenied,
|
||||
PermissionDenied,
|
||||
SystemResources,
|
||||
/// WASI-only. The path of an entry could not be encoded as valid UTF-8.
|
||||
/// WASI is unable to handle paths that cannot be encoded as well-formed UTF-8.
|
||||
@ -287,7 +288,7 @@ pub const Iterator = switch (native_os) {
|
||||
name,
|
||||
false,
|
||||
&stat_info,
|
||||
0,
|
||||
@sizeOf(posix.Stat),
|
||||
)))) {
|
||||
.SUCCESS => {},
|
||||
.INVAL => unreachable,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user