Commit Graph

1365 Commits

Author SHA1 Message Date
George C A Reid
4c7e4a544a Stop a null pointer dereference in the builtin hash function.
PR:		36141
Approved by:	cracauer
MFC after:	1 week
2002-04-15 15:49:30 +00:00
John W. De Boskey
b744b6caf9 Document option to option dependancy. Fix typo.
MFC after:	1 week
2002-04-15 02:21:12 +00:00
Philippe Charnier
c113db6945 Do not return(f_returning_void());. Spell FALLTHROUGH to make it lint()able. 2002-04-12 20:23:51 +00:00
Bosko Milekic
e5f7f97622 Introduce NO_RCMNDS flag so as to not compile rsh, rlogin, and rcp on will,
and document in share/examples/etc/make.conf

Submitted by: Aleksandar Simic <asimic@dsl.pipex.com>
MFC after: 1 week
2002-04-09 18:25:44 +00:00
Chris D. Faulhaber
a5b0f3020c errx()/strerror() -> err() 2002-04-07 04:59:13 +00:00
Giorgos Keramidas
80c7362ce3 Various mdoc fixes, including a change that corrects spacing as
described in PR docs/36461.

PR:		docs/36461
Noticed by:	Gary W. Swearingen <swear@blarg.net>
Submitted by:	ru
2002-03-31 20:49:37 +00:00
Andrey A. Chernov
82ea3997c1 Use intmax_t as quad_t replacement, like in expr 2002-03-28 16:30:42 +00:00
Ian Dowse
62edbd31c7 Make the columns in the output of df(1) line up, even for very large
filesystems. We now keep track of the maximum width required for
every variable-width field instead of just the first one.

PR:		bin/15510
MFC after:	1 week
2002-03-26 20:32:37 +00:00
Ruslan Ermilov
9f1207d517 Install sys/security/lomac/*.h to /usr/include/security/lomac/.
Install sys/<arch>/include/pc/*.h to /usr/include/machine/pc/.

PR:		docs/29534

Install sys/netatm/*/*.h to /usr/include/netatm/*/.

Don't install compatibility symlinks for <machine/soundcard.h>
and <machine/joystick.h>.  Three years is enough to be aware of
the change, and these weren't visible in the SHARED=symlinks
case.

Back out include/Makefile,v 1.160 that was a null change anyway
due to the bug in the path, and we now don't want to install
these headers because they would otherwise be invisible in the
SHARED=symlinks case.

Don't install IPFILTER headers.  Userland utilities fetch them
directly, and they were not visible in the SHARED=symlinks case.

Resurrect SHARED=symlinks in Makefile.inc1.

PR:		bin/28002

Prodded by:	bde
MFC after:	2 weeks
2002-03-26 16:05:14 +00:00
Mark Murray
55fad6bb0f Replace use of __progname with the functionally identical and more
acceptable getprogname(3).
2002-03-24 14:56:55 +00:00
Garrett Wollman
efbb5e2289 Disable -Werror when building -- the old version of gcc used on IA32 can't
deal with C99 formats.
2002-03-23 00:44:00 +00:00
Garrett Wollman
dc2f94a3ff Typo (if => of). 2002-03-22 20:49:29 +00:00
Garrett Wollman
7316a9465e Add a word of caution about integer arithmetic range and overflow detection. 2002-03-22 20:46:59 +00:00
Garrett Wollman
f477880a4f Fix a few formatting brainos and make the formatting of the EXAMPLES
section somewhat clearer.
2002-03-22 20:38:44 +00:00
Garrett Wollman
f07e42470f Make expr POSIX-compliant, and fix some bugs. Specifically:
- expr must conform to the Utility Syntax Guidelines, so use
getopt() to eat the (non-existent) options.

- Use the Standard type intmax_t for arithmetic.

- If an argument cannot be *completely* converted to an integer, then
it is a string.

Additionally make some style cleanups near the modified lines.  This
utility is still not completely style-compliant.
2002-03-22 20:18:26 +00:00
David E. O'Brien
0302f42b51 Update SCM ID. 2002-03-22 19:52:59 +00:00
David E. O'Brien
12767b8463 Note that -n is non-standard. 2002-03-22 19:52:48 +00:00
Mark Murray
d080dfa558 No need to cast; ().gr_gid is already the correct type. 2002-03-22 15:54:44 +00:00
David E. O'Brien
dce742c573 Add the -n option, which automatically answers "no" to the overwrite question. 2002-03-22 07:45:36 +00:00
Warner Losh
f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
Ruslan Ermilov
1640d4e019 mdoc(7) police: use precise width specifier. 2002-03-15 14:21:13 +00:00
Robert Watson
7774db9751 NAI DBA update. 2002-03-14 21:51:00 +00:00
Mark Murray
afa5289a98 1) Rev.1.35 of dd.c has a more serious regression. It backs out rev.1.31,
thus breaking systems with unpolluted <sys/stat.h>'s.

2) Back out an initialisation of a variable in BSS.

Reported by:	bde (1), many(2)
2002-03-07 14:00:33 +00:00
Maxim Konovalov
89a3a364c2 Log:
Remove eaccess(2) absence workaround. Add eaccess(2) checks for FILRD,
FILWR, FILEX and FILEXIST cases.

We cannot MFC this because there is no eaccess(2) in -stable yet.

PR:		bin/35076
Reviewed by:	ru
Approved by:	ru
2002-03-06 11:20:13 +00:00
Warner Losh
250a0cef8f Use ANSI-99 int names (uintXX_t) over traditional BSD int names
(u_intXX_t).
2002-03-05 05:28:49 +00:00
Alexey Zelkin
c1633140b7 Use NLSLINKS to setup symbolic links in NLS area 2002-03-04 12:29:21 +00:00
Alexey Zelkin
bd93868f5a This file is not used anymore 2002-03-04 11:10:17 +00:00
Alexey Zelkin
f66b3927b3 Use bsd.nls.mk for building/installing NLS files
XXX: links handling simplify
2002-03-04 10:34:51 +00:00
Alfred Perlstein
6188858ae1 clarify code:
add comments.
don't get the length of each arg passed, only the last one.
check against == or != NULL rather than using a pointer value as
truth test.
2002-03-04 05:30:04 +00:00
Doug White
0551940858 Update STANDARDS section on rm(1) to reflect current conformance.
PR:		35471
2002-03-02 05:10:11 +00:00
Andrey A. Chernov
5f7ca9ae38 Add (unsigned char) cast lost in WARNS=4 fixes which break 8bit locales
PR:		35421
2002-02-28 18:52:47 +00:00
Maxim Sobolev
42d6cdd371 Fix a bug introduced in rev.1.23 - for some reason mkdir("/", ...) system
call returns `EISDIR', not `EEXIST', so that be prepared for that. This should
fix number of ports, that often call `mkdir -p //usr/local/foobar'. This
is just a quick workaround, the real fix would be either to avoid calling
mkdir("/", ...) or fix VFS code to return consistent errno for this case.
2002-02-25 09:17:44 +00:00
Bruce Evans
434b6ea45a #include <time.h> for the definition of time functions instead of
depending on namespace pollution 2 layers deep in <sys/stat.h>.

Removed unused includes.
2002-02-25 01:36:59 +00:00
Bruce Evans
9880a81276 Fixed unsorting. 2002-02-23 21:00:14 +00:00
Bruce Evans
b909fa9cd0 Fixed some style bugs in revs 1.1 and 1.4. 2002-02-23 17:05:32 +00:00
Mark Murray
a3dbc1d804 ANSIfy. 2002-02-22 23:31:57 +00:00
Mark Murray
8bd08b5fac Fix warnings inspired by lint, a commercial lint and WARNS=4. 2002-02-22 21:24:14 +00:00
Mark Murray
ece5764570 Fix a boatload of warnings inspired by lint, a commercial lint
and WARNS=4.
2002-02-22 21:21:37 +00:00
Mark Murray
4b23bd7c2a Warnings fixes. 2002-02-22 21:13:31 +00:00
Mark Murray
4b4ed2fe6a Fix warnings inspired by lint, a commercial lint and WARNS=4. 2002-02-22 21:11:03 +00:00
Mark Murray
fab912df88 Partially fix (well, work around) warnings inspired by lint, a
commercial lint and WARNS=4.
2002-02-22 21:02:58 +00:00
Mark Murray
9b2010a2de Fix warnings inspired by lint, a commercial lint and WARNS=4. 2002-02-22 21:00:16 +00:00
Mark Murray
39661e26a5 Warnings fixes inspired by lint, a commercial lint and WARNS=4. 2002-02-22 20:57:53 +00:00
Mark Murray
5ca37430d9 Warning fix. Enter into the spirit of getopt(3) a bit more. 2002-02-22 20:55:04 +00:00
Mark Murray
9afa09cd0e Fix warnings inspired by lint, a commercial lint and WARNS=4. 2002-02-22 20:51:00 +00:00
Mark Murray
71bea4f79d Fix warnings inspired by lint, a commercial lint and WARNS=4 2002-02-22 20:45:09 +00:00
Matthew Dillon
d9a5f8900a Revert wchan functionality. Add 'mwchan' to supply new duel mutex/msleep
functionality and make it the default.

With additional improvements by: Mark Peek <mp@FreeBSD.org>
2002-02-21 18:27:16 +00:00
Chris D. Faulhaber
95a801b700 Remove extraneous blank line 2002-02-19 02:36:35 +00:00
Chris D. Faulhaber
32e7fd5991 Use acl_dup() to duplicate an ACL instead of rolling our own 2002-02-19 02:36:15 +00:00
Warner Losh
576541a9e6 Fixed divots that I created when I moved prototypes of group_from_gid
and user_from_uid to grp.h and pwd.h.  Update the man pages.

Submitted by: David Malone
Pointy hat to: imp
2002-02-19 00:05:59 +00:00
Warner Losh
1a24391866 Remove now-obsolete __STDC__ ifdefs, remove redundant NULL definition and
include stdlib.h for NULL.
2002-02-18 06:08:23 +00:00
Gregory Neil Shapiro
095dae9d7a Update build infrastructure for sendmail 8.12. 2002-02-17 22:05:07 +00:00
Matthew Dillon
ebc1fff946 When blocked on a mutex, display the mutex name via the wchan string field
so we can at least tell the difference between being blocked in Giant
and being blocked in some other mutex.
2002-02-16 20:10:00 +00:00
Dag-Erling Smørgrav
3ab6656108 Document the 'M' state. 2002-02-16 18:47:22 +00:00
Warner Losh
fc69394f0a Move user_from_uid to pwd.h
Move group_from_gid to grp.h
Remove from stdlib.h
Make the prototypes match the code
Fix rm and mv to include new files.

NetBSD has these defined in those files, and others too that I've not
done.

Approved by: terminal room kabal
Reviewed by: jhb, phk
2002-02-14 01:59:47 +00:00
Mark Peek
90e0035cca Install complete.tcsh and csh-mode.el into ${SHAREDIR}/examples/tcsh.
PR:		misc/34800 (from Steven Grady)
Submitted by:	phantom (patch)
MFC after:	3 days
2002-02-12 04:50:12 +00:00
Mike Barcroft
7146f7f115 Repo-copied src/bin/pwd/realpath.1' to src/bin/realpath/realpath.1',
as part of the move to seperate realpath(1) into its own directory.
2002-02-11 18:45:29 +00:00
Mike Barcroft
0dd10cae52 o Remove old code from pwd(1); realpath(1) is now in its own directory.
o Fix some unordered includes in pwd(1).
o Connect realpath(1) to the build.
2002-02-11 18:38:54 +00:00
Mike Barcroft
5330465c43 Move the realpath(1) source into its own directory. Previously, it
shared sources with pwd(1).
2002-02-11 07:32:17 +00:00
Mike Barcroft
3ce3a0bf8d Use the getprogname(3) function instead of directly accessing
`__progname'.

Submitted by:	dd
2002-02-10 05:56:36 +00:00
Mark Murray
91bd71d206 Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.
2002-02-08 22:31:43 +00:00
Brian Feldman
2fb080722f Correct a logic bug that snuck in and broke multiplication of off_ts. 2002-02-07 02:54:30 +00:00
Dave Zarzycki
076172c5bc Fix the race between the stat() and the mkdir().
Reviewed by:	jkh
2002-02-05 21:55:12 +00:00
Mike Barcroft
7a396ef4d5 Add -L option (SUSv3) to pwd(1). Fix a bug, where realpath(1) would
complain about paths starting with `-', by not calling getopt(3).

Submitted by:	Tim J. Robbins <tim@robbins.dropbear.id.au>
Obtained from:	NetBSD (partially)
MFC after:	1 month
2002-02-04 07:26:21 +00:00
Kris Kennaway
6a99036a7f Correct inadvertent style botches in previous commit. 2002-02-04 03:06:51 +00:00
Kris Kennaway
afe781faa2 Lock down with WFORMAT=1 except those directories with unfixed warnings.
Tested on i386 and alpha.
2002-02-04 02:49:19 +00:00
Kris Kennaway
f4c1428318 __printflike() should really be __printf0like() since verrx() can
accept a NULL format string.
2002-02-04 01:11:48 +00:00
Kris Kennaway
7cbc81e6a1 Add a __printflike() attribute to silence warning with FORMAT_AUDIT=1 2002-02-04 01:07:07 +00:00
Mark Murray
c73d77cef9 Use __FBSDID() and clean up the vendor tags. 2002-02-03 20:55:54 +00:00
Mark Murray
9052855a15 WARNS=4 fixes, plus a healthy dose of fixes inspired by lint. 2002-02-03 19:11:32 +00:00
Mark Murray
871e8d8c59 WARNS=4 fixes (incomplete, so set NO_WERROR), and lots of extra
cleanup courtesy of automatic checking (lint).
2002-02-03 14:43:04 +00:00
Akinori MUSHA
5c08c7d35d Work around a buffer overflow problem on argv that has been exposed
after making test(1) a sh(1) builtin; sh(1) coredumps when you run
something like this:

	sh -c 'test ! `true 1`'

The cause is that the test(1) code totally depends on the presence of
two extra cells at the end of argv that are filled with NULL's.  The
reason why the bug hasn't been exposed would be because the C startup
code kindly prepares argv with some extra zeroed cells for a program.

I know this is not the best fix, but since there are argv++'s without
boundary checks everywhere, I'd rather patch it up like this
(preparing a copy of argv with extra NULL's) for the moment.

MFC after:	3 days
2002-02-03 10:01:49 +00:00
Chris D. Faulhaber
42dcd8695a Use a more correct method of copying entire ACLs (fixes
operation under Linux).
2002-02-03 02:37:43 +00:00
Warner Losh
900021ae8e Fix unused variable. 2002-02-02 07:10:02 +00:00
Warner Losh
b75c76877e missed a few registers 2002-02-02 07:09:30 +00:00
Warner Losh
f789b2611b Ooops, forgot to remove the registers here. 2002-02-02 07:07:59 +00:00
Warner Losh
90e41fc40a %.* takes an int, not a size_t. 2002-02-02 07:06:58 +00:00
Warner Losh
5134c3f799 o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.
o Change
	int
	foo() {
	...
  to
	int
	foo(void)
	{
	...
2002-02-02 06:50:57 +00:00
Warner Losh
46251dde8f o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.
2002-02-02 06:48:10 +00:00
Warner Losh
7669d0fc4f o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.
o gc some #ifdef sun ... #endif code

Approved by: arch@, new style(9)
2002-02-02 06:36:49 +00:00
Warner Losh
f9bcb0beb5 o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.

Approved by: arch@, new style(9)
2002-02-02 06:24:13 +00:00
Warner Losh
5dce647c1b Modernization effort for bin/c*:
o __P has been reoved
  o Old-style K&R declarations have been converted to new C89 style
  o register has been removed
  o prototype for main() has been removed (gcc3 makes it an error)
  o int main(int argc, char *argv[]) is the preferred main definition.
  o Attempt to not break style(9) conformance for declarations more than
    they already are.

  Approved by: arch@, new style(9)
2002-02-02 06:15:22 +00:00
Warner Losh
78a3801de3 Drag cat(1) kicking and screaming into the late 1980's:
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.

Approved by: arch@, new style(9)
2002-02-02 06:10:01 +00:00
Sheldon Hearn
63b46af996 Refer to the original mode of the file, not the mode of the original
file.

PR:		docs/34224
Submitted by:	"Gary W. Swearingen" <swear@blarg.net>
2002-02-01 12:37:21 +00:00
Ruslan Ermilov
9e1c120c8e Remove a stray :' after v' in the getopt() call.
Submitted by:	bde
2002-01-28 13:43:22 +00:00
Ruslan Ermilov
831c910a30 GC the -W option. kvm(3) doesn't read swap for almost 10 years.
PR:		docs/34134
Reviewed by:	bde, peter
MFC after:	1 month
2002-01-28 09:43:26 +00:00
Brian Feldman
4ed955372c Commit general cleanups (separate get_num() and get_off_t() functions to
debogosify some of the command-line string-number conversions into
an unsigned and signed variant.)
2002-01-25 17:44:47 +00:00
Mike Heffner
6b8a6a6e6c Prevent overflowing the buffer that stores the command arguments.
PR:		bin/19422
Not objected to by: -audit
MFC after:	3 weeks
2002-01-20 01:30:40 +00:00
Maxim Sobolev
f1ff35aecb Add missed includes.
Reviewed by:	md5
2002-01-15 12:23:52 +00:00
Sergey Babkin
63f901ef53 The fix for >/dev/stdout, including Tor Egge's fix for the bug in the
original attempt of the fix. And yes, this time I've tried to build
world with it and it succeeded.

Submitted by:	Tor Egge
MFC after: 1 week
2002-01-13 14:37:40 +00:00
Ruslan Ermilov
127713f491 mdoc(7) police: tidy up. 2002-01-09 13:29:39 +00:00
Peter Wemm
a2e4c36a49 Put the "mtxname" keyword in alphabetical order (t comes after s) so
that the keyword is recognized.
2002-01-05 12:19:51 +00:00
Stephen McKay
16ef4ac3a3 Bruce thought some of the comments I added were not clear enough. This is
a combination of my words and his.  We will stop fiddling now. :-)
2002-01-01 06:14:26 +00:00
Bruce Evans
baa7ecb561 Fixed style bug (unsorting of SRCS) in rev.1.15. 2001-12-29 12:05:30 +00:00
Bruce Evans
31d680507a Fixed style bugs in revs. 1.6, 1.10 and 1.12. 2001-12-29 11:59:26 +00:00
Bruce Evans
95ca089fac Fixed missing DPADD and disordered LDADD in rev.1.17
Fixed setting of WARNS in rev.1.16.  Options should normally be set using
using "?=", not using "=", so that the setting is easy to override on the
command line, and setting WARNS to 0 should not be an exception.
2001-12-29 11:51:27 +00:00
Josef Karthauser
ac639e9072 LSCOLOURS should be spelt LSCOLORS.
Submitted by:	Jordan DeLong <fracture@allusion.net
2001-12-29 10:13:43 +00:00
Ben Smithurst
887f28b380 Remove part of a diff committed at the end of the file. 2001-12-29 00:51:23 +00:00
Josef Karthauser
47f884f098 Force raw printing of non-printable characters via the -w option.
PR:		bin/28007
2001-12-29 00:22:29 +00:00
Josef Karthauser
5dda5d0df0 Restore these files to shiny KNF. 2001-12-29 00:18:16 +00:00