freebsd: add realpath to freebsd/index.zig
This commit is contained in:
parent
46a0f60e4c
commit
a6f33e3dc5
@ -580,6 +580,10 @@ pub fn getdirentries(fd: i32, buf_ptr: [*]u8, buf_len: usize, basep: *i64) usize
|
|||||||
return errnoWrap(@bitCast(isize, c.getdirentries(fd, buf_ptr, buf_len, basep)));
|
return errnoWrap(@bitCast(isize, c.getdirentries(fd, buf_ptr, buf_len, basep)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn realpath(noalias filename: [*]const u8, noalias resolved_name: [*]u8) usize {
|
||||||
|
return if (c.realpath(filename, resolved_name) == null) @bitCast(usize, -isize(c._errno().*)) else 0;
|
||||||
|
}
|
||||||
|
|
||||||
pub fn isatty(fd: i32) bool {
|
pub fn isatty(fd: i32) bool {
|
||||||
return c.isatty(fd) != 0;
|
return c.isatty(fd) != 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user