Commit Graph

9110 Commits

Author SHA1 Message Date
mrg 478347642c avoid assigning a void * to an int just to see if it is non-zero or not.
use %zu to print a size_t.
2006-10-22 08:29:36 +00:00
mrg 1aa136c1a1 mail/head.c: make the previous delta only apply if FMT_PROG is not defined
fmt/Makefile: define FMT_PROG.
2006-10-22 08:22:34 +00:00
dsainty f903859f35 Implement an option to reset all values (rather than attempting to read
them) to allow setting item values on certain pesky devices that otherwise
error out on the GET_REPORT command.

Indicated via the new -z flag.
2006-10-22 06:16:37 +00:00
dsainty 3d56b3bab3 Add support for addressing multiple items with the same name (for buggy
devices).

The syntax and patch were discussed with Lennart about 1.5 years ago :)

Knock the BUG entry out of the man page.
2006-10-22 05:09:14 +00:00
christos 1df0b9ba30 add ~@ 2006-10-22 00:35:29 +00:00
christos 5221554c1a Fix yes/no handling. 2006-10-21 21:51:47 +00:00
christos 8207b28a5c From our anonymous user:
- mime and character set handling
- command line editor and completion
- many code improvements
2006-10-21 21:37:20 +00:00
itohy 3c46d522e6 Remove unneeded \ from awk script.
Fix PR port-sparc64/34863.

This also caused warning on old NetBSD environments (with GNU awk) like
awk: cmd. line:80: warning: escape sequence `\#' treated as plain `#'
2006-10-21 04:48:29 +00:00
he f0947b3081 The symbol to define to 1 if a pointer to an int fits in a long is
INTPTR_IS_LONG, not INTPTR_IS_ULONG -- the latter is unused in
other parts of lint's code.  This stops vax's lint from complaining
about conversion of integer constants to 'unsigned long' in function
argument lists, via a proper define of INT_RSIZE in common/inittyp.c.
sh3 defined this to 0, so was actually not affected, but better to
eradicate the typo there as well.
2006-10-20 12:51:12 +00:00
he e02c317333 Simplify the previous change. There's actually no need to treat constants
specially in ptconv(), the constants will be checked in convert() anyway.
2006-10-18 21:34:39 +00:00
freza 57dc9ea382 Treat multiple
SPECIAL prog {objs,objpaths,keepsymbols} itemX

lines (where "prog" is fixed) in crunchgen configuration the same as

  SPECIAL prog {objs,objpaths,keepsymbols} item1 ... itemN

OK by David Laight
2006-10-18 21:20:44 +00:00
he 4228dd3afb Partly redo when to emit warnings for argument type conversions.
Remove the apparently always true "styp(nt) != SHORT" part of the
innermost test.  Allow atomatic conversion of literals as long as
they fit into the target type.

This should fix some of the lint issues in proplib on some of our
platforms.

Approved by christos.
2006-10-18 00:01:19 +00:00
he 081971a032 Use __inline instead of inline, to allow linting of ourselves... 2006-10-17 23:53:30 +00:00
christos 3ceb6c1c20 warns=4, pass lint. 2006-10-17 15:13:08 +00:00
christos c384594e4f use howmany(), instead of open-coding the calculation. 2006-10-16 16:44:20 +00:00
he 62e8b0f3fa Make a minimal attempt at distinguishing between the hosts and the
targets integer data type value ranges.   For now we just use the
hosts uint64_t for parsing & storing integers constants, and test
against the targets limits and assign appropriately, instead of
sometimes (inappropriately) going via the hosts u_long type.  As
long as none of our architectures have target long or quad data
types strictly larger than 64 bits, we should be fine with this
fix.

Furthermore, as they stand at the moment, we can't use the current
TARG_INT_MAX and TARG_LONG_MAX constants in C preprocessor expressions,
so remove the conditional on them being equal.  Yes, this will
produce dead code for some targets.

This allows an ilp32 host to lint for an lp64 target which uses
e.g. the targets ULONG_MAX constant without triggering an "integer
constant out of range" warning.

OK'ed by christos.
2006-10-16 13:33:57 +00:00
dsl c183c301dc Add some more explanitory comments.
Rename 'allsrc' to 'curSrcs' so that the variable passed to ParseDoSrc (etc)
has the same name as the local in the calling routine, rather than a name
that seems to imply a more global and persistent list.
2006-10-15 21:17:27 +00:00
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