Commit Graph

7592 Commits

Author SHA1 Message Date
Hartmut Brandt
1d2a8153d3 Style: fix indendation to be 8 and use tabulators. Fix lines longer than
80 characters and slightly reorder functions to get rid of static
prototypes.
2005-02-21 13:36:22 +00:00
Hartmut Brandt
6abaece6ae Forgot to set *freePtr to FALSE in another place.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-21 08:10:21 +00:00
Hartmut Brandt
436834581b Fix a bug in handling archive members: when a member was not found
when looking into an already hashed archive, the code tried to use
the name shortened to the maximum length allowed for the archive.
Unfortunately it passed a buffer of junk to the hashing routine when
the name actually wasn't too long. Theoretically this could lead to
a false positive.
2005-02-21 08:06:34 +00:00
Ruslan Ermilov
02172b19b8 Fixate the hash bucket size to 4K. We were using the default,
which is stat.st_blksize (i.e., PAGE_SIZE).

This change causes the .db files that were cross-compiled on
another platform to be identical to the natively built ones.

Tested on:	alpha->amd64 build
2005-02-19 23:59:49 +00:00
Hajimu UMEMOTO
1b92360adc simply ignore unknown address family.
MFC after:	1 week
2005-02-19 16:54:26 +00:00
Hajimu UMEMOTO
511912ad5c teach IPv6 to `systat -netstat'.
Tested by:	kuriyama
MFC after:	1 week
2005-02-19 15:10:19 +00:00
Garrett Wollman
456f9a140f Support correct programming environment name for amd64.
MFC after:	3 days
2005-02-18 21:53:05 +00:00
Tim Kientzle
b432e867aa Document the --null, --one-file-system, and -I options.
Clarify that -T can be used in 'x' mode as well as 'c' mode.
2005-02-18 19:19:45 +00:00
Hartmut Brandt
7f2e1af188 Push the assignments of some variables down into the sub-blocks where
it is actually needed. This makes clear in which subblocks the variables
are not needed and which can easier be split out.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-18 15:32:06 +00:00
Hartmut Brandt
1aaa4432a5 Push down variables into local scope in Var_Parse to make their
liveness clear for splitting up this monster function.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-18 07:33:43 +00:00
Herve Quiroz
f812d8f8c6 Add myself to the calendar 2005-02-17 16:38:56 +00:00
Hartmut Brandt
5fdd47f89b Whitespace cleanup: substitute mixed tabs and spaces by canonical
whitespace and line up some variable definitions.
2005-02-17 12:35:32 +00:00
Hartmut Brandt
b2a8c56e3a Move error case to begin of if-else chain. Do not needless initialize
startc, but only at the place where the initialisation is needed. Remove
a needless else.

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (partly)
2005-02-17 12:31:53 +00:00
Hartmut Brandt
3ff4a47ba0 Fix two typos in comments.
Submitted by:	ru & Max Okumoto <okumoto@ucsd.edu>
2005-02-17 09:09:34 +00:00
Hartmut Brandt
768820f8c7 Sort out the error case that a single '$' was passed a little bit
earlier instead of mixing its handling with other cases.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-17 09:01:19 +00:00
Hartmut Brandt
46f05faa3a Mostly stylistic issues: move a variable into local scope, make
condition positive and fix long lines.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-16 17:20:09 +00:00
Hartmut Brandt
5e431bae8f Better version of the patch in 1.117: bring a variable into local scope
to prepare for function splitting and slightly reorganise the code
in anticipation of Var_Subst returning a Buffer.

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (with slight changes)
2005-02-16 12:39:32 +00:00
Stefan Farfeleder
78e3eed071 Fix most cases where the address of an int is passed to a function expecting a
socklen_t * argument.
2005-02-14 17:42:58 +00:00
Ruslan Ermilov
36a142c455 Expand contractions. 2005-02-13 23:45:54 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Xin LI
41fe9ea15f New order after _netcat has been changed to _nc: sort the list.
Submitted by:	ru
Pointy hat to:	me
2005-02-13 13:42:20 +00:00
Hartmut Brandt
0d63385639 Back out the previous commit. There is an obvious bug in it.
Pointy hat to:	harti
2005-02-13 13:33:56 +00:00
Xin LI
a1635c6837 Spell the variable as underscore plus their possible value, to follow
the style nearby.

Submitted by:	ru
2005-02-13 10:11:21 +00:00
Xin LI
4457bf036b Forgotten to commit this file during the last commit. Connect nc(1)
to build.
2005-02-13 07:12:23 +00:00
Hartmut Brandt
157e401636 Stylistic fixes: push variable into a local context (this part is going
to be split out into a function soon). Also there is no need to write
back the colon that we have NUL-ed - the string is going to be freed
anyway.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-11 17:03:18 +00:00
Hartmut Brandt
40fe2aa311 Convert several instances of negative logic to positive logic.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-11 10:49:01 +00:00
Hartmut Brandt
26478079f7 Buffers are already NUL-terminated so there is no need to explicitely add
a NULL.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 17:01:46 +00:00
Hartmut Brandt
ed293d7304 Mostly stylistic nits in preparation for splitting up Var_Parse:
use a more consistent style with regard to *str and str[0];
simplify code by introducing a temporary variable;
shift a break around and add braces where appropriate.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 17:00:16 +00:00
Ruslan Ermilov
48baa77217 Fixed usage(). 2005-02-10 16:07:23 +00:00
Ruslan Ermilov
b7a311f2b8 Require at least one argument. 2005-02-10 16:04:22 +00:00
Hartmut Brandt
42e4f1252b Let the buffer just use the default size by specifying 0 as the size
instead of specifying the default size explicitely.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:53:29 +00:00
Hartmut Brandt
c738c9b125 Mark the modification of the input string (which should really be const)
with a comment.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:52:14 +00:00
Hartmut Brandt
302288aba2 Style nits:
Move some assignments nearer to where they actually used. Convert a loop
from a for() to a while() to make it clearer and add braces to the long
body of it. Split assignment from variable declaration.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:50:34 +00:00
Hartmut Brandt
d2bda84a20 Describe a pre-condition of Var_Parse().
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:43:22 +00:00
Hartmut Brandt
f804a7b3b1 Remove a comment that's not actual anymore.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:41:22 +00:00
Hartmut Brandt
5cb05d7962 Fix spacing by converting mixes of space and tab to tab. Also add a number
of empty lines in appropriate places.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:39:05 +00:00
Hartmut Brandt
96089951e4 Initialise the status variable. W_SETTERMSIG uses its value.
Submitted by:	stefanf
2005-02-10 14:32:14 +00:00
Hartmut Brandt
51079b278c Lst_Append returns void, so the other case of the ? statement
should also be void.

Submitted by:	stefanf
2005-02-10 14:25:12 +00:00
Alfred Perlstein
ed5769e305 back out 1.7 changes, unneeded and possibly wrong. 2005-02-10 10:44:29 +00:00
Stefan Farfeleder
5bcb8532a8 Turn K&R functions into prototypes. 2005-02-10 09:13:20 +00:00
Stefan Farfeleder
4f83fd1962 Let the generated code include <string.h> instead of <memory.h>. 2005-02-10 08:12:38 +00:00
Hartmut Brandt
2890fef88d Use defines for character constants for open and closing braces and
parantheses. This helps editors to find its way through the horrible
mess of Var_Parse. Rewrite a for() loop into a while() to make it clearer.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-09 18:44:09 +00:00
Ruslan Ermilov
6b806d21d1 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
Hartmut Brandt
83307acd08 While working on constification temporarily disable -Werror. Things are too
twisted.
2005-02-09 13:22:02 +00:00
Hartmut Brandt
f2b48f62c6 Untangle VarFind and, while rewriting most of the function, fix the
intendation. (A large part of the function was already at intendation 8).
2005-02-09 13:13:59 +00:00
Hartmut Brandt
3f18a493f4 Introduce VarCreate and VarDestroy functions and used them where
appropriate.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-09 09:53:28 +00:00
Stefan Farfeleder
a3eb24c68b Include missing headers. 2005-02-09 09:13:36 +00:00
Stefan Farfeleder
a4a3daa6f1 Avoid usage of implicit int. 2005-02-07 21:42:16 +00:00
Stefan Farfeleder
86601b3a10 Include <stdlib.h> for exit(). 2005-02-07 21:41:26 +00:00
Stefan Farfeleder
65cc372082 Add a prototype for localupdate(). 2005-02-07 21:40:24 +00:00
Hartmut Brandt
76749b8672 Remove an unneeded check. 2005-02-07 16:33:57 +00:00
Hartmut Brandt
9be6b372de Introduce a typedef for variable value modifation functions and use it
where appropriate.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-07 16:27:19 +00:00
Hartmut Brandt
b3c3341784 Make the intention of a loop clearer.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-07 15:51:51 +00:00
Hartmut Brandt
46ca434737 Introduce Buf_StripNewLines() and use it where appropriate.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-07 11:27:47 +00:00
Ruslan Ermilov
81a6a1f904 Fix bugs in the previous commit. 2005-02-07 08:44:34 +00:00
Hartmut Brandt
ae9eed1281 Invent a Buf_AppendRange function that appends a non-NUL-terminated string
given by a pointer to the start of the string and a pointer one behind
the end.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-07 07:54:23 +00:00
Hartmut Brandt
d01d6678ad Invent a Buf_Append function to append a NUL-terminated string
and use it thoughout the code.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-07 07:49:16 +00:00
Xin LI
fd449ffe29 Revamp several Makefile nits:
- .PATH: is spelled ``.PATH: ''
	- Don't forget to use DPADD so ``make checkdpadd'' is
	  not broken.
	- LDADD should not come with + as it's empty in the
	  first place

Suggested by:	ru
2005-02-07 05:45:38 +00:00
Xin LI
04def62430 Finish the import of nc(1) from OpenBSD. This includes:
- Bring IPsec support from the ports collection [1].
	- Bring -o ("once only") option from the ports
	  collection [2].
	- Adopt the Makefile framework into
	  usr.bin/nc/Makefile.
	- Add a knob to control whether to build nc(1),
	  NO_NETCAT.
	- Bump __FreeBSD_version so ports collection can
	  detect this change.

Original patchset are contributed to the ports collection by:
[1] nectar, [2] joerg.

Note: WARNS?=6 patchset spined off in this commit, in order not
to take too many files off the vendor branch.
2005-02-06 14:44:27 +00:00
Hartmut Brandt
2e0af0312e Where the returned line length from Buf_GetAll is not used just pass
a NULL to the function. Delete the now unused local variables.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 16:53:35 +00:00
Hartmut Brandt
f4dd241033 Rewrite of the buf code:
- convert Buf_AddByte from a macro to a function
- move #define's into the header file
- remove unused field in struct Buffer
- remove size fields - they can be easily computed
- inline Buf_OvAddByte

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 16:48:35 +00:00
Xin LI
76628ce773 Save last displayed file by having the "last" pointer global and save it
during we show the first file's tail.  Instead of:

	tarsier% tail -f 1 2
	==> 1 <==
	foo
	bar

	==> 2 <==
	bar
	foo

	==> 2 <==
	bar2
	foo2

Now with this change, we have:

	tarsier% tail -f 1 2
	==> 1 <==
	foo
	bar

	==> 2 <==
	bar
	foo
	bar2
	foo2

While I'm there, move a comment to where it should belong to.  Also,
const'ify the "last" static because we will never need to change the
contents it points to.

MFC After:	1 week
2005-02-04 14:01:06 +00:00
Hartmut Brandt
b8900c134b None of the users of Buf_Discard used it to get rid of only a part of
the buffer. So replace Buf_Discard by Buf_Clear which just gets rid
of the entire contents.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 13:34:16 +00:00
Hartmut Brandt
8e1c246001 Inline the ADDWORD() macro in the two places where it is used. It just
obfuscates the code.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 13:29:50 +00:00
Hartmut Brandt
c8bd426d66 Use _exit() instead of exit() when the exec() after a vfork() fails.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 13:26:37 +00:00
Hartmut Brandt
8ffb687e64 Move PrintAddr() from util.c into suff.c - the only file where it is
actuall used, and make it static.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 13:23:39 +00:00
Hartmut Brandt
ce8c7083f4 General whitespace cleanup: remove mixes of tabs and spaces, remove
space after function names, remove spaces on emtpy lines.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 12:38:57 +00:00
Hartmut Brandt
435916b011 Minor cleanup: make brk_string to return argc only if the pointer to it
was non-NULL. This let's us eliminated an otherwise unused variable.

shellneeded can never return -1 so there is no need to check for it and
hence no need for a variable to hold the returned value.

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (partly)
2005-02-04 12:30:54 +00:00
Hartmut Brandt
acd5b69dd1 Further constification. Use a temporary hack (copying the input string)
until Var_Subst is fixed.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 12:10:20 +00:00
Ceri Davies
fa5c581ccf Quote example file names consistently, and fix a small grammatical nit. 2005-02-04 11:37:49 +00:00
Hartmut Brandt
8cfa18d178 Use an extra variable to assign to instead of missusing an input
parameter. This will help in constification.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 08:31:42 +00:00
Hartmut Brandt
fec9b45897 Replace space, tab mixes by tabs.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 08:15:11 +00:00
Hartmut Brandt
f6dc7bd983 Use tabs to move to the comments instead of wild mixes of tabs and spaces.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 08:11:58 +00:00
Hartmut Brandt
a9fe0a1150 Style: line up with tabulators. 2005-02-04 08:03:55 +00:00
Hartmut Brandt
141d5e9f62 Use a typedef for the conditional handler function so that declaring
pointers to these functions is easier.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 08:02:41 +00:00
Hartmut Brandt
7a551242f8 Style: remove a space between a function name and the opening
paranthesis.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 07:56:40 +00:00
Hartmut Brandt
e23bc3a201 Some more easy constification.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-04 07:51:00 +00:00
Giorgos Keramidas
d8aa7ce5ca Clarify a bit the BUGS section.
PR:		docs/77024
Submitted by:	Adrian Filipi <adrian@ubergeeks.com>
Reviewed by:	ru
2005-02-03 21:16:23 +00:00
Hartmut Brandt
b26f9f6376 Constify an argument to a function.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-03 11:51:25 +00:00
Hartmut Brandt
9ba5835fba Get rid of a number of unneccessary memory allocations.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-03 11:36:19 +00:00
Alfred Perlstein
7fe4c24002 Modify rpcgen -t output to something that's a lot more useful in
today's modern "no sir, not today" compilers.

Basically, when building the table:

 use NULL instead of 0,
 use braces around array initializers,
 case the function pointers to xdrproc_t,
 don't cast function pointers that do not need casting.

MFC After: 1 week
2005-02-02 22:14:10 +00:00
Hartmut Brandt
b09fe25c80 Make enomem static - it's referenced only in util.c.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-02 11:25:05 +00:00
Hartmut Brandt
6f8d22e416 Remove a couple of unused buffer functions.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-02 11:21:26 +00:00
Hartmut Brandt
ab9e1eb050 Convert several typedefs from beeing pointers to structs to be the structs
itself. This will ease constification (think of what 'const Ptr foo'
means if Ptr is a pointer to a struct).

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-02 07:36:18 +00:00
Alexey Zelkin
3559895440 Avoid unconditional increasing of variable leading to SIGSEGV, if req'd
parameter for -lang is missing.
2005-02-01 16:01:55 +00:00
Hartmut Brandt
44ad9c662f Move all the remaining list functions into one C-file and remove
double documentation comments. Remove the 3rd clause (from 4) of the
BSD license because these files have only the UCB copyright.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-01 15:28:41 +00:00
Hartmut Brandt
042037eb6f Remove debugging stuff that crept in in the previous commit. 2005-02-01 11:39:45 +00:00
Hartmut Brandt
7a2029bac2 Clean up include files and file including. Split nonints.h into pieces
that get included just where they are needed. All headers include the
headers that they need to compile (just with an empty .c file). Sort
includes alphabetically where apropriate and fix some duplicate commenting
for struct Job, struct GNode and struct Shell by removing one version and
inlining the comments into the structure declaration (the comments have been
somewhat outdated).

This patch does not contain functional changes (checked with md5).

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-01 10:50:37 +00:00
Poul-Henning Kamp
6b02062275 Add text about jail root directory as well.
Submitted by:	"Mark W. Krentel" <krentel@dreamscape.com>
2005-01-30 08:03:20 +00:00
Poul-Henning Kamp
5dc1f79ed8 Report jail directory if set.
Sanity-check fd_lastfile.

PR:	62699
Patch by:	"Mark W. Krentel" <krentel@dreamscape.com>
2005-01-29 11:38:00 +00:00
Ruslan Ermilov
0479aa4bad Clean up after utilizing FILES. 2005-01-28 17:13:39 +00:00
Ruslan Ermilov
254dd1666e Let bsd.prog.mk set SRCS and MAN to their default values. 2005-01-28 16:08:11 +00:00
George V. Neville-Neil
a9a2bf999b Update kdump manual page with information on the dump format.
Add a table with the different types of operations traced.

Reviewed by:	Ruslan Ermilov
Approved by:	Robert Watson (mentor)
2005-01-28 12:17:33 +00:00
Xin LI
c49d3c9bac Remove unnecessary SRCS= where could be guessed directly by our
bsd.*.mk infrasture.

Obtained from:	ru
2005-01-27 14:52:47 +00:00
Hartmut Brandt
b071ad2dca Fix quoting of the MAKEFLAGS environment variable by only quoting spaces
and tabs. This is still not correct for command line variable values
ending in a backslash because this would require a larger effort.
Document this limitation in the BUGS section of the man page. The
quoting is mostly compatible with that of gmake and smake.

Tested by:	Max Okumoto and Joerg Sonnenberger from DragonFly BSD
Reviewed by:	ru (man page, partly)
2005-01-26 18:19:39 +00:00
Xin LI
39aa7c9d16 Correct some style nits that I have mistakenly submitted as
suggestions which result in the last revision[*]:
	- style(9) and sysexits(3) suggests that we use EX_*
	  as exit values, instead of some other values like
	  those returned from a system call as errno.

Additionally, follow Ruslan's suggestion about style(9) and
other style improvements:
	- Since open(2) says that it returns -1 on errors,
	  explicitly determine whether it is returning -1
	  rather than whether the return value is less than
	  zero.
	- Only set rval when there is no previous error.
	  This distinguishes the first error that occours.
	- Use exit() in favor of return in main(), this is
	  suggested in old style(9), while the evolve has
	  fade the suggestion.
	- Add some NOTREACHED comments.
	- Add blank line after first { because no local variables
	  in usage()

Thanks to Ruslan for his tireless explaining of the code standards
and knowledge of the history of style(9).

[*] Pointy hat to:	me

Submitted by:	ru (with some minor changes)
Discussed with:	ru, ssouhlal
2005-01-26 15:17:25 +00:00
Suleiman Souhlal
87d8e3c2bb Document the recent fsync(1) changes.
Requested by:	delphij
Reviewed by:	simon, ru
Approved by:	grehan (mentor)
2005-01-26 06:42:45 +00:00
Suleiman Souhlal
379b60989a In case of error, return errno, instead of 1.
Suggested by:	delphij
Reviewed by:	delphij
Approved by:	grehan (mentor)
2005-01-26 06:39:20 +00:00
Tim J. Robbins
d99e92769c Document input line length limit. 2005-01-25 22:32:48 +00:00
Tim J. Robbins
a7a223c342 Document message length limit. 2005-01-25 22:24:04 +00:00
Suleiman Souhlal
e80dde60e3 - Make WARNS?= 6 clean
- Add WARNS?= 6

Approved by:	stefanf, grehan (mentor)
2005-01-25 14:34:57 +00:00
Suleiman Souhlal
4dd5ff1fce - Remove useless includes
- Add WARNS?= 6 to Makefile

Submitted by:	Liam J. Foy <liamfoy@gmail.com>
Approved by:	grehan (mentor)
2005-01-25 14:22:20 +00:00
Suleiman Souhlal
e5faa1a423 - Continue, in case of error.
- Add WARNS?= 6

Submitted by:	Liam J. Foy <liamfoy@gmail.com>
Approved by:	stefanf, grehan (mentor)
2005-01-25 14:12:01 +00:00
Suleiman Souhlal
46c2bd6103 - Make find(1) WARNS?= 6 clean
- Bump to WARNS?= 6

Approved by:	stefanf, grehan (mentor)
2005-01-25 14:07:25 +00:00
Juli Mallett
e2816c1489 Take a swing at using roundup(). 2005-01-25 01:35:02 +00:00
Philippe Charnier
8a579692b2 spell "file system" correctly
Approved by:	ru
2005-01-24 20:06:16 +00:00
Xin LI
7f1a765333 According to style.Makefile(5):
WARNS?= should appear before CFLAGS

Reviewed by:	ru
2005-01-23 12:29:46 +00:00
Xin LI
980b4f7474 Make sure that we don't define INET6 when NO_INET6 is defined.
Without this change, when running netstat with a kernel without
INET6 built in, you will get a complain at the end of "netstat -s"
output.

X-MFC:		NO_INET6 was called "NOINET6" on RELENG_5
2005-01-22 19:35:48 +00:00
Ruslan Ermilov
75f7ea160c Removed remnants of Kerberos support. 2005-01-21 11:22:34 +00:00
Ruslan Ermilov
02a8121a17 Removed Kerberos remnants. 2005-01-21 11:09:40 +00:00
Ruslan Ermilov
3ac17feb8a Fixed xref. 2005-01-21 10:48:35 +00:00
Ruslan Ermilov
324cfdb7e8 Use the standard section name. 2005-01-18 20:54:50 +00:00
Ruslan Ermilov
6c7216df78 Sort sections. 2005-01-18 13:43:56 +00:00
Robert Watson
c8fbd1ec9b If su(1) is run without an effective uid of 0, generate an error to
the user indicating that su is not running setuid, which may help
suggest to the user that it should be setuid, or should not be
running from a file system mounted nosuid.

Suggsted by:	Ivan Voras <ivoras at fer dot hr>
MFC after:	2 weeks
2005-01-17 19:57:59 +00:00
Xin LI
617efa7ad5 Cleanup:
- Change signedness of nxtfld() to make msgs(1) WARNS=6 clean
 - Add several static's
2005-01-17 17:45:38 +00:00
Xin LI
a074c8897c Bump WARNS=6 by adding const constraint and initialize the pointer
to NULL at start.
2005-01-17 13:47:05 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Ruslan Ermilov
6a5796e734 Eliminate macro calls inside literal displays. 2005-01-15 12:28:01 +00:00
Ruslan Ermilov
6bf2021116 Markup nit. 2005-01-15 11:20:51 +00:00
Stefan Farfeleder
b2bbe750a9 Fix off-by-one error. 2005-01-14 09:21:54 +00:00
Brian Somers
9e777bc6e2 Don't reprint file names unnecessarily.
PR:		75028
Submitted by:	mteterin at 250-217 dot customer dot cloud9 dot net
MFC after:	7 days
2005-01-12 04:06:31 +00:00
Suleiman Souhlal
7a13f01f6f Get the vnode from file.f_vnode instead of file.f_data.
Nowadays, f_data points to the vnode only if the underlying filesystem
doesn't use it for other purposes (devfs uses it to store the cdev,
for example).

Found by:	csjp
Reviewed by:	csjp
Approved by:	phk, wes, grehan (mentor)
MFC after:	1 week
2005-01-11 18:52:12 +00:00
Ruslan Ermilov
4438d91ea2 Scheduled mdoc(7) sweep. 2005-01-11 10:32:52 +00:00
Ruslan Ermilov
3baccdb9fd Formatting fixes.
(This exposes a bug in mdoc(7) for which a patch has been sent upstream.)
2005-01-11 10:32:29 +00:00
David Malone
06256619a5 Bump WARNS to 4 as this seems OK on the alpha now. 2005-01-10 20:22:37 +00:00
David Malone
d0990ea900 Cast size_t to off_t before adding them to avoid warnings on the alpha.
Use %ld and intmax_t for printing an off_t.
2005-01-10 20:19:46 +00:00
David Malone
a2fb00d93f Some variables became unused or global in the last change to this
file. Remove the now redundant declarations.

Add declarations for the new show and set_events functions and make
them static.
2005-01-10 20:16:08 +00:00
Pawel Jakub Dawidek
dc347bc474 Use 64bit 'fts_bignum' field instead of 32bit (on 32bit archs) field
'fts_number' to remember number of blocks.
This makes du(1) 64bit-clean.

This work is part of the BigDisk project:

	http://www.FreeBSD.org/projects/bigdisk/

Discussed on:	arch@
MFC after:	5 days
2005-01-07 00:12:24 +00:00
Olivier Houchard
e4bac6b864 Fix a typo in comment.
Reviewed by:	mux (mentor)
2005-01-05 11:52:40 +00:00
Robert Watson
f6a9459c8d evise use of queue(9) macros for netipx when used from userspace:
LIST_FOREACH() is difficult to use correctly, so don't try to.
2005-01-02 19:26:06 +00:00
Ceri Davies
9a706e4158 Add a newline at the end of the file to silence warnings.
PR:		conf/75347
Submitted by:	Gareth Redman <gredman at hyper dot net dot nz>
MFC after:	1 day
2005-01-01 18:58:28 +00:00
Robert Watson
84989ba75d Apply a simplifying patch submitted by rik to the IPX support in
netstat(1):

- Make previously unnecessarily global variables local.
- Use LIST_FOREACH() in preference to manual iteration.
- Restore a sanity check through slightly incestuous use of queue macro
  knowledge.

Submitted by:	rik
2004-12-31 12:04:21 +00:00
Robert Watson
fff3e23824 Update netstat(1) for recent conversion of netipx to queue(9) from
home-brew linked lists.  Read in the ipxpcb_list structure first in
order to find the first pcb pointer.  Then follow the chain as
before, only the termination condition is a NULL next pointer
rather than a next pointer equal to the original offset.
2004-12-31 00:32:50 +00:00
Andrey A. Chernov
d56162c180 NO_NIS cleanup: LINKS and MLINKS 2004-12-29 08:16:39 +00:00
Andrey A. Chernov
aee042045b More NO_NIS cleanup: LINKS and MLINKS 2004-12-29 08:13:20 +00:00
Ruslan Ermilov
dffc5d9a8e Update for FILE v4.12. 2004-12-28 12:29:06 +00:00
Ruslan Ermilov
8e0675e010 Update for FILE v4.12. 2004-12-28 12:17:56 +00:00
David E. O'Brien
efd3a489a7 Catch up with file 4.12 import. 2004-12-28 04:35:01 +00:00
Josef El-Rayes
806abfccac Remove warnings and make wc WARNS=6 clean.
Add FreeBSD Id to Makefile.

Approved by:	ssouhlal
2004-12-27 22:27:56 +00:00
Ruslan Ermilov
7f36b97c54 Look into machine-specific manpage subdirectories too.
PR:		bin/72243
MFC after:	3 weeks
2004-12-22 16:04:58 +00:00
Ruslan Ermilov
482c89954d Fixed the only warning and mark as WARNS=6 clean. 2004-12-22 15:25:51 +00:00
Ruslan Ermilov
0ab4b27257 - Fixed handling of manpage subdirectories:
catman /usr/share/man/man8
  cd /usr/share/man; catman man8

- Don't print false warnings about invalid cat pages which are
  machine-specific cat page subdirectories (visible with -v).

- Fixed one memory leak.
2004-12-22 15:24:48 +00:00
Tim Kientzle
225ac9a3dd Add a fallback version of fnmatch() to the bsdtar
source code.  Include configure logic to pick up the
system one when it exists and use the fallback version
when it doesn't exist.  Set the default for FreeBSD
to use the system version.

With this, bsdtar should now be quite portable.
2004-12-22 06:08:04 +00:00
Tim Kientzle
4d7142130b GC an unused #include 2004-12-22 05:54:10 +00:00
Tim Kientzle
882aa4c9cd Fix -W long option handling.
In particular:
  -W excl=text
fails because "excl" is a prefix of both "exclude" and "exclude-from".  But,
  -W exclude=text
is okay because it matches "exclude" exactly.

Thanks to: Jose F Nieves
MFC after: 7 days
2004-12-22 03:38:28 +00:00
Tim Kientzle
e69591ddc3 Portability: the included fts.c should now
compile on many non-FreeBSD systems, including
Linux, Solaris, Darwin, etc.

Thanks to: many people who pointed out the same portability problem
2004-12-22 00:21:28 +00:00
Ruslan Ermilov
a216173556 NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
Ruslan Ermilov
83c7ade90a NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
Ruslan Ermilov
ab7a294721 NODOCCOMPRESS -> NO_DOCCOMPRESS
NOINFO -> NO_INFO
NOINFOCOMPRESS -> NO_INFOCOMPRESS
NOLINT -> NO_LINT
NOPIC -> NO_PIC
NOPROFILE -> NO_PROFILE
2004-12-21 09:33:47 +00:00
Ruslan Ermilov
07736e20e9 NOATM -> NO_ATM 2004-12-21 09:08:06 +00:00
Ruslan Ermilov
e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Hartmut Brandt
5dd8ec0fd1 Fix compilation for the USE_KQUEUE case.
Submitted by:	Emil Mikulic <emikulic@dmr.ath.cx>
2004-12-20 10:21:27 +00:00
Hartmut Brandt
0512b0a6c7 maxJobs is declared extern in job.h so it cannot be static in job.c.
PR:		bin/75210
Submitted by:	Andreas Jochens; Robert Millan <rmh@debian.org>
2004-12-20 10:14:05 +00:00
Ruslan Ermilov
a8b18d10fb Sort by month/day/year/login. 2004-12-20 10:09:06 +00:00
Mark Santcroos
2e03d4887d Add myself. 2004-12-19 22:21:41 +00:00
Colin Percival
0993d1af06 Use the accepted abbreviation "kB" for kilobyte, rather than "kb" (which
is the common unit for a kilobit).
2004-12-19 13:29:25 +00:00
Christian Brueffer
4b2c187db5 Specify the state of my birth, similar to other entries. 2004-12-18 00:58:22 +00:00
Hartmut Brandt
674a77f864 Remove all the cleanup functions. There is no reason to free memory
just before exiting (especially given the number of memory leaks) -
it just costs time.
2004-12-17 13:20:19 +00:00
Ruslan Ermilov
025bfb24c4 Fix a long-standing bug when make(1) is passed the -V and
-f options in MAKEFLAGS environment variable, and some of
these options are also specified on the command line.

Thanks to:	marcel
Reviewed by:	harti
2004-12-16 19:46:50 +00:00
Hartmut Brandt
1d614caea7 Instead of dynamically allocating list heads allocated them statically
now that their size is only two pointers. This eliminates a lot of calls
to Lst_Init and from there to malloc together with many calls to
Lst_Destroy (in places where the list is obviously empty). This also
reduces the chance to leave a list uninitilized so we can remove more
NULL pointer checks and probably eliminates a couple of memory leaks.
2004-12-16 16:14:16 +00:00
Greg Lehey
f2d336274b Correct the event of 17 December 1770: Ludwig van Beethoven was
christened.  We don't know whether he was born on the same or the
previous day.

From: Die Musik in Gecshichte und Gegenwart (Bärenreiter, Kassel,
      1989), 1:1509
2004-12-16 00:29:35 +00:00
Greg Lehey
d96795a5db Correct the dates and locations relating to Ludwig van Beethoven's
birth:

1.  Remove anachronistic "Germany".  Depending on your viewpoint, he
    was born in the Rheinland or Prussia.
2.  Remove reference to his date of birth.  It's not known, though
    it's possible it was 16t or 17 December.
3.  Get the date of his christening right.
2004-12-16 00:26:53 +00:00
Suleiman Souhlal
f6bbd7a8e9 If ferror is true, we must reset the error indicator.
Submitted by:	Liam J. Foy <liamfoy@sepulcrum.org>
Approved by:	grehan (mentor)
2004-12-15 06:24:57 +00:00
Niels Heinen
8a7a5b487d Add myself to the committers' birthday calendar
Approved by nectar (mentor)
2004-12-13 12:22:28 +00:00
Ceri Davies
8693799f41 Bump document date before ru gets me. 2004-12-11 13:14:54 +00:00
Ceri Davies
876b0a88dd Add a -k flag for querying whois.krnic.net (the National Internet
Development Agency of Korea) which hold details of IP address
allocations within Korea.

Approved by:	bms
2004-12-11 13:14:07 +00:00
Hartmut Brandt
54bb820a75 Remove a list that was just used to free all variables just before exiting. 2004-12-10 11:58:34 +00:00
Hartmut Brandt
fadeed7fb8 Remove a list that used to hold all the GNodes just to be able
to free them just before exiting.
2004-12-10 10:32:10 +00:00
Hartmut Brandt
16fa982c70 Remove a useless list where just all command lines are stuffed onto, never
used and just freed at the end. The idea might have been to be able
to free all the strings, but what's the point to free just before exiting?
2004-12-10 10:13:40 +00:00
Hartmut Brandt
3cfcafb49a Nobody actually checked the return codes from Lst_Append and Lst_Insert
so don't return anything.
2004-12-09 15:31:32 +00:00
Hartmut Brandt
0354c3e056 If a path element directory was never opened it is not on the list of
open directories so there is no need to remove it from there. This fixes
a core dump introduced by removing the run-time check from Lst_Remove.
2004-12-09 10:00:55 +00:00
Hartmut Brandt
4ec22b1196 Now that circular lists are gone remove stuff for them. Simplify
somewhat so that we can remove a local variable.
2004-12-08 17:48:15 +00:00
Hartmut Brandt
c81703e6a4 No caller checks the return code from Lst_Remove, so don't return one.
Simplify the algorithm now that circular lists are gone.
2004-12-08 17:43:43 +00:00
Hartmut Brandt
74c71bfc19 Don't check the return code from Lst_Remove. There is no way
that the list's first element is not on the list.
2004-12-08 16:50:14 +00:00
Hartmut Brandt
2e022816d8 Remove return value from Lst_Concat. None of the callers ever checked
it. Remove stuff that was needed for circular lists.
2004-12-08 16:47:19 +00:00
Hartmut Brandt
3220c0368c Don't free the second list in Lst_Concat for LST_CONCLINK; free it
in the caller instead.
2004-12-08 16:28:53 +00:00
Hartmut Brandt
c76d7d5047 Get rid of the sequential access feature of the lists. This was used
only in a couple of places and all of them except for one were easily
converted to use Lst_First/Lst_Succ. The one place is compatibility
mode in job.c where the it was used to advance to the next command on
each invocation of JobStart. For this case add a pointer to the node to
hold the currently executed command.
2004-12-08 16:22:01 +00:00
Hartmut Brandt
db7ce92a3c Constify the arguments to the list compare function. This temporarily
requires to make a copy of the filename in ReadMakefile and to duplicate
two small functions in suff.c. This hopefully will go away when everything
is constified.

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (partly)
2004-12-08 12:59:27 +00:00
Hartmut Brandt
5d7406afd3 Constify some calls of Buf_AddBytes.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2004-12-08 08:18:13 +00:00
Hartmut Brandt
cb93e26c8a Consify the arguments to str_concat. Remove the STR_DOFREE flag for that
purpose and explicitely free the input string in the one place that was
calling str_concat with that flag.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2004-12-08 08:11:59 +00:00
Hartmut Brandt
bf1ead0608 Typedefs of pointers to structs are evil. Make Lst and LstNode typedef of
the structs itself not of pointers to them. This will simplify constification.

Checked by: diff on the object files
2004-12-07 13:49:13 +00:00
Hartmut Brandt
b82f920f8e Constification of arguments passed to functions; no change on the
resulting executable.

Checked by:	diff on original and new objects

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2004-12-07 12:23:45 +00:00
Hartmut Brandt
644a6874f9 Make needs no circular lists so remove them from the list code. 2004-12-07 10:14:16 +00:00
Alexander Nedotsukov
59dd44d303 Fix -t option processing.
Partially initialized tm structure was passed into mktime(3).

Approved by:	ru
2004-12-06 15:38:24 +00:00
Hartmut Brandt
a82682c493 Some constification which doesn't require code rewrites. 2004-12-06 15:20:12 +00:00
Hartmut Brandt
595e513a56 Style: fix indentation. 2004-12-06 11:30:36 +00:00
Ruslan Ermilov
4b2a3d41da Unbreak sockstat(1) on systems without the divert protocol. 2004-12-06 09:28:05 +00:00
Hartmut Brandt
f2b0d1538d Remove an unused macro. 2004-12-06 08:57:41 +00:00
Hartmut Brandt
45f507983f Constify arguments to Hash_FindEntry and Hash_CreateEntry. 2004-12-06 08:56:30 +00:00
Hartmut Brandt
997206eed2 Remove extra empty lines. 2004-12-06 08:52:02 +00:00
Hartmut Brandt
491fb056d3 Style: fix indentation, prototypes for functions even in comment. 2004-12-06 08:51:34 +00:00
Ruslan Ermilov
2cfbdf89b7 Show divert(4) sockets as well. 2004-12-05 14:17:14 +00:00
Hartmut Brandt
e97977d265 Remove an extra space.
Submitted by:	ru
2004-12-03 13:03:16 +00:00
Hartmut Brandt
a8b951bb30 Fix breakage introduced on 64-bit platforms with my last commit. Need
to change to size_t in a couple of other places too.
2004-12-03 12:55:57 +00:00
Hartmut Brandt
db397f6ffe Plug a memory leak. 2004-12-03 12:07:03 +00:00
Hartmut Brandt
2d3d282892 Put macro arguments in paranthesis.
Submitted by:	johan
2004-12-03 12:02:14 +00:00
Hartmut Brandt
b6899024a6 Make sizes to be of type size_t and correct function arguments that
should be Byte (as the numerous casts to Byte in the function calls show).
2004-12-03 11:59:30 +00:00
Hartmut Brandt
002c565593 Style: fix indentation, protect macro with do { } while (0).
Checked with: diff on object file.
2004-12-03 08:43:07 +00:00
Hartmut Brandt
b52c5e95b6 Describe the .SHELL target.
Reviewed by:	ru
2004-12-03 08:03:11 +00:00
Hartmut Brandt
421cdafee3 Change the algorithm that matches the builtin shells from the name keyword
of the .SHELL target. Formerly it used to select the shell with the
longest common trailing substring, so that bash would select sh, but pocsh
would select csh. Now an exact match is required so that specifying bash
without also giving a path and the other keywords will give an error.

PR:
Submitted by:
Reviewed by:	ru
Approved by:
Obtained from:
MFC after:
2004-12-03 08:02:52 +00:00
Jean-Sébastien Pédron
df12ac4fe8 Add myself to the committers' birthday calendar
Reviewed by:	mux
2004-12-03 01:41:55 +00:00
Hartmut Brandt
743cf01795 Remove a double test for the same ptr != NULL and use the official
macro for this; reorder an if.
2004-12-01 17:44:04 +00:00
Hartmut Brandt
d21474cec4 Style: remove a lot of unnecessary casts, add some and spell the null
pointer constant as NULL.

Checked by: diff -r on the object files before and after
2004-12-01 10:29:20 +00:00
Hartmut Brandt
e6417f6fe2 Stylification: missing spaces, extra space after function names, casts
and the sizeof operator, missing empty lines, void casts, extra empty lines.

Checked by: diff on make *.o lst.lib/*.o

Submitted by:	Max Okumoto <okumoto@soe.ucsd.edu> (partly)
2004-11-30 17:46:29 +00:00
Garrett Wollman
f14eed08c0 Use ?= with WARNS.
Requested by: ru
2004-11-30 16:41:40 +00:00
Hartmut Brandt
17446c050c Constify the array of predefined shells. It turns out that we need two
versions of the structure definition for this: one with const char
pointers, because otherwise gcc won't let us initialize the fields with
constant strings, and one without the const, because we need to work
with the structure.
2004-11-30 15:35:51 +00:00
Hartmut Brandt
e35e595f1d Change a couple of the primitve list functions to be macros. This changes
the semantic of Lst_Datum which formerly returned NULL when the argument
node was NULL. There was only one place in the source that relied on this
so change that place.
2004-11-30 10:35:04 +00:00
Hartmut Brandt
617a8c57ad Fix a bug that would truncate the full name of an archive member if
the length of happens to be larger than MAXPATHLEN.

PR:		bin/74368
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
Obtained from:	DragonFlyBSD
2004-11-29 16:23:34 +00:00
Hartmut Brandt
1734fd27b4 Use typedefs for the types of the functions that are passed as arguments
to the list functions for better readability.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2004-11-29 12:17:13 +00:00
Hartmut Brandt
6a72a34d01 Merge the contents of lstInt.h into the public lst.h. This let's us get
rid of a lot of uneccesary casts and temporary variables that have just
obfuscated the code. This also let's us implement a couple of the one-
liner list functions as macros (the first one is Lst_IsEmpty) and
simplify life once we start to throw consts on the code.
2004-11-29 08:38:16 +00:00
David Schultz
6004362e66 Don't include sys/user.h merely for its side-effect of recursively
including other headers.
2004-11-27 06:51:39 +00:00
David Schultz
c5ac569a4b Remove a.out support from gcore(1). 2004-11-27 06:46:48 +00:00
Hartmut Brandt
29b139f2bc Remove unused file. 2004-11-26 15:42:08 +00:00
Hartmut Brandt
3514b3b581 Style: prototypes, un-register and remove some empty lines. 2004-11-26 12:17:23 +00:00
Hartmut Brandt
ad67400c29 Include sys/sysctl.h on all architectures not only i386. 2004-11-25 12:50:16 +00:00
Hartmut Brandt
21d15001f9 Fix a very long-standing error in handling .SHELL targets: this target
uses the brk_string function to parse the line. That function uses static
storage for both the expanded string and the returned argv[] vector.
The JobParseShell function simply stored away pointers into this static
storage. On the next use of something like ${FOO:O} this storage would
get overwritten with fatal results.

This also allows us to make the shells[] array const bringing us one step
further in making make WARNS=4 ready.
2004-11-25 10:01:26 +00:00
Juli Mallett
fb339f7a6d Gentle code cleanup for the maximum make(1) level foo. This moves it to a
function, and moves the related defines out of the middle of code body.

Submitted by:	Max Okumoto less-than okumoto at ucsd dot edu greater-than
2004-11-24 22:03:45 +00:00
Garrett Wollman
0c4cafead9 Add a `-m month' flag to provide a more convenient interface for
displaying a calendar for a specific month of the current year than
`cal $(date +"%Y") month'.  A few minor code cleanups.  Set WARNS=1.
(This code is WARNS=5 clean except for "`O' modifier used with `%B'
strftime format", which is legal in FreeBSD but GCC doesn't know about.)

MFC after:	1 week
2004-11-23 22:57:17 +00:00
Hartmut Brandt
d96b4f0130 Get rid of the shell table sentinel. It isn't needed anymore because
JobMatchShell returns NULL when no shell name matches since revision 1.51.
2004-11-22 15:45:57 +00:00
Greg Lehey
b4425fbe38 Print dates the right way round. 2004-11-21 23:05:06 +00:00
David Schultz
6661339b82 gcore(1) apparently still cares about a.out core dumps, so it still
needs to know that a 1-page U area is part of the dump format.

Reviewed by:	arch@
2004-11-20 02:30:02 +00:00
David E. O'Brien
8e6acec2ef Install the header for libmagic.
PR:		73647
Submitted by:	Uranus <uranus@it.muds.net>
2004-11-19 04:04:14 +00:00
Colin Percival
8c355b0889 Fix buffer overflow. This is FreeBSD-SA-04:16.fetch.
Approved by:	des
2004-11-18 12:01:30 +00:00
Hartmut Brandt
33ece31cca Eliminate the define for POSIX and build with Posix behaviour.
Our make has been build with POSIX enabled from the first day
and the ifdef'ed out code served no purpose.
2004-11-17 11:32:46 +00:00
Jordan K. Hubbard
03afb27c83 tr(1) attempts to convert \n[n][n] sequences into octal digits, but doesn't
check to see that a given digit is actually an octal digit.  This leads to
unusual consequences if passed in values like \9.

Reported by:	Joseph Davison (OpenDarwin project)
MFC after:	1 week
2004-11-14 05:15:25 +00:00
Bjoern A. Zeeb
6c58990d47 Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on  no NIS support and related programs will be built.

Lost parts rediscovered by:	Danny Braniss <danny at cs.huji.ac.il>
PR:		bin/68303
No objections:	des, gshapiro, nectar
Reviewed by:	ru
Approved by:	rwatson (mentor)
MFC after:	2 weeks
2004-11-13 20:40:32 +00:00
Ruslan Ermilov
832b0b55ac Removed bitrot. 2004-11-13 17:12:22 +00:00
Poul-Henning Kamp
112807ca28 If -B is specified to get compat mode (as opposed to just not giving
a -j arg which does the same thing), remove the MAKE_JOBS_FIFO
environment variable so we decouple any resulting sub-makes from
the token pool.
2004-11-12 20:37:27 +00:00
Robert Watson
75d6abdb7e third of several commits to allow kernel System V IPC data structures
to be modified and extended without breaking the user space ABI:

Make the "ipcs" tool, which grubs around in kernel memory to report
status relating to System V IPC, use the _kernel variants on the
System V IPC data structures.

Submitted by:	Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, SPAWAR, McAfee Research
2004-11-12 13:33:55 +00:00
Ruslan Ermilov
2f841e1a7b Use a relative symlinking so that "tar" also works in /stand. 2004-11-12 13:28:42 +00:00
Ceri Davies
f4422f46b8 Wrap a comment properly. 2004-11-12 13:14:56 +00:00
Poul-Henning Kamp
1d66b1beec Add code to enforce the paralleism count (-j N) for the entire tree
of submakes spawned during processing.

We create a fifo and stuff one character into it for each job we are
allowed to run.  The name of the fifo is passed to child processes
in the MAKE_JOBS_FIFO environment variable.

A make which finds this variable on startup will open the fifo and
only spawn jobs when it managed to read a token from the fifo.
When the job completes a token is writen back to the fifo.

Slave make processes get one token for free: the one their parent
make got in order to run them.  This makes the make processes
themselves invisible in the process counts.

The net effect is that "make -j 12 -s buildworld" will start at
most 12 jobs at the same time, instead of as previously up to
65 jobs would get started.
2004-11-12 08:58:07 +00:00
Hartmut Brandt
4253bd82b6 Fix a (very) long standing bug in make (this has been there probably
from the beginning). Make used to handle all its interrupt-time stuff
directly from the signal handler, including calls to printf, accessing
global data and so on. This is of course wrong and could provoke a core
dump when interrupting make. Just set a flag in the signal handler and
do everything else from the main thread.

PR:		bin/29103
2004-11-12 07:57:17 +00:00
Poul-Henning Kamp
414fa5e8fc Get rid of more local/remote leftovers 2004-11-11 12:52:16 +00:00
Poul-Henning Kamp
84f3c4931b Get rid of now unused maxLocal variables. 2004-11-11 12:23:39 +00:00
Dag-Erling Smørgrav
be5523e807 This code builds cleanly at WARNS level 6.
MFC after:	1 week
2004-11-08 18:08:16 +00:00
Poul-Henning Kamp
e93bd4ef59 filedesc0 is an internal detail of the kernel, don't look at it. 2004-11-07 20:38:29 +00:00
Tim Kientzle
2a44183a72 FreeBSD does have uintmax_t, so it can correctly
print out very large file sizes.

Thanks to: Yar Tikhiy
2004-11-06 18:38:13 +00:00
Hartmut Brandt
afa99554de Now with the remote job support removed there can be no remote jobs and
no jobs that need to be remigrated. Remove the flags and the associated
code.
2004-11-05 11:41:36 +00:00
Tim J. Robbins
a2222839a5 When the last line of a file is missing a newline in -f mode, pass a
length argument to mbrtowc() that accounts for the terminating newline
character we add automatically. Failing to do this caused the loop to
unexpectedly run out of characters and incorrectly signal an "Illegal byte
sequence" error.
2004-11-05 10:45:23 +00:00
Max Khon
0acb526b67 Check that ee's standard input and output is a terminal.
Do not ignore all the signals in range [1..24].

PR:		65892
MFC after:	2 weeks
2004-11-05 10:18:05 +00:00
Tim Kientzle
f52188fc8a Correct error handling on failed writes
to the archive.
2004-11-05 05:39:37 +00:00
Paul Richards
15a55f7926 Add support for following more than one file i.e.
tail -f file1 file2
2004-11-04 19:18:19 +00:00
Hartmut Brandt
dd1fa6553d Remove the remote stuff from make. This actually never worked in our make
because the necessary files were not imported with the original import.
If somebody really needs it, there is still the devel/pmake port.

This is just the first step and removes just everything that is ifdef'ed out.
Otherwise the code is unchanged.

Checked by:	md5

Approved by:	no objections on arch@
2004-11-04 12:57:41 +00:00
Ruslan Ermilov
dee651eb15 Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar
to PRECIOUSLIB from bsd.lib.mk.  The side effect of this
is making installing the world under jail(8) possible by
using another knob, NOFSCHG.

Reviewed by:	oliver
2004-11-03 18:01:21 +00:00
Paul Richards
f45a52b3c3 Revert a WIP change that shouldn't have been in last commit. 2004-11-03 17:52:29 +00:00
Paul Richards
4bba8e595e Convert to ANSI style function definitions. 2004-11-03 15:23:11 +00:00
Michael Johnson
d177131cf8 Add myself to the calendar
Approved by:	adamw(mentor)
2004-10-30 02:00:00 +00:00
Ruslan Ermilov
be88e5179d Only check if ENABLE_SUID_NEWGRP is defined, for consistency with
other ENABLE_SUID_* variables.
2004-10-24 16:02:38 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00