Commit Graph

51 Commits

Author SHA1 Message Date
lukem
36869194a3 Fix -Wcast-qual and -Wsign-compare issues 2009-04-11 12:24:37 +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
joerg
199b0f6721 Fix logic error: memset arguments needs the whole size.
XXX nuke macro logic and just use sizeof.
2008-02-21 02:50:11 +00:00
joerg
4e2cb1955b Remove an unused assignment and convert the remaining for (; cond; )
into while.
2008-02-20 23:16:05 +00:00
joerg
0c8d1e69b7 Shrink by using "SysV" or ANSI C memset to init hash table. 2008-02-20 22:46:52 +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
hubertf
6df5e55489 Remove unused ctype.h header.
Contributed by Slava Semushin <slava.semushin@gmail.com> in private mail.
2007-02-07 14:20:58 +00:00
christos
857164eeb5 Coverity CID 2536: Clarify the error path further. 2006-04-09 20:01:40 +00:00
dsl
2ab52a9ec8 Rework the way that files are closed and unlinked on error.
In particular avoid calling fclose() again once it has failed.
Also multply 'oreg' by 2 once we modify the file - so we know when to
unlink it on error.
Fixes Coverty CIDs 2535 and 2536
2006-04-05 20:24:38 +00:00
wiz
bb38c4ebcc Sync usage with man page. From Kouichirou Hiratsuka in PR 26197. 2004-07-09 12:14:37 +00:00
agc
89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
wiz
472351e13d Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
wiz
31b1facf6b And finally, bump date (for -d description). 2003-01-23 08:53:46 +00:00
jdolecek
32cc757ba5 also add -d to SYNOPSIS 2003-01-23 08:51:00 +00:00
grant
817ab34933 Add description of -d.
From Soren Jacobsen in PR bin/20005.
2003-01-23 05:32:13 +00:00
wiz
774f88b197 ANSIfy. 2002-05-26 22:25:38 +00:00
wiz
806d4c812f __STDC__ is always defined on NetBSD. ANSIfy while I'm here. 2002-05-26 22:21:22 +00:00
ross
2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
wiz
aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
is
135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
soren
89c5a767f8 Fix doubled 'the's. 2000-03-13 22:55:05 +00:00
mycroft
68d6f4bf44 Remove spurious .ne's. 1999-03-24 06:27:49 +00:00
garbled
9e44e9b578 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:16:34 +00:00
wsanchez
cc084df5da Init style to quiet compiler.
Allow zcat hard link to compress rather than using zcat.sh wrapper; same as uncompress.
Don't install zcat, however; gzcat seems to be living in /usr/bin/zcat at the moment.
1998-10-08 01:56:28 +00:00
kleink
00bacf2e91 Attempt to restore a file's flags using chflags() only if the original file
ad any flags set (that is, st_flags is non-zero); this avoids a warning when
(un-)compressing a file on a file-system that does not support flags.  Fixes
PR bin/4981.
1998-03-10 12:45:44 +00:00
perry
34a98169f0 macroize BSD, NetBSD, FreeBSD and misc cleanup 1998-02-06 05:54:12 +00:00
lukem
b18fa5eb84 remove WARNS?=1 1997-11-08 09:31:04 +00:00
mycroft
1ea2e990d3 Use double, not float. 1997-10-19 15:18:43 +00:00
lukem
2124f91f12 getopt returns -1 not EOF 1997-10-18 13:04:29 +00:00
lukem
87f4122c62 * cleanup for WARNS=1
* deprecate register
* rindex -> strrchr
* fix .Nm usage
1997-09-15 10:58:35 +00:00
christos
3917c3179d - Makefile cleanups 1997-03-24 21:57:01 +00:00
mikel
5504577051 stdin and stdout are not regular files; fixes PR bin/3112
skip size checks, unlinking, &c. as specified by manpage if output is
  not a regular file
replace manifest constant with BUFSIZ
1997-01-16 04:51:29 +00:00
thorpej
150c33e60b Use ${INSTALL}. 1996-10-18 05:55:26 +00:00
abrown
091ed31b08 Add missing braces to for-loop to make compress work again after changes
between versions 1.9 and 1.10 (dumped core when not used as a filter).
1996-08-20 18:24:46 +00:00
mrg
a2c61dd4d4 fix lossage caused by compress' usage of /dev/stdout and /dev/stdin
combined with the (broken?) versions of these files provided with
the fdesc mount.  fixes PR#774 & PR#957.
1996-06-30 12:41:44 +00:00
glass
4ab05d0471 rcsid 1995-03-26 19:54:37 +00:00
glass
7025c9c2f2 new rcsid format. what is the format for shell scripts 1995-03-26 09:44:29 +00:00
cgd
92ca4cb3d9 add zopen declaration. 1994-12-24 16:27:18 +00:00
cgd
ac58b5cf8c don't install zcat (as it's now done by gzip), and excise the zcat sections
from the man page.  add a xref to zcat(1).  delete nothing, so that
people who want to avoid zcat can.
1994-10-17 21:43:15 +00:00
mycroft
4b8d7f5ee1 Fix RCS id format. 1994-10-06 16:43:17 +00:00
andrew
97e6ca09d7 Don't ignore compress -b information. 1994-09-19 12:47:30 +00:00
cgd
53d6e686d5 clean up import, add rcsid's. 1994-06-13 14:48:14 +00:00
cgd
3b93c56b85 new compress from Lite 1994-06-13 14:35:25 +00:00
jtc
79c47ced71 Both compress and gzip installed themselves as "zcat". I've changed the
makefiles so only gzip is installed as zcat (and now uncompress) because
gzip is faster than compress and it is able to detect corrupted files.
1993-10-23 01:13:35 +00:00
mycroft
e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft
dfb9caab49 Add RCS indentifiers. 1993-08-01 07:32:48 +00:00
mycroft
690cae8181 Add RCS indentifiers. 1993-07-31 15:17:49 +00:00
mycroft
d3e01f582d Whose inane idea was it to copy this list?
BTW, we need a `-r' option.
1993-06-24 06:11:34 +00:00
mycroft
d343706d65 Fix fencepost error. 1993-06-23 06:52:08 +00:00
deraadt
8ae65d6e54 patch00144 by Julian Stacey <stacey@guug.de>: compress.c had a
path[100] instead of path[MAXPATHLEN]
1993-05-25 07:05:18 +00:00