Commit cb84875eed
Changed files (7)
lib
std
lib/std/fs/file.zig
@@ -35,7 +35,7 @@ pub const File = struct {
.windows => os.windows.LARGE_INTEGER,
// TODO: Handle possibility of 128 bit numbers? ReFS on windows server 2012 uses a 128 bit file
// index. See https://docs.microsoft.com/en-us/windows/win32/api/fileapi/ns-fileapi-by_handle_file_information
- else => u64,
+ else => os.ino_t,
};
pub const default_mode = switch (builtin.os.tag) {
lib/std/os/bits/linux/x86_64.zig
@@ -481,6 +481,7 @@ pub const msghdr_const = extern struct {
};
pub const off_t = i64;
+pub const ino_t = u64;
/// Renamed to Stat to not conflict with the stat function.
/// atime, mtime, and ctime have functions to return `timespec`,
@@ -490,7 +491,7 @@ pub const off_t = i64;
/// methods to accomplish this.
pub const Stat = extern struct {
dev: u64,
- ino: u64,
+ ino: ino_t,
nlink: usize,
mode: u32,
lib/std/os/bits/darwin.zig
@@ -53,6 +53,7 @@ pub const mach_timebase_info_data = extern struct {
};
pub const off_t = i64;
+pub const ino_t = u64;
/// Renamed to Stat to not conflict with the stat function.
/// atime, mtime, and ctime have functions to return `timespec`,
@@ -64,7 +65,7 @@ pub const Stat = extern struct {
dev: i32,
mode: u16,
nlink: u16,
- ino: u64,
+ ino: ino_t,
uid: u32,
gid: u32,
rdev: i32,
lib/std/os/bits/dragonfly.zig
@@ -138,8 +138,10 @@ pub const MAP_SIZEALIGN = 262144;
pub const PATH_MAX = 1024;
+pub const ino_t = c_ulong;
+
pub const Stat = extern struct {
- ino: c_ulong,
+ ino: ino_t,
nlink: c_uint,
dev: c_uint,
mode: c_ushort,
lib/std/os/bits/freebsd.zig
@@ -98,6 +98,7 @@ pub const msghdr_const = extern struct {
};
pub const off_t = i64;
+pub const ino_t = u64;
/// Renamed to Stat to not conflict with the stat function.
/// atime, mtime, and ctime have functions to return `timespec`,
@@ -107,7 +108,7 @@ pub const off_t = i64;
/// methods to accomplish this.
pub const Stat = extern struct {
dev: u64,
- ino: u64,
+ ino: ino_t,
nlink: usize,
mode: u16,
lib/std/os/bits/netbsd.zig
@@ -69,6 +69,7 @@ pub const msghdr_const = extern struct {
};
pub const off_t = i64;
+pub const ino_t = u64;
/// Renamed to Stat to not conflict with the stat function.
/// atime, mtime, and ctime have functions to return `timespec`,
@@ -79,7 +80,7 @@ pub const off_t = i64;
pub const Stat = extern struct {
dev: u64,
mode: u32,
- ino: u64,
+ ino: ino_t,
nlink: usize,
uid: u32,
lib/std/os/bits/wasi.zig
@@ -178,6 +178,7 @@ pub const FILESTAT_SET_MTIM: fstflags_t = 0x0004;
pub const FILESTAT_SET_MTIM_NOW: fstflags_t = 0x0008;
pub const inode_t = u64;
+pub const ino_t = inode_t;
pub const linkcount_t = u32;