diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-03-06 12:52:57 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-03-06 12:52:57 -0500 |
commit | b95f33758bbbf89a8d88110945663636ab465d96 (patch) | |
tree | c33607d3f249c41acb5cc39425f4291a7b406ce4 | |
parent | aaee10ba70130484d23f7c55d4a487b949f6c076 (diff) |
use uintmax_t for file sizes
-rw-r--r-- | ls.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -24,6 +24,7 @@ #define _XOPEN_SOURCE 700 #include <stdio.h> +#include <stdint.h> #include <sys/stat.h> #include <unistd.h> #include <dirent.h> @@ -88,7 +89,7 @@ static int columns = 80; struct ls_entry { char name[PATH_MAX]; - off_t size; + uintmax_t size; ino_t inode; time_t time; uid_t uid; @@ -226,7 +227,7 @@ static int ls_other(struct ls_entry *current, int cpos) printf("%-*s ", longestgroup, current->group); } - printf("%*u ", sizelen, (unsigned int)current->size); + printf("%*ju ", sizelen, (uintmax_t)current->size); printf("%s %s", time, current->name); if (links != LLONG && current->type == 'l') |