authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-10-12 20:52:10+02:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-10-12 20:52:10+02:00
logead9630c135b86c77de9774635f7b5c55ce62f41
tree39078f6cf830fc437ace1a7769a8bb5d5071ce4c
parent40fc7a1fdac23b1799ebce69c2a65236886bc360

Fix signedness for some fields in ARM stat definition


1 files changed, 18 insertions(+), 9 deletions(-)

lib/std/os/bits/linux/arm-eabi.zig+18-9
...@@ -6,6 +6,8 @@ const iovec = linux.iovec;...@@ -6,6 +6,8 @@ const iovec = linux.iovec;
6const iovec_const = linux.iovec_const;6const iovec_const = linux.iovec_const;
7const stack_t = linux.stack_t;7const stack_t = linux.stack_t;
8const sigset_t = linux.sigset_t;8const sigset_t = linux.sigset_t;
9const uid_t = linux.uid_t;
10const gid_t = linux.gid_t;
911
10pub const SYS_restart_syscall = 0;12pub const SYS_restart_syscall = 0;
11pub const SYS_exit = 1;13pub const SYS_exit = 1;
...@@ -512,7 +514,14 @@ pub const msghdr_const = extern struct {...@@ -512,7 +514,14 @@ pub const msghdr_const = extern struct {
512 msg_flags: i32,514 msg_flags: i32,
513};515};
514516
517pub const blksize_t = i32;
518pub const nlink_t = u32;
519pub const time_t = isize;
520pub const mode_t = u32;
515pub const off_t = i64;521pub const off_t = i64;
522pub const ino_t = u64;
523pub const dev_t = u64;
524pub const blkcnt_t = i64;
516525
517/// Renamed to Stat to not conflict with the stat function.526/// Renamed to Stat to not conflict with the stat function.
518/// atime, mtime, and ctime have functions to return `timespec`,527/// atime, mtime, and ctime have functions to return `timespec`,
...@@ -521,22 +530,22 @@ pub const off_t = i64;...@@ -521,22 +530,22 @@ pub const off_t = i64;
521/// in C, macros are used to hide the differences. Here we use530/// in C, macros are used to hide the differences. Here we use
522/// methods to accomplish this.531/// methods to accomplish this.
523pub const Stat = extern struct {532pub const Stat = extern struct {
524 dev: u64,533 dev: dev_t,
525 __dev_padding: u32,534 __dev_padding: u32,
526 __ino_truncated: u32,535 __ino_truncated: u32,
527 mode: u32,536 mode: mode_t,
528 nlink: u32,537 nlink: nlink_t,
529 uid: u32,538 uid: uid_t,
530 gid: u32,539 gid: gid_t,
531 rdev: u64,540 rdev: dev_t,
532 __rdev_padding: u32,541 __rdev_padding: u32,
533 size: off_t,542 size: off_t,
534 blksize: i32,543 blksize: blksize_t,
535 blocks: u64,544 blocks: blkcnt_t,
536 atim: timespec,545 atim: timespec,
537 mtim: timespec,546 mtim: timespec,
538 ctim: timespec,547 ctim: timespec,
539 ino: u64,548 ino: ino_t,
540549
541 pub fn atime(self: Stat) timespec {550 pub fn atime(self: Stat) timespec {
542 return self.atim;551 return self.atim;