summaryrefslogtreecommitdiff
path: root/binutils/bucomm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-06-29 12:59:49 +0000
committerNick Clifton <nickc@redhat.com>2012-06-29 12:59:49 +0000
commit53d8f02cedcc9fad61571e44a607ac65fb916362 (patch)
treee76d6ff70534fb44328d284865429cfa78a6895f /binutils/bucomm.c
parent59bfd32edccc7792d214f89cf99fd30637821f24 (diff)
downloadbinutils-redhat-53d8f02cedcc9fad61571e44a607ac65fb916362.tar.gz
PR binutils/14302
* bucomm.c (print_arelt_descr): Correctly report the archive size field (for 'ar tv'). * ar.c (print_contents): Use correct types for archive element sizes (for 'ar p'). (extract_file): Likewise (for 'ar x').
Diffstat (limited to 'binutils/bucomm.c')
-rw-r--r--binutils/bucomm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 86cb6e480a..bb3fb3f976 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -427,16 +427,18 @@ print_arelt_descr (FILE *file, bfd *abfd, bfd_boolean verbose)
char timebuf[40];
time_t when = buf.st_mtime;
const char *ctime_result = (const char *) ctime (&when);
+ bfd_size_type size;
/* POSIX format: skip weekday and seconds from ctime output. */
sprintf (timebuf, "%.12s %.4s", ctime_result + 4, ctime_result + 20);
mode_string (buf.st_mode, modebuf);
modebuf[10] = '\0';
+ size = buf.st_size;
/* POSIX 1003.2/D11 says to skip first character (entry type). */
- fprintf (file, "%s %ld/%ld %6ld %s ", modebuf + 1,
+ fprintf (file, "%s %ld/%ld %6" BFD_VMA_FMT "u %s ", modebuf + 1,
(long) buf.st_uid, (long) buf.st_gid,
- (long) buf.st_size, timebuf);
+ size, timebuf);
}
}