aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-04-29 19:59:24 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-04-29 19:59:24 +0000
commitbb1cf6eb322e21122779bd35b924e8393390370a (patch)
treed32edb59ca0bf9604b2d8f81024488c27c6ceac0 /gnu
parentdc90479ccab6d333ca7ecd11a3ef6b14375ffa83 (diff)
downloadsrc-bb1cf6eb322e21122779bd35b924e8393390370a.tar.gz
src-bb1cf6eb322e21122779bd35b924e8393390370a.zip
Handle byte counts for >2G archives
PR: 11389 Submitted by: Adrian Chadd <adrian@FreeBSD.org>
Notes
Notes: svn path=/head/; revision=46184
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 b50cbbb8cf00..818282cfa302 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 90cf3926263d..2d1ca4bf2d02 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 */