3671582c15
The purpose of this is: * Only one way to do things * Changing a function with void return type to return a possible error becomes a 1 character change, subtly encouraging people to use errors. See #632 Here are some imperfect sed commands for performing this update: remove arrow: ``` sed -i 's/\(\bfn\b.*\)-> /\1/g' $(find . -name "*.zig") ``` add void: ``` sed -i 's/\(\bfn\b.*\))\s*{/\1) void {/g' $(find ../ -name "*.zig") ``` Some cleanup may be necessary, but this should do the bulk of the work.
48 lines
971 B
Zig
48 lines
971 B
Zig
extern "c" fn __error() &c_int;
|
|
pub extern "c" fn _NSGetExecutablePath(buf: &u8, bufsize: &u32) 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)void,
|
|
sa_mask: sigset_t,
|
|
sa_flags: c_int,
|
|
};
|