Commit Graph

143 Commits

Author SHA1 Message Date
mrg
77a6c12f15 pull across a few changes from the freebsd folks:
http://svn.freebsd.org/changeset/base/213044
	- fixes gunzip issues
http://svn.freebsd.org/changeset/base/213927
	- fixes various typos and comments

and also an older change to add support for bzip2's "-k" option:
	don't delete the input file


thanks!
2010-11-06 21:42:32 +00:00
joerg
70729907f6 Consistently use -- for all programs called. Drop some redundant flags
for the no file argument case.
2010-04-14 20:30:28 +00:00
wiz
10b9fb64b7 Sort SEE ALSO, fix an xref. 2010-04-14 19:52:05 +00:00
joerg
68128a5628 Refactor zdiff and extend functionality to the common suffixes for bzip2
and xz.
2010-04-14 18:55:12 +00:00
mrg
59c18d14fe apply a change from Xin LI <delphij@delphij.net> to avoid problems when
reading from pipes.  introduced with the multi-part bz2 fixes.
2009-12-05 03:23:37 +00:00
mrg
5e3404f76c update version to today. 2009-10-11 09:17:21 +00:00
mrg
205ea56f45 avoid an overflow in suffix handling, from Xin LI <delphij@delphij.net>. 2009-10-11 07:09:39 +00:00
mrg
569ceba59d add "pack" uncompression support, from Xin LI <delphij@delphij.net> 2009-10-11 07:07:54 +00:00
mrg
628b55bb8d fix support for multi-section bzip2 files, as created by pbzip2. 2009-10-11 05:17:20 +00:00
lukem
c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
lukem
f143270c8d fix sign-compare issues 2009-04-12 10:31:14 +00:00
mrg
a4a48f5384 note that -n also stops the timestamp from being output.
bump date.
2009-04-01 08:15:37 +00:00
gmcgarry
3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
skrll
38af541845 WARNS=3 2008-08-03 09:25:05 +00:00
lukem
98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
mrg
c2b95373bf remove clause #3 from my license where there are no other
copyright holders involved.
2008-05-29 14:51:25 +00:00
wiz
c75bafc005 2-clause my license. 2008-05-08 15:34:21 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
nakayama
66f1c31a47 grep "-H" option (print the filename for each match) always prints
filenames whether "-h" option (suppress filenames when multiple files
are searched) is speficied or not.

Make zgrep "-h" option actually works with using "-H" option only
when "-h" is not specified.
2008-04-27 09:27:55 +00:00
nakayama
c9f8548d80 Our gzip does not have "-o" option.
So replace -o with >, then znew can now work again.
2008-04-27 09:07:13 +00:00
tls
4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
martin
6bcac52d39 Apply fix from PR bin/35526 from Xin LI: fix typo in message 2007-01-31 08:23:22 +00:00
mrg
bb915868b8 properly detect when the output fails (eg, full filesystem) and do not
delete the input file.  patch from PR#35048.
2006-11-13 21:57:59 +00:00
mrg
712a3f3aae wrap a long line 2006-10-25 04:44:39 +00:00
mlelstv
0ce7ae1e3c End a decompression when trailing garbage is found. It emits a warning
message and causes a non-zero exit status (similar to GNU gzip).
Fixes PR bin/33045.
2006-10-13 20:17:46 +00:00
mlelstv
a3ee681f33 Abort decompression with an error when EOF is reached on input. The
test output will then be 'NOT OK'. Fixes PR bin/32933.
2006-10-13 20:16:32 +00:00
simonb
bca6df8e18 Add standard TNF copyright boilerplate. 2006-10-03 08:20:03 +00:00
mrg
33c0ea44b6 redo the previous, based on a comment from and reviewed by christos. 2006-09-27 22:20:31 +00:00
mrg
b1906bf12d redo previous: move the EOF check back into non-dead code so that it
will be used again.
2006-09-27 21:02:38 +00:00
christos
0bcef42677 Coverity CID 4073: Delete impossible code. 2006-09-27 19:09:14 +00:00
mrg
70e8425daf properly check the return value of read() & pread(). PR#26688. 2006-07-13 11:51:39 +00:00
mrg
5063b7a180 apply -Wno-pointer-sign with GCC4. 2006-05-12 02:01:15 +00:00
yamt
2553980909 - fix --.
- fix -e.
- fix patterns starting with -.
- fix "missing argument" message.
2006-05-03 16:48:29 +00:00
wiz
2f70583592 Remove unhandled H option from getopt() argument.
Describe -l in usage. Both from Igor Sobrado in private mail.

While here, sort options.
2005-12-13 10:02:04 +00:00
he
b5d827cee2 Use of ``vflag'' should be protected by #ifndef SMALL. 2005-11-23 18:34:51 +00:00
mrg
426bb686c4 due to popular demand, don't warn about >4GB files not having their
size correctly stored.  PR#32105 among other requests.
2005-11-22 09:07:03 +00:00
mrg
e3969e9f13 apply a patch from onno van der linden in PR#32070 that fixes
these problems:
	1) gzip -vt just prints the contents of a .Z file
	2) gzip -vt will print OK even if the .gz file is corrupt
	3) gzip -vt prints nothing with a .bz2 file
	4) gzip can loop endlessly with a corrupt .bz2 file
2005-11-22 09:05:29 +00:00
wiz
179b01d905 Fix typo reported by David A. Holland in PR 31422. 2005-09-30 13:46:56 +00:00
mrg
1a05f328bc apply a patch from christian biere:
- if we have an open fd, use it instead and, eg, fstat(2), of the file name
and stat(2).
- signed/unsigned variable fixes
- misc. cleanup
2005-09-20 05:12:15 +00:00
mrg
84cb5f3013 oops. fix previous by keeping the stat() inside #ifndef SMALL. pointed
out by dsl.
2005-09-15 18:51:33 +00:00
mrg
bdc7967496 in file_compress() always stat() the input file. this patch avoids
reading from uninitialised space as provided by John Hein in PR#28995.
2005-09-15 09:30:21 +00:00
mrg
5c0ab9e0af fix signed/unsigned mismatch reported by Christian Biere in PR#31180
using his provided patch.
2005-09-15 09:11:30 +00:00
wiz
aa81fc094a Use better section header. From YOMURA Masanori in private mail. 2005-09-11 23:30:20 +00:00
mrg
cde2923d5b avoid an infinite loop while decompressing invalid gzip files.
some minor CSE.  compare stat return value consistently.

thanks to tron for testing the first change.
2005-08-28 10:17:50 +00:00
lukem
6b5252b15f Fix numerous uninitalized variables.
Detected with gcc -Wuninitialized.
2005-06-02 01:51:58 +00:00
yamt
751e975bfc handle partial reads. PR/29484. 2005-02-22 21:45:44 +00:00
enami
4cc9b2f8f4 Fix parsing of $GZIP so that not to overrun the end of string.
Addesses PR#28779.  Fix is slightly different that suggested in the PR
since it fails if $GZIP contains whitespace.
2005-01-31 09:11:49 +00:00
jmc
40c0737463 Fixed for PR#28581. If stdin is the input stream, fstat it and check if it's
file. If so, use it's mtime for the mtime in the header. Otherwise use
time(2)'s result instead. Lines up with GNU gzip and RFC 1952 now as well.
2004-12-08 06:38:40 +00:00
dsl
2c25900b60 Don't abort decompression if there are no bytes in the output buffer
when the end of compressed block (ie the crc) is reached.
(ie when decompressing concatenated zipped files).
Fixes PR bin/27153
2004-10-08 12:46:24 +00:00
dsl
abc7a82e52 Count the output file size modulo 2^32 so that the check against the size
in the compressed file works for files greater than 4GB.
Fixes the fixable part of bin/26907
2004-09-11 11:07:44 +00:00