summaryrefslogtreecommitdiffstats
path: root/usr.bin/gzip
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-06-24 21:51:02 +0000
committerdelphij <delphij@FreeBSD.org>2009-06-24 21:51:02 +0000
commita2b16a14dfcf8adf5a116d8f4860420d042e48bb (patch)
tree1d00d604065a6b0aaa95f5c4bc5d5d3fd2d8fac6 /usr.bin/gzip
parente53e57277b75107b8ed5c3e296e30d1da52c1269 (diff)
downloadFreeBSD-src-a2b16a14dfcf8adf5a116d8f4860420d042e48bb.zip
FreeBSD-src-a2b16a14dfcf8adf5a116d8f4860420d042e48bb.tar.gz
Sync with NetBSD:
- gzip -n does not store timestamp; [1] - Reduce diff against NetBSD by moving some casts in our local versions. PR: bin/134955 Obtained from: NetBSD MFC after: 1 month
Diffstat (limited to 'usr.bin/gzip')
-rw-r--r--usr.bin/gzip/gzip.110
-rw-r--r--usr.bin/gzip/gzip.c6
-rw-r--r--usr.bin/gzip/zuncompress.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/gzip/gzip.1 b/usr.bin/gzip/gzip.1
index e6c61a7..20d0250 100644
--- a/usr.bin/gzip/gzip.1
+++ b/usr.bin/gzip/gzip.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: gzip.1,v 1.19 2008/05/29 14:51:27 mrg Exp $
+.\" $NetBSD: gzip.1,v 1.20 2009/04/01 08:15:37 mrg Exp $
.\"
.\" Copyright (c) 1997, 2003, 2004 Matthew R. Green
.\" All rights reserved.
@@ -25,7 +25,7 @@
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
-.Dd June 30, 2008
+.Dd June 24, 2009
.Dt GZIP 1
.Os
.Sh NAME
@@ -152,8 +152,8 @@ embedded in the file.
This option causes the stored filename in the input file to be used
as the output file.
.It Fl n , -no-name
-This option stops the filename from being stored in the output
-file.
+This option stops the filename and timestamp from being stored in
+the output file.
.It Fl q , -quiet
With this option, no warnings or errors are printed.
.It Fl r , -recursive
@@ -206,7 +206,7 @@ This implementation of
was ported based on the
.Nx
.Nm
-20060927, and first appeared in
+20090412, and first appeared in
.Fx 7.0 .
.Sh AUTHORS
This implementation of
diff --git a/usr.bin/gzip/gzip.c b/usr.bin/gzip/gzip.c
index bdff534..9d4548e 100644
--- a/usr.bin/gzip/gzip.c
+++ b/usr.bin/gzip/gzip.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gzip.c,v 1.92 2008/07/21 14:19:22 lukem Exp $ */
+/* $NetBSD: gzip.c,v 1.94 2009/04/12 10:31:14 lukem Exp $ */
/*-
* Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green
@@ -1360,10 +1360,10 @@ file_uncompress(char *file, char *outfile, size_t outsize)
#ifndef SMALL
if (method == FT_GZIP && Nflag) {
unsigned char ts[4]; /* timestamp */
- int rv;
+ ssize_t rv;
rv = pread(fd, ts, sizeof ts, GZIP_TIMESTAMP);
- if (rv >= 0 && (size_t)rv < sizeof ts)
+ if (rv >= 0 && rv < (ssize_t)(sizeof ts))
goto unexpected_EOF;
if (rv == -1) {
if (!fflag)
diff --git a/usr.bin/gzip/zuncompress.c b/usr.bin/gzip/zuncompress.c
index 82b7a47..dd0f249 100644
--- a/usr.bin/gzip/zuncompress.c
+++ b/usr.bin/gzip/zuncompress.c
@@ -1,4 +1,4 @@
-/* $NetBSD: zuncompress.c,v 1.6 2005/11/22 09:05:30 mrg Exp $ */
+/* $NetBSD: zuncompress.c,v 1.7 2009/04/12 10:31:14 lukem Exp $ */
/*-
* Copyright (c) 1985, 1986, 1992, 1993
@@ -147,7 +147,7 @@ zuncompress(FILE *in, FILE *out, char *pre, size_t prelen,
compressed_pre = NULL;
while ((bin = fread(buf, 1, sizeof(buf), in)) != 0) {
- if (tflag == 0 && fwrite(buf, 1, bin, out) != (size_t)bin) {
+ if (tflag == 0 && (off_t)fwrite(buf, 1, bin, out) != bin) {
free(buf);
return -1;
}
OpenPOWER on IntegriCloud