Commit Graph

5792 Commits

Author SHA1 Message Date
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
Juli Mallett
0fd9fa89a9 Print debugging from DEBUG(VAR) level to stderr. About to macroise this.
(Read: More commits to come).

MFC in:		4 days.
2002-09-17 21:26:57 +00:00
Peter Wemm
66422f5b7a Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
Bruce Evans
38c8f73ed0 Backed out revs 1.32-1.33. The problem has been fixed better by
depolluting <netinet/if_gre.h> in the !_KERNEL case.

Reviewed by:	sobomax
2002-09-16 10:06:02 +00:00
David E. O'Brien
8c8b4375bb Update for version 3.39. 2002-09-16 06:31:49 +00:00
David E. O'Brien
fc89e1e61a Update for 3.39. 2002-09-16 06:22:04 +00:00
Nate Lawson
e47c217844 Userland changes to go with vnode->v_tag change. 2002-09-14 18:51:10 +00:00
Peter Wemm
155c182a5c Promote gcore from i386-specific to the MI section.
Compiled on: alpha, sparc64, ia64
2002-09-13 18:29:08 +00:00
Peter Wemm
9e0a9e9833 Add #include <sys/queue.h> for sparc64's benefit. The MD includes there
have less polution.
2002-09-13 18:24:59 +00:00
Peter Wemm
e0491636b5 Use a crowbar to move the a.out code out of gcore.c and into its own
file so that we have a chance of using gcore on non-i386 platforms.  Use
linker sets to reduce the registration glue.  Remove md-sparc.c, we do not
have an a.out sparc32 port.  aoutcore.c was repocopied from gcore.c.
2002-09-13 16:33:35 +00:00
Mike Barcroft
1494fdadfb Some uses of the variable n needed to be int, others needed to be
size_t.  Add a new variable to cope.
2002-09-11 04:26:09 +00:00
Mike Barcroft
9654cb6531 Unbreak world by fixing 4 syntax errors and 1 wrong variable type. 2002-09-11 01:00:56 +00:00