2018-01-25 17:10:11 +08:00
|
|
|
extern "c" fn __error() &c_int;
|
|
|
|
pub extern "c" fn _NSGetExecutablePath(buf: &u8, bufsize: &u32) c_int;
|
2018-01-05 04:30:22 +08:00
|
|
|
|
2018-03-05 13:57:02 +08:00
|
|
|
pub extern "c" fn __getdirentries64(fd: c_int, buf_ptr: &u8, buf_len: usize, basep: &i64) usize;
|
2017-03-23 14:59:58 +08:00
|
|
|
|
2017-08-27 17:15:24 +08:00
|
|
|
pub use @import("../os/darwin_errno.zig");
|
|
|
|
|
2017-03-23 14:59:58 +08:00
|
|
|
pub const _errno = __error;
|
2017-08-27 12:11:09 +08:00
|
|
|
|
|
|
|
/// Renamed to Stat to not conflict with the stat function.
|
|
|
|
pub const Stat = extern struct {
|
2017-11-11 03:02:45 +08:00
|
|
|
dev: i32,
|
2017-08-27 12:11:09 +08:00
|
|
|
mode: u16,
|
|
|
|
nlink: u16,
|
|
|
|
ino: u64,
|
|
|
|
uid: u32,
|
|
|
|
gid: u32,
|
2017-11-11 03:02:45 +08:00
|
|
|
rdev: i32,
|
|
|
|
atime: usize,
|
|
|
|
atimensec: usize,
|
|
|
|
mtime: usize,
|
|
|
|
mtimensec: usize,
|
|
|
|
ctime: usize,
|
|
|
|
ctimensec: usize,
|
|
|
|
birthtime: usize,
|
|
|
|
birthtimensec: usize,
|
|
|
|
size: i64,
|
|
|
|
blocks: i64,
|
|
|
|
blksize: i32,
|
2017-08-27 12:11:09 +08:00
|
|
|
flags: u32,
|
|
|
|
gen: u32,
|
|
|
|
lspare: i32,
|
2017-11-11 03:02:45 +08:00
|
|
|
qspare: [2]i64,
|
2017-08-27 12:11:09 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
pub const timespec = extern struct {
|
|
|
|
tv_sec: isize,
|
|
|
|
tv_nsec: isize,
|
|
|
|
};
|
2017-09-08 12:04:43 +08:00
|
|
|
|
|
|
|
pub const sigset_t = u32;
|
|
|
|
|
|
|
|
/// Renamed from `sigaction` to `Sigaction` to avoid conflict with function name.
|
|
|
|
pub const Sigaction = extern struct {
|
2018-01-25 17:10:11 +08:00
|
|
|
handler: extern fn(c_int)void,
|
2017-09-08 12:04:43 +08:00
|
|
|
sa_mask: sigset_t,
|
|
|
|
sa_flags: c_int,
|
|
|
|
};
|
2018-03-05 13:57:02 +08:00
|
|
|
|
|
|
|
pub const dirent = extern struct {
|
|
|
|
d_ino: usize,
|
|
|
|
d_seekoff: usize,
|
|
|
|
d_reclen: u16,
|
|
|
|
d_namlen: u16,
|
|
|
|
d_type: u8,
|
|
|
|
d_name: u8, // field address is address of first byte of name
|
|
|
|
};
|
2018-04-09 12:52:45 +08:00
|
|
|
|
|
|
|
pub const sockaddr = extern struct {
|
|
|
|
sa_len: u8,
|
|
|
|
sa_family: sa_family_t,
|
|
|
|
sa_data: [14]u8,
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const sa_family_t = u8;
|