Commit Graph

9093 Commits

Author SHA1 Message Date
christos 6cbdf318bf - make a variable volatile, that gcc warns vfork will clobber.
- don't blindly walk before the beginning of the buffer because of a
  corrupt dependency file. In this case the first character of the
  dependency file was a :
2006-10-15 18:50:47 +00:00
christos 2bd08fcc54 in the same way that we need an extra level for arrays, do the same for struct. 2006-10-15 18:18:54 +00:00
dsl fb889ecbbd Change a 'while' loop to a 'for' loop so we can add 'free(line)' into the
loop continue part.  Remove the 'free(line)' from teh end of the loop body,
change the gotos into continues and collapse out some 'else if's.
All in the name of code transparency.  No functional changes.
2006-10-15 18:08:14 +00:00
christos 3e006796cf previous fix broke array initializers. 2006-10-15 15:08:20 +00:00
dsl 0195907f3d Output all debug trace output through 'debug_file' defaulting to 'stdout'.
(Almost all the debug output went there, but some went to stderr.)
Split the parsing of -d (debug flags) out into its own routine.
Allow the output filename to be changed by specifying -dF<file> to create
a log file, or -dF+<file> to append to it. <file> may be stdout or stderr.
Also change so that -d-<flags> acts on <flags> locally but doesn't copy
them to MAKEFLAGS so they aren't inherited by child makes.
I'm not 100% happy with the command line syntax for the above, so they are
currently undocumented.
2006-10-15 08:38:21 +00:00
dogcow 37bb4f935a do the #ifndef lint dance for __RCSID; also, include the appropriate
headers if cross-building the program in tools/.
2006-10-15 01:16:31 +00:00
christos e578e35910 Fix c99 initialization issues. Now the regression tests work. 2006-10-14 21:08:50 +00:00
wiz 994a49a16c Comma in enumeration. No dot at end of SEE ALSO. 2006-10-13 21:22:44 +00:00
wiz 4cfcd239a1 Various fixes. 2006-10-13 21:06:01 +00:00
wiz 66402a89e3 Macro improvements. 2006-10-13 20:33:31 +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
elad c136b6cd0d Refactor code a bit so we only use kmem when we really need it. 2006-10-13 16:33:57 +00:00
tacha 7a76839cea All members of PLAN should be initialized. 2006-10-12 08:46:18 +00:00
apb 2eed134b40 De-__P(), remove trailing spaces, sprinkle a few const, WARNS=4. 2006-10-11 19:51:10 +00:00
dsl 505a3bb2b7 There is no need to resize the pollfd array, it can only ever have 2+maxJobs
entries, so allocate at startup.
Use an 'int jobPipe[2]' within the job structure, and create pipes directly
into it.  Common up the code that creates all the pipes - making them all
non-block on the read side in the process.
Call Job_CatchChildren() directly from Job_CatchOutput() so that it only
gets called when a child actually exits.
NB: Something causes a 'pregnant pause' if (for example) you call 'nbmake obj'
in src/tools.  Introduced between netbsd 3 and 4.
2006-10-11 07:01:44 +00:00
reed f9a8db2401 Remove parenthesis from around a sentence.
Refer to vi manpage for option -r.

Mention rc.d start up script for this.

Add rc.conf to SEE ALSO.

Remove sentence about it originally done at boot time.

Fix date - it was added in 1996. And mention that the
script was renamed in 2001.
2006-10-10 03:30:42 +00:00
reed 0b966788bb Also point to new virecover manual page. 2006-10-10 03:27:05 +00:00
apb 4e86f6ddf0 In a non-native build, always use a shell to execute commands. This may
be necessary in a weird cross-build environment.  Previously, if the
command looked simple enough, we would try to exec it directly.

OK sjg, christos
2006-10-09 20:46:33 +00:00
apb cd195008c6 Allow make(1) to be built with something other than "sh" as the
shell.  To use this, build with -D_PATH_DEFSHELLDIR=\"/path/to/dir\"
-D_BASENAME_DEFSHELL=\"shell\".

* Change the order of entries in shells[].  Now DEFSHELL defaults to 0,
  and shells[0] describes the default shell.  This will be "sh" in the
  usual case.

* If _BASENAME_DEFSHELL is defined, insert an additional entry above
  "sh" in the shells[] array, making this new entry shells[0].  The
  new entry is assumed to refer to an sh-compatible shell with a
  non-standard name.  (Tested using _PATH_DEFSHELLDIR="/usr/pkg/bin" and
  _BASENAME_DEFSHELL="bash".)

* In the shells[] entry for "sh", test defined(MAKE_NATIVE) &&
  defined(__NetBSD__) to decide whether we can use the "q" flag.

OK sjg, christos
2006-10-09 20:44:35 +00:00
apb 5e0e754292 Change the order of several items to ensure that
top can work without a termcap "li" capability.
Fixes PR 34717 by der Mouse.
2006-10-09 19:49:51 +00:00
dsl 01a426f62c Rip out the code for the undocumented -P (don't use pipes for command
output) option.  I'm sure it is baggage from the past.
2006-10-09 14:36:41 +00:00
christos be4d21eeca use ecalloc in previous 2006-10-09 14:27:06 +00:00
dsl 4a7a153be0 Rip out the code for not 'USE_PGRP', I can't imagine it being useful!
My guess is that it is compat code for before the pgrp stuff was added.
2006-10-09 13:49:59 +00:00
dsl 9f624ea07b Instead of trying to report all the 'job suspended' and 'job resumed'
messages whan make itself is suspended (ie by ^Z) before make actually
suspends, supress the messages during this sequence.
This means we don't care that they would be output after the suspend
and we can stop attempting to reap child status from withing the signal
handler (which doesn't work for recursive parallel makes).
The code simplification means that we can remove much of the code that
blocked signals - since the signal handlers (expect that for ^C and friends)
now do almost no work.
2006-10-09 13:40:11 +00:00
dsl 861fc6431d Fix core dump caused by non-zerod memory.
From Auster in current_users.
2006-10-09 11:37:31 +00:00
dogcow f6a57672cd Build virecover.0 2006-10-08 21:47:21 +00:00
peter e263dfd62f WFORMAT is no more... 2006-10-08 17:52:28 +00:00
elad 805c3d6901 PR/22228: Jeremy C. Reed: a man page for virecover(8)
Man page added, thanks!
2006-10-08 14:19:17 +00:00
elad 854038392c PR/30819: Peter Postma: src/usr.bin/shlock has no license
Thanks to Matt Fleming for contacting Erik E. Fair and getting his
agreement to put a TNF license on this.
2006-10-07 21:13:00 +00:00
elad 925c6f17f2 PR/29722: Andreas Kling: chpass temporary files in /etc not always unlinked
We had a (long) discussion about this in #NetBSD-code and the consensus was
that /tmp should always be sticky (+t), and as such it is safe to create
the temporary files for chpass(1) in there. We added a check to guarantee
this (and bail out otherwise) and now temporary files are created in /tmp,
not filling up /etc.

Thanks to rivo nurges et al.
2006-10-07 20:09:09 +00:00
elad 1232ea27c4 PR/18906: roskens at elfin dot net: misc. select() to poll() updates.
Adapted to -current by myself, thanks for the patch!
2006-10-07 17:27:57 +00:00
apb bfb3f336ef Document "find ... -exec ... {} +". Also make some other minor updates.
Changes initially supplied by John Hawkinson in PR 20470, but edited by me.

/msg wizd: search for ".sp"
2006-10-07 17:06:28 +00:00
apb b90dcb5d01 Add support for "find ... -exec ... {} +".
The code is from John Hawkinson in PR 20470.  I adapted it to current,
and made some KNF and comment changes.
2006-10-07 17:04:02 +00:00
apb dbe2acacef Add some missing entries in lists, and some serial commas.
Inspired by PR 20470 from John Hawkinson.
2006-10-07 16:34:06 +00:00
elad e3f885bca5 PR/31053: Roland Illig: Enhancement: getconf -a to list all applicable
variables

Thanks for the patch!
2006-10-07 15:20:44 +00:00
tron 1b5edf0b17 Fix broken line continuation, probably caused by editor word wrap. 2006-10-07 13:04:43 +00:00
elad 3bd9466e80 PR/32855: der Mouse: [dM] ftp -q is broken (or misdocumented)
Patch applied, thanks!
2006-10-07 10:49:14 +00:00
elad 2a7d09e7cd PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn't
grok -f, and there's no alternative (+fix)

Patch applied with minor tweak (%y -> %R, as it was already taken) plus
some nits from myself. Thanks!
2006-10-07 10:41:50 +00:00
elad d730e7f066 Add standard TNF license, requested by cube@. 2006-10-07 09:40:03 +00:00
elad fd79a15577 PR/18126: jnilsson at ludd dot luth dot se: add the revoke program
I have commited a different version than in the PR, it lacks a license
but if it warrants one we can stick the TNF standard on it. It's just
a main() routine that calls revoke(2).
2006-10-07 08:48:03 +00:00
elad 89f8748c35 PR/20319: Jeremy C. Reed: calendar reports other months that have matching
days

Patch applied, thanks!
2006-10-07 07:12:01 +00:00
rillig e723f89fb8 When trying to copy many files into another file, provide a useful and
more specific error message instead of the usage().
2006-10-06 20:22:59 +00:00
dsl 342d35797b Instead of trying to check the return value of every fprintf() and fputs()
call - which makes the code completely impossibly to follow, call fflush()
and ferror() just prior to calling fclose().
This has the advantage of actually detecting the any write errors, since
the output is block bufferred and will typically not happen during fprintf()
but only during the fclose() - where it is difficult to report.
I also singlilarly refuse to add (void) casts to every printf call in the
system - since it almost never makes any sense to look at the return value
(unless you want to know how many bytes were actually writtem).
2006-10-04 20:34:48 +00:00
mlelstv 05f80f69b3 avoid signed/unsigned error when computing mask lengths for empty
masks with sa_len == 0 (happens for inet6 default route).
2006-10-03 08:30:12 +00:00
simonb bca6df8e18 Add standard TNF copyright boilerplate. 2006-10-03 08:20:03 +00:00
christos 5c86a088e8 Completion on a line like "." at the command prompt gives you a rather
rude response! (from our anonymous user)
2006-10-02 16:43:31 +00:00
apb 9eda896a8f Use ${HOST_SH}, not just sh, in the shell command to set MAGDIRF. 2006-09-29 20:20:47 +00:00
dsl a178085551 Reap any dead children that we have at startup.
If there are any undead ones set a flag so we don't report the 'Child (pid)
not in table' message when they die - it is impossible to (portably) find
the childrens pids.
This happens when make is run as 'make -f- ... <<EOF' and the shell uses
a child of (what will be) make to write the data into a pipe.
2006-09-29 19:38:48 +00:00
christos f0f6b1cde9 Using (void)&foo; shuts up gcc-4 but does not stop the compiler from clobbering
the variables in the setjmp/longjmp cases. Use volatile instead as we are
supposed to (from our anonymous user).
2006-09-29 14:59:31 +00:00