Module Name:src
Committed By: snj
Date: Sun Mar 15 21:15:11 UTC 2015
Modified Files:
src/usr.bin/gzip [netbsd-5-1]: Makefile gzip.1 gzip.c zuncompress.c
Log Message:
Pull up following revision(s) (requested by mrg in ticket #1951):
usr.bin/gzip/Makefile: patch
usr.bin/gzip/gzip.1: revisions 1.20-1.24
usr.bin/gzip/gzip.c: revisions 1.98-1.107
usr.bin/gzip/zuncompress.c: revisions 1.7-1.8
Sync gzip core with HEAD.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.12.1 src/usr.bin/gzip/Makefile
cvs rdiff -u -r1.19 -r1.19.12.1 src/usr.bin/gzip/gzip.1
cvs rdiff -u -r1.93.4.3 -r1.93.4.3.2.1 src/usr.bin/gzip/gzip.c
cvs rdiff -u -r1.6.36.1 -r1.6.36.2 src/usr.bin/gzip/zuncompress.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/gzip/Makefile
diff -u src/usr.bin/gzip/Makefile:1.12 src/usr.bin/gzip/Makefile:1.12.12.1
--- src/usr.bin/gzip/Makefile:1.12 Fri Aug 29 00:02:24 2008
+++ src/usr.bin/gzip/Makefile Sun Mar 15 21:15:11 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2008/08/29 00:02:24 gmcgarry Exp $
+# $NetBSD: Makefile,v 1.12.12.1 2015/03/15 21:15:11 snj Exp $
USE_FORT?= yes # data-driven bugs?
@@ -30,3 +30,6 @@ LINKS+= ${BINDIR}/gzip ${BINDIR}/gunzip
.if (defined(HAVE_GCC) ${HAVE_GCC} == 4) || defined(HAVE_PCC)
COPTS.gzip.c+= -Wno-pointer-sign
.endif
+
+# NetBSD-5 has no -lzma
+CPPFLAGS+= -DNO_XZ_SUPPORT
Index: src/usr.bin/gzip/gzip.1
diff -u src/usr.bin/gzip/gzip.1:1.19 src/usr.bin/gzip/gzip.1:1.19.12.1
--- src/usr.bin/gzip/gzip.1:1.19 Thu May 29 14:51:27 2008
+++ src/usr.bin/gzip/gzip.1 Sun Mar 15 21:15:11 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: gzip.1,v 1.19 2008/05/29 14:51:27 mrg Exp $
+.\ $NetBSD: gzip.1,v 1.19.12.1 2015/03/15 21:15:11 snj Exp $
.\
.\ Copyright (c) 1997, 2003, 2004 Matthew R. Green
.\ All rights reserved.
@@ -24,7 +24,7 @@
.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\ SUCH DAMAGE.
.\
-.Dd April 27, 2004
+.Dd January 13, 2015
.Dt GZIP 1
.Os
.Sh NAME
@@ -138,8 +138,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
@@ -171,6 +171,7 @@ Options on the command line will overrid
.Sh SEE ALSO
.Xr bzip2 1 ,
.Xr compress 1 ,
+.Xr xz 1 ,
.Xr fts 3 ,
.Xr zlib 3
.Sh HISTORY
@@ -190,9 +191,9 @@ program for
This manual documents
.Nx
.Nm
-version 20040427.
+version 20150113.
.Sh AUTHORS
This implementation of
.Nm
was written by
-.An Matthew R. Green Aq m...@eterna.com.au .
+.An Matthew R. Green Aq Mt m...@eterna.com.au .
Index: src/usr.bin/gzip/gzip.c
diff -u src/usr.bin/gzip/gzip.c:1.93.4.3 src/usr.bin/gzip/gzip.c:1.93.4.3.2.1
--- src/usr.bin/gzip/gzip.c:1.93.4.3 Sun Nov 8 22:55:24 2009
+++ src/usr.bin/gzip/gzip.c Sun Mar 15 21:15:11 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: gzip.c,v 1.93.4.3 2009/11/08 22:55:24 snj Exp $ */
+/* $NetBSD: gzip.c,v 1.93.4.3.2.1 2015/03/15 21:15:11 snj Exp $ */
/*
* Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green
@@ -30,7 +30,7 @@
#ifndef lint
__COPYRIGHT(@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\
Matthew R. Green. All rights reserved.);
-__RCSID($NetBSD: gzip.c,v 1.93.4.3 2009/11/08 22:55:24 snj Exp $);
+__RCSID($NetBSD: gzip.c,v 1.93.4.3.2.1 2015/03/15 21:15:11 snj Exp $);
#endif /* not lint */
/*
@@ -81,6 +81,9 @@ enum filetype {
#ifndef NO_PACK_SUPPORT
FT_PACK,
#endif
+#ifndef NO_XZ_SUPPORT
+ FT_XZ,
+#endif
FT_LAST,
FT_UNKNOWN
};
@@ -101,6 +104,12 @@ enum filetype {
#define PACK_MAGIC \037\036
#endif
+#ifndef NO_XZ_SUPPORT
+#include lzma.h
+#define XZ_SUFFIX .xz
+#define XZ_MAGIC \3757zXZ
+#endif
+
#define GZ_SUFFIX .gz
#define BUFLEN (64 * 1024)
@@ -141,6 +150,9 @@ static suffixes_t suffixes[] = {
#ifndef NO_COMPRESS_SUPPORT
SUFFIX(Z_SUFFIX, ),
#endif
+#ifndef NO_XZ_SUPPORT
+ SUFFIX(XZ_SUFFIX, ),
+#endif
SUFFIX(GZ_SUFFIX, ), /* Overwritten by -S */
#endif /* SMALL */
#undef SUFFIX
@@ -148,7 +160,7 @@ static suffixes_t suffixes[] = {
#define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0])
#define SUFFIX_MAXLEN 30
-static const char gzip_version[] = NetBSD gzip 20091011;
+static const char gzip_version[] = NetBSD gzip 20150113;
static int cflag; /* stdout mode */
static int dflag; /* decompress mode */
@@ -157,6 +169,7 @@ static int numflag = 6; /* gzip -1..-9
#ifndef SMALL
static int fflag; /* force mode */
+static int kflag; /* don't delete input files */
static int nflag; /* don't save name/timestamp */
static int Nflag; /* don't restore name/timestamp */
static int qflag; /* quiet mode */
@@ -172,16 +185,17 @@