summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-04-29 19:59:24 +0000
committerpeter <peter@FreeBSD.org>1999-04-29 19:59:24 +0000
commit7634f5f76b08db127fd33f5f3285d870f9d640a0 (patch)
treef4a5e9f3ebf36e5780bbd8386daa989418cbab38 /gnu
parent7af69b2bdcf585a25c3819c3e93b0af26b2e49d7 (diff)
downloadFreeBSD-src-7634f5f76b08db127fd33f5f3285d870f9d640a0.zip
FreeBSD-src-7634f5f76b08db127fd33f5f3285d870f9d640a0.tar.gz
Handle byte counts for >2G archives
PR: 11389 Submitted by: Adrian Chadd <adrian@FreeBSD.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/tar/tar.c2
-rw-r--r--gnu/usr.bin/tar/tar.h8
2 files changed, 8 insertions, 2 deletions
diff --git a/gnu/usr.bin/tar/tar.c b/gnu/usr.bin/tar/tar.c
index b50cbbb..818282c 100644
--- a/gnu/usr.bin/tar/tar.c
+++ b/gnu/usr.bin/tar/tar.c
@@ -233,7 +233,7 @@ main (argc, argv)
case CMD_CREATE:
create_archive ();
if (f_totals)
- fprintf (stderr, "Total bytes written: %d\n", tot_written);
+ fprintf (stderr, "Total bytes written: %qu\n", tot_written);
break;
case CMD_EXTRACT:
if (f_volhdr)
diff --git a/gnu/usr.bin/tar/tar.h b/gnu/usr.bin/tar/tar.h
index 90cf392..2d1ca4b 100644
--- a/gnu/usr.bin/tar/tar.h
+++ b/gnu/usr.bin/tar/tar.h
@@ -22,6 +22,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <sys/mknod.h>
#endif
+/*
+ * We need to include <sys/types.h> for the u_quad_t definition
+ */
+
+#include <sys/types.h>
+
/*
* Kludge for handling systems that can't cope with multiple
* external definitions of a variable. In ONE routine (tar.c),
@@ -168,7 +174,7 @@ TAR_EXTERN char filename_terminator; /* \n or \0. */
TAR_EXTERN char *tar; /* Name of this program */
TAR_EXTERN struct sp_array *sparsearray; /* Pointer to the start of the scratch space */
TAR_EXTERN int sp_array_size; /* Initial size of the sparsearray */
-TAR_EXTERN int tot_written; /* Total written to output */
+TAR_EXTERN u_quad_t tot_written; /* Total written to output */
TAR_EXTERN struct re_pattern_buffer
*label_pattern; /* compiled regex for extract label */
TAR_EXTERN char **ar_files; /* list of tape drive names */
OpenPOWER on IntegriCloud