mirror of
https://github.com/ziglang/zig.git
synced 2024-11-29 08:32:30 +00:00
1ac46fac15
* fix fstat wrong on darwin * move std.debug.global_allocator to std.debug.global_allocator_state and make it private * add std.debug.global_allocator as a pointer (to upgrade your zig code remove the '&')
46 lines
898 B
Zig
46 lines
898 B
Zig
extern "c" fn __error() -> &c_int;
|
|
|
|
pub use @import("../os/darwin_errno.zig");
|
|
|
|
pub const _errno = __error;
|
|
|
|
/// Renamed to Stat to not conflict with the stat function.
|
|
pub const Stat = extern struct {
|
|
dev: i32,
|
|
mode: u16,
|
|
nlink: u16,
|
|
ino: u64,
|
|
uid: u32,
|
|
gid: u32,
|
|
rdev: i32,
|
|
atime: usize,
|
|
atimensec: usize,
|
|
mtime: usize,
|
|
mtimensec: usize,
|
|
ctime: usize,
|
|
ctimensec: usize,
|
|
birthtime: usize,
|
|
birthtimensec: usize,
|
|
size: i64,
|
|
blocks: i64,
|
|
blksize: i32,
|
|
flags: u32,
|
|
gen: u32,
|
|
lspare: i32,
|
|
qspare: [2]i64,
|
|
};
|
|
|
|
pub const timespec = extern struct {
|
|
tv_sec: isize,
|
|
tv_nsec: isize,
|
|
};
|
|
|
|
pub const sigset_t = u32;
|
|
|
|
/// Renamed from `sigaction` to `Sigaction` to avoid conflict with function name.
|
|
pub const Sigaction = extern struct {
|
|
handler: extern fn(c_int),
|
|
sa_mask: sigset_t,
|
|
sa_flags: c_int,
|
|
};
|