Commit Graph

5803 Commits

Author SHA1 Message Date
Juli Mallett
0ce3fbf191 Use __FBSDID in the lst.lib files, to match to main make(1) files. It is
defined to __RCSID when bootstrapping, by the Makefile, but this change is
for consistency
2002-10-09 02:00:22 +00:00
Juli Mallett
15c11220ee Remove extern declarations from functions and source files where they would
happily fit into headers.
2002-10-09 01:56:02 +00:00
Juli Mallett
cf382f5bb1 Remove unused local-locals, where upper-level locals may safely be used. 2002-10-09 01:51:00 +00:00
Juli Mallett
7e75296d52 Reference the correct local variable in all parts of a for loop, so we
operate on the correct data (properly).

Tracked down by:	Dan Nelson
2002-10-08 21:29:04 +00:00
Tim J. Robbins
363a99169a Re-add the code which maps POSIX standard library names into the ones
FreeBSD uses; f.e. -lpthread -> -pthread, -lxnet -> nothing.
2002-10-08 02:19:54 +00:00
Tim J. Robbins
98c59a0ae1 Add the c99(1) utility, which is nothing more than a synonym for
cc -std=iso9899:1999 -pedantic, and is required by SUSv3.

PR;	36087
2002-10-07 09:37:55 +00:00
Kris Kennaway
b241e69d12 Use strlcpy() instead of strcpy() to not overflow static buffers. 2002-10-06 23:52:06 +00:00
Mike Barcroft
1d631f7ef1 Don't depend on <signal.h> to include <sys/time.h>, instead include
<sys/time.h> directly.  This is mostly bogus since CLOCK_REALTIME
should be defined in <time.h>, which these files already include.
2002-10-06 21:46:04 +00:00
Poul-Henning Kamp
5fd43411f3 Give make(1) the ability to use KQUEUE to wait for worker processes
instead of polling for them.

Unfortunately we cannot enable it yet because it panics the kernel
somewhere in kqueue.

Submitted by:	Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
2002-10-04 20:30:03 +00:00
Tim J. Robbins
26cabd19d5 Fix off-by-one error processing the line after an empty line when the
-a option is not specified.

Submitted by:	schweikh
MFC after:	1 week
2002-10-04 16:45:25 +00:00
Johan Karlsson
208464c323 Actually implement gzip's -c option. minigzip now also doubles
as zcat properly.

PR:		13043
Submitted by:	Toshihiko ARAI <toshi@jp.freebsd.org>
		Jonathan Towne <jontow@twcny.rr.com>

Approved by:	peter, sheldonh (mentor)
MFC After:	2 weeks
2002-10-03 19:30:22 +00:00
Juli Mallett
80ce40f394 In lieu of a good way to prevent every possible looping in make(1), stop
there from being more than 500 processes forked by make(1), to prevent a
forkbomb from happening, in a dumb and mechanical way.

PR:		alane
Submitted by:	bin/42772
MFC after:	2 weeks
2002-10-03 04:32:47 +00:00
John Baldwin
0d6326492b Catch up to SMTX -> SLOCK changes. 2002-10-02 20:33:52 +00:00
Juli Mallett
03f3a2a645 Code that has been #if0'd with the comment "WHY" since revision 1.1 can
disappear.
2002-10-02 16:06:39 +00:00
Juli Mallett
0b6a3508ac Remove 6-years-stale #if0, the behaviour isn't ever going to be limited to
compatible mode, as far as I know, since we use it...
2002-10-02 16:03:26 +00:00
Peter Pentchev
ac6d1c224f Teach ncal(1) about month names specified on the command line.
Reviewed by:	-audit
Approved by:	silence on -audit
MFC after:	3 weeks
2002-10-02 12:31:10 +00:00
Dima Dorfman
d427d1cc26 Remove some #if 0'd code. After this, a "make unifdef" here produces
no changes (against crypto telnet).

Reviewed by:	MD5
2002-10-02 00:37:01 +00:00
Dima Dorfman
0d7e18c3e1 Merge from crypto telnet: permit the argument to -s to be a hostname. 2002-10-02 00:29:34 +00:00
Juli Mallett
40eecdba73 Fix spurious three-space indentation in a four-space indentation file. 2002-09-29 00:20:28 +00:00
Juli Mallett
3873e563fc Fix ability to use csh(1) as the make(1) shell.
Sponsored by:	Bright Path Solutions
2002-09-29 00:02:04 +00:00
Juli Mallett
763d9eb177 Make make(1) WARNS=6 clean except for const issues. This mostly involves
renaming variables to not shadow libc functions or greater scope locals.  Kinda
makes one wonder if the extern ones weren't meant in some of these places :)

The only thing I'd still like to do WRT this is possibly combine rstat and
status in compat.c -- that should be fine, as I do not think the codepaths
will want both around at once.

Sponsored by:	Bright Path Solutions
2002-09-28 23:35:07 +00:00
Juli Mallett
76e8db31fc Fix merge error in previous commit.
Sponsored by:	Bright Path Solutions
2002-09-28 20:04:17 +00:00
Juli Mallett
1e3d8881cf Add empty default cases where they should be, remove non-local execution stuff
in compat.c which doesn't even have preprocessor-conditional-hidden support
code, and add a debugging statement where we might end up with a nil list
somehow, but where I doubt it.

First confirmed userland kill for Flexelint.

Sponsored by:	Bright Path Solutions
2002-09-28 20:03:26 +00:00
Poul-Henning Kamp
ca916247cd Rename struct specinfo to the more appropriate struct cdev.
Agreed on:	jake, rwatson, jhb
2002-09-27 18:27:10 +00:00
Ruslan Ermilov
2420b40463 Document the parsing bug. 2002-09-27 09:21:07 +00:00
Juli Mallett
a08239b5d0 Remove a semicolon that appears to be a lie.
Spotted by:	SPARC64 make WARNS=3
Sponsored by:	Rachel Hestilow <rachel@jerkcity.com>
2002-09-26 06:44:30 +00:00
Juli Mallett
cac04057f2 When formatting the time for a target, use %H instead of %k, which is mostly
the same, but uses a non-extension option.

Sponsored by:	Rachel Hestilow <rachel@jerkcity.com>
2002-09-26 06:40:04 +00:00
Juli Mallett
4fed818c7e Don't declare things as extern when they will be static.
Sponsored by:	Rachel Hestilow <rachel@jerkcity.com>
2002-09-26 01:39:22 +00:00
Mark Murray
4a63284e80 Unifdef(1) the crypto telnet sources. 2002-09-25 07:53:29 +00:00
Tony Finch
36076c1e7b The spec says that unifdefall removes all #ifs, and this now requires
the -k flag to unifdef.
2002-09-24 19:50:03 +00:00
Tony Finch
981dbf5bac The readability is improved by reducing the use of the passive voice.
No changes to the meaning are made.
2002-09-24 19:48:39 +00:00
Tony Finch
352d0a6932 It is probably a bad idea to unconditionally process directives with
constant controlling expressions: in particular, removing #if 0 sections
is considered "rude". This commit changes the default so that such
things are passed through unchanged, and the old behaviour can be had
with the -k "kill konsts" flag.

Suggested by:	markm
MFC after:	3 weeks
2002-09-24 19:27:44 +00:00
Andrey A. Chernov
73be6d69ef Make it work with POSIX sort (POS arg).
All old sorts understand -k too.
2002-09-24 19:05:40 +00:00
Andrey A. Chernov
197442ec02 Make it work with POSIX sort (POS arg)
All old sorts understand -k too.
2002-09-24 18:16:36 +00:00
Juli Mallett
5a4ba400c1 Use some macro evil to create the functions for using sysctl(3) to get each
variable natively.  It should allow you to use any sysctl mib set, but due
to limitations of what I can do with macros, right now it's limited to two,
which is all this program used anyway.

Sponsored by:	Bright Path Solutions
2002-09-23 06:47:39 +00:00
Juli Mallett
2ee166b2bd Check to see if we should print a space, rather than using the annoying
prefix methodology.  Adjust nearby style.

Sponsored by:	Bright Path Solutions
2002-09-23 06:14:13 +00:00
Jeff Roberson
cba1f1e079 - Add the -i option to read in a saved ktr file output by KTR_ALQ. 2002-09-22 07:21:28 +00:00
Greg Lehey
8c6bc30900 Update equinoxes and solstices.
PR:	bin/43166
2002-09-22 01:53:18 +00:00
Garrett Wollman
0d3bcc2e80 Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct
hack, thereby allowing future extensions to the structure (e.g., for extended
attributes) without rebreaking the ABI.  FTSENT now contains a pointer to the
parent stream, which fts_compar() can then take advantage of, avoiding the
undefined behavior previously warned about.  As a consequence of this change,
the prototype of the comparison function passed to fts_open() has changed
to reflect the required amount of constness for its use.  All callers in the
tree are updated to use the correct prototype.

Comparison functions can now make use of the new parent pointer to access
the new stream-specific private data pointer, which is intended to assist
creation of reentrant library routines which use fts(3) internally.

Not objected to in spirit by: -arch
2002-09-21 01:28:41 +00:00
Eric Melville
b81df0819d Initialize a variable in order to fix when faced with picky compilers.
Sponsored by:	Apple
2002-09-20 19:40:23 +00:00
Ruslan Ermilov
f61bf05438 Update for FILE v3.39. 2002-09-19 13:53:17 +00:00
Ruslan Ermilov
751ec0537d Bootstrapping aid for systems without <stdint.h>.
(Needed to build mkmagic in build-tools.)
2002-09-19 12:30:34 +00:00
Garrett Wollman
e9cfb9ae3a Completely revamp the way getconf(1) works, for better adherence to the
intent of the Standard.

- Make getconf able to distinguish between configuration variables which
  are entirely unknown and those which are merely not defined in the
  compilation environment.  The latter now get a more appropriate
  "undefined\n" result rather than a diagnostic.  This may not be
  exactly right, but it's closer to the intent of the Standard than
  the previous behavior.

- Support ``programming environments'' by validating that the environment
  requested with the `-v' flag is the one-and-only execution environment.
  (If more environments are supported for some platforms in the future,
  multiple getconf(1) executables will be required, but a simple edit in
  progenv.gperf will enable automatic support for it.)  Document POSIX
  standard programming environments.

- Add all of the 1003.1-2001 configuration variables.  FreeBSD does not
  support all of these (including some that are mandatory); getconf will
  later be fixed to break the world should a required variable not be
  defined.

As a result of all these changes, gperf is no longer adequate.  Keep the
overall format and names of the files for now, to preserve revision history.
Use an awk script to process the .gperf files into C source, which does a
few things that gperf, as a more general tool, cannot do.  The keyword
recognition function is no longer a perfect hash function.

This may obviate the need for gperf in the source tree.

- Add a small compile-time regression test to break the build if any of the
  .gperf files declare conflicting token sets.  (gperf itself would have done
  this for the simple case of duplicate tokens in the same input file.)
2002-09-19 03:39:03 +00:00
Brian Feldman
873caac499 Update the usage string in the limits(1) manpage to include -b for
sbsize. Also, correct the format string in getopt(3) usage to reflect
that -b takes an argument, and correct another case of RLIMIT_SBSIZE
having been forgotten.
2002-09-18 16:25:59 +00:00
Juli Mallett
2dbb6cf1cb Make the DEBUGF() macro portable by (ugh) adding a Debug() function, which
is merely printf() but to stderr.  This takes care of the caveat which lead
to the use of a vararg macro -- getting everything to stderr.
2002-09-18 16:13:03 +00:00
Mike Barcroft
d0505643e5 ARIN has annoyingly started using caps when referencing
whois.apnic.net.  To properly receive hints for recursive IP searches,
we convert a buffer to lowercase before searching for magic words.

PR:		42834
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de> (mostly)
X-MFC-After:	re approval
2002-09-18 07:51:46 +00:00
Juli Mallett
bed4636e02 Mostly rewrite the flag handling of uname(1) to be overridable, such as:
freefall% uname -s
  FreeBSD
  freefall% env UNAME_s=Linnex ./uname -s
  Linnex

MFC after:	1 month
2002-09-18 04:33:10 +00:00
Garrett Wollman
f002cffd7e Make obrien happy. Add a bad awk script which emulates as much of
gperf's behavior as we ever actually needed here.  This generates
a much-less-efficient keyword recognizer, but it's not like that matters
in this application.  Makefile changes coming once this passes the world
test.
2002-09-18 03:15:25 +00:00
Juli Mallett
cdba64071c Move common use of if (DEBUG(FOO)) printf... to DEBUGF(FOO, ...), using
variable length arguments to a macro.  Bump version as this makes DEBUG
statements *always* go to stderr rather than sometimes stdout.  There are
a few stragglers, which I will take care of as soon as I can.  Mostly these
relate to the need-for-death-of some of the remote job code.

Nearby stylistic nits and XXX added/fixed where appropriate.
2002-09-17 22:31:26 +00:00
Juli Mallett
37721c8309 #define<space> -> #define<tab> 2002-09-17 21:29:06 +00:00