]> git.ipfire.org Git - thirdparty/coreutils.git/commit
ls: port to wider off_t, uid_t, gid_t
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 26 Jul 2021 07:26:32 +0000 (00:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 26 Jul 2021 07:59:37 +0000 (00:59 -0700)
commit39673b6d4cffe6315d2a572c3741777b3f6a3d28
treedcde76021795fd54dd080a91213af1452d67e642
parent0a41ad2cfb6aa7af21f40fc870a0b917410b1d4b
ls: port to wider off_t, uid_t, gid_t

* src/ls.c (dired_pos): Now off_t, not size_t, since it counts
output file offsets.
(dired_dump_obstack): This obstack's file offsets are now
off_t, not size_t.
(format_user_or_group, format_user_or_group_width):
ID arg is now uintmax_t, not unsigned long, since uid_t and
gid_t values might exceed ULONG_MAX.
(format_user_or_group_width): Use snprintf with NULL instead of
sprintf with a discarded buffer.  This avoids a stack buffer,
and so should be safer.
src/ls.c