Commit Graph

6126 Commits

Author SHA1 Message Date
ru
b25f75362b tip(1) no longer uses modems(5).
Reviewed by:	markm
Approved by:	re
2002-11-27 09:18:59 +00:00
ru
9254b8ff8e Really merge from OpenBSD import (should have been done a year ago).
Reviewed by:	markm
Approved by:	re
2002-11-27 09:18:28 +00:00
ru
d53cbf1f18 mdoc(7) police:
Revert to using the .Tn POSIX and .Tn ANSI instead of \*[Px] and \*[Ai]
strings; using these strings is unsafe in troff mode, as they include a
change in a font size.

Approved by:	re
2002-11-26 17:55:41 +00:00
ru
b81907a359 mdoc(7) police: markup and spelling.
Approved by:	re
2002-11-26 17:34:25 +00:00
ru
07cd1d9dbe mdoc(7) police: markup polishing.
Approved by:	re
2002-11-26 17:33:37 +00:00
ru
ff082ea4aa mdoc(7) police: back out unproved changes from previous revision.
Approved by:	re
2002-11-26 15:34:18 +00:00
ru
a910154b3a mdoc(7) police:
Restore (once again) my fixes from revision 1.20 that got lost in
revision 1.25 merge.

Approved by:	re
2002-11-26 15:32:04 +00:00
ru
b95617cd82 mdoc(7) police: laundry.
Approved by:	re
2002-11-26 14:00:39 +00:00
ru
9a5ea0290d mdoc(7) police: nit.
Approved by:	re
2002-11-26 11:25:04 +00:00
ru
14c527a306 mdoc(7) police: back out unproved changes in previous revision;
descriptions in the FILES section should be full sentences, as
demonstrated in mdoc(7) and /usr/share/examples/mdoc/.

Approved by:	re
2002-11-26 11:22:59 +00:00
ru
d5ce9cddcd mdoc(7) police: markup nits, "The .Nm utility".
Approved by:	re
2002-11-26 11:17:22 +00:00
ru
93c50ae09b mdoc(7) police: bump document date, use the canonical option list width,
removed a bunch of extraneous .Pp and .Dq calls.

Approved by:	re
2002-11-26 11:09:27 +00:00
ru
702f646ff4 mdoc(7) police: markup polishing.
Approved by:	re
2002-11-26 11:04:37 +00:00
ru
f5844203bb mdoc(7) police: markup polishing.
Approved by:	re
2002-11-26 10:57:57 +00:00
ru
ebbe7aaf9b mdoc(7) police: markup polishing.
Approved by:	re
2002-11-26 10:51:47 +00:00
ru
4bd324e254 Make this work under non-C locales.
PR:		misc/45460
Approved by:	re
2002-11-25 09:00:05 +00:00
julian
ef4d5cf6c8 The second try a committing the bluetooth code
Has been seen to work on several cards and communicating with
several mobile phones to use them as modems etc.

We are still talking with 3com to try get them to allow us to include
the firmware for their pccard in the driver but the driver is here..
In the mean time
it can be downloaded from the 3com website and loaded using the utility
bt3cfw(8) (supplied) (instructions in the man page)

Not yet linked to the build

Submitted by:	Maksim Yevmenkin <myevmenk@exodus.net>
Approved by:	re
2002-11-20 23:01:59 +00:00
eric
5f7b25f30d Be more careful when parsing arguments.
PR:		45476
MFC after:	5 days
2002-11-20 17:59:20 +00:00
grog
f048fb4777 Add description of a number of "default" files that have been added
over the last few years.
2002-11-19 00:30:38 +00:00
grog
ea7ff72eb1 Add file for South African holidays.
Submitted by: Tony Harverson <Tony@epages.net>
2002-11-19 00:29:36 +00:00
ru
cd20fe329e Install /usr/libexec/makewhatis.local and /usr/libexec/catman.local.
This has slipped through the cracks of The Great Perl Script Rewrite.

Repocopied by:	joe
2002-11-18 10:11:22 +00:00
peter
49925a1912 A little bit of anti-foot-shooting. Use utimes(2) rather than
the deprecated utime(3).  utimes(2) uses timeval, but utime(3) uses
time_t's.  If you do bad things (like I did) by mixing up include files
with libc, then install can do strange things if you mismatch the time_t
stuff.  utime() is emulated entirely within libc.

Approved by:  re (jhb)
2002-11-15 22:43:56 +00:00
peter
65e05c6a3f utmp.ut_time and lastlog.ll_time are explicitly int32_t rather than
time_t.  Deal with the possibility that time_t != int32_t.  This boils
down to this sort of thing:
 -   time(&ut.ut_time);
 +   ut.ut_time = time(NULL);
and similar for ctime(3) etc.  I've kept it minimal for the stuff
that may need to be portable (or 3rd party code), but used Matt's time32
stuff for cases where that isn't as much of a concern.

Approved by: re (jhb)
2002-11-15 22:42:00 +00:00
des
7bbf3699f8 Don't set atime / mtime if we don't have an output file, which can happen
in certain failure scenarii (mostly DNS trouble).
2002-11-13 16:04:20 +00:00
ru
9f516c6032 Take __FreeBSD_version into account when BOOTSTRAPPING. 2002-11-13 13:49:29 +00:00
fenner
57dcaaf8db Don't divide by zero to calculate the ETA, even if we haven't gotten
any data in 30 seconds.
2002-11-12 07:09:43 +00:00
mux
0028471fc0 kenv(1) is WARNS=6 clean. 2002-11-11 11:56:28 +00:00
mike
bf3b590bbd Add support for the Latin American and Caribbean IP address Regional
Registry (LACNIC) with the -l option and support for recursive IP
address searches.

PR:		44448
Submitted by:	David Wolfskill <david@catwhisker.org>
MFC after:	1 week
2002-11-10 16:58:56 +00:00
marcel
40a1bd9c1a o Build truss on all architectures.
o  xlint is still excluded from the ia64 build, but now in a way
   that doesn't corrupt ordering for other platforms.
2002-11-10 01:01:58 +00:00
marcel
9c92d61ff5 Port to ia64. It builds, but usability is very limited. 2002-11-10 00:59:13 +00:00
dwmalone
cafca61f45 Various cleanups of truss:
1) Missing include.
2) Constness.
3) ANSIfication.
4) Avoid some shadowing.
5) Add/clarify some error messages.
6) Some int functions were using return without a value.
7) Mark some parameters as unused.
8) Cast a value we know is non-negative to a size_t before comparing.
2002-11-09 22:46:51 +00:00
dwmalone
bade8a6c74 Check if name is NULL before we strcmp the syscall name. This was
sometimes triggered if you began trussing a process while it was
in a syscall, as the name is filled in when the syscall is made.
2002-11-09 22:28:38 +00:00
dwmalone
af4cac4d3a #include <err.h> to make yes warns clean again. 2002-11-09 21:00:39 +00:00
jmallett
5a7937d932 Convert some broken cases where Error is called, but we try to continue,
to Fatal errors, because the logic that we use to try to continue is far
too broken, and makes things look and act weird, because we end up pointing
past the end of a buffer boundry into freed memory in the caller, as we
don't come close to setting the lengthPtr to a sane value.

Reviewed by:	make@

(This only changes failure cases which would have died horrid deaths to
 explicit clean death failure cases.)
2002-11-08 16:59:11 +00:00
tjr
4e9d734606 Detect and exit on write errors. 2002-11-08 02:51:31 +00:00
fenner
99409fa229 Don't exit with success after timeout during authentication. 2002-11-07 22:16:45 +00:00
grog
c3ab31d16f Remove entry for All Saints' in Portugal. While it's correct, All
Saints' is celebrated in all Christian countries, and there's already
another entry.
2002-11-03 00:37:04 +00:00
tjr
06c2376d74 Another buffer overflow similar to the recent one in mkstr(1). 2002-11-01 12:48:28 +00:00
tjr
ff8adee58f Remove claim that pi and ex use mkstr; pi is long gone, and nex doesn't
use it.
2002-11-01 12:22:41 +00:00
tjr
d46cc38f4f Zap another buffer overflow, this time in the parser.
MFC after:	2 weeks
2002-11-01 12:09:05 +00:00
tjr
b351ca8597 Avoid buffer overflow when constructing filenames. 2002-11-01 11:53:52 +00:00
ru
fdda6d41f6 Document the confusing behavior that the .if conditional defaults
to defined(), e.g., ``.if 1'' is equivalent to ``.if defined(1)'',
which is only true when the ${1} variable is defined.
2002-11-01 08:40:32 +00:00
marcel
a7c31833b8 o Remove $Id$ from copyright; there's $FreeBSD$,
o  Remove static function uuid_print(); use uuid_to_string(3) in
   combination with printf(3) to achieve the same,
o  Remove unneeded includes,
o  Add a reference to uuid(3) to the manpage.
2002-11-01 06:20:14 +00:00
fanf
a6f626e242 Variables that come in in and out pairs should be named accordingly.
Different code that processes the input in similar ways should be
called in similar ways. File-local stuff should be static. Output
errors should be checked for. Diffs sometimes have to be big.
2002-11-01 02:08:51 +00:00
fanf
cbbb5d786a Be much more paranoid about where uudecode writes its output, especially
when the filename comes from the untrusted input. This is a work-around
for careless people who don't routinely check the begin line of the file
or run uudecode -i and instead report "vulnerabilities" to CERT.
	http://www.kb.cert.org/vuls/id/336083
2002-11-01 00:58:00 +00:00
fanf
0358393a11 Instead of abusing stdin and stdout, use our own file pointers.
Check for errors when closing the output.
2002-11-01 00:29:00 +00:00
sobomax
47782f8dba Back out previous commit - it was not well thought out.
Clue beaten in by:	ume
Pointy hat to:		sobomax
2002-10-31 13:05:56 +00:00
ru
176b416adb Document the new behavior of -C with respect to inode-change-time.
Document that -p also preserves the access time of the source.
2002-10-31 10:43:32 +00:00
ru
b11f8333fb Do not change the target file's inode-change-time if -C is
specified, the target file already exists and the files are
the same, and the target's file flags and mode need not to
be changed.
2002-10-31 10:41:51 +00:00
sobomax
d9f2f9a48b Fix POLA breakage in 1.29: IPv4 should be default. This makes `-4' option
a nop, but we'll probably want to keep it for compatibility with other
KAME-based systems.

Complained about by:	Andrey Lakhno <land@dnepr.net>
MFC after:		3 days
2002-10-31 10:36:12 +00:00
ru
2dbc332c1c ade@ no longer has the FreeBSD account. 2002-10-31 08:56:34 +00:00
ru
cf1820c5e5 Sort by month/day/year/login. 2002-10-31 08:55:33 +00:00
mux
c194828c88 Fix core dumps when invoking with something like ``last -w1''.
PR:		bin/44583
Reported by:	Amit Chakradeo <sdbug@spam.chakradeo.net>
MFC after:	3 days
2002-10-30 18:19:59 +00:00
jmallett
b0b9669c4d When we appear to want a signed value from sizeof(), use ssize_t in the cast,
rather than int.
2002-10-30 15:50:00 +00:00
des
bde988ef15 Clarify my feelings towards fetch / libfetch. 2002-10-30 04:53:58 +00:00
grog
2ec8dbcf5e Output .lf directives. 2002-10-30 03:24:16 +00:00
ru
b72f870406 bsd.doc.mk changes:
Don't gratuitously pipe thru a cat(1) if NODOCCOMPRESS.

Only create _stamp.extra when necessary.

Get rid of SOELIMPP and OBJS.

Use Groff version of soelim(1); we need its -I option
for the following to work.

Don't needlessly chdir to SRCDIR.  Only a few documents
need CD_HACK, and those that need it either use refer(1)
or .PSPIC macro which internally uses the .psbb call.
2002-10-29 14:56:09 +00:00
joerg
d139101c16 Don't try to dereference a NULL pw pointer. This would happen when
attempting to use chpass -a.
2002-10-29 12:45:32 +00:00
jmallett
c7026d9cf2 In VarHead(), look into the correct (modified) string. 2002-10-29 12:11:56 +00:00
ru
3fc95c5877 Mention that the left-hand side of the comparison
conditional must always be a variable expansion.

Obtained from:	PMake

Do not lie that debugging .for loops is a no-op.
2002-10-29 09:48:49 +00:00
obrien
477fc07ce9 Mostly support alternate manpage zipping. 2002-10-29 09:20:22 +00:00
jmallett
d6441cee7e Split var.c into var.c and var_modify.c and move all the modification funcs
to var_modify.c, for readability.  constify some low hanging fruit (string
manipulation functions) and the upper layers appropriately.  No longer use
the private strstr(3) implementation, while changing string code.

Tested by:      lots of successful make buildworld.
2002-10-28 23:33:57 +00:00
des
554df0c399 Don't complain about not knowing the remote file size when working in
quiet mode.

PR:		bin/37079
Submitted by:	Nicolas Rachinsky <list@rachinsky.de>
2002-10-27 17:33:08 +00:00
des
2b13c53d76 Whitespace and indentation cleanup. 2002-10-27 15:32:51 +00:00
des
ba4c120348 Forgot to disable alarms after fetchXGet() in previous commit. 2002-10-27 15:32:06 +00:00
des
9133f7a1dc Add an ETA timer that kicks in after 30 seconds.
Re-add alarm(2) calls around the calls to fetchStat(3) and fetchXGet(3),
since these calls can still time out on DNS lookups or TCP connect(2).

Remove the alarm(2) calls in the main loop, since all methods properly
handle transfer timeouts (as opposed to connection timeouts).

Set the sigalrm flag if a timeout occurs in the main loop.

Move the signal: label up a little so we still set the atime and mtime
when the transfer times out or is interrupted, so that restarted transfers
will work as expected (as long as the file still exists).

MFC after:	2 weeks
2002-10-27 15:15:13 +00:00
wollman
09d741eee8 Remove unnecessary compatibility macro. (We were only printing, not parsing,
intmax_t.)
2002-10-27 04:14:08 +00:00
wollman
9461a5f087 Add new 1003.1-2001/TC1/D6 parameters. (On final recirculation ballot now,
so this should be officially TC1 before the New Year.)

Add TrustedBSD pathconf parameters.

Add compilation support for -stable (to be merged momentarily).
2002-10-27 04:10:34 +00:00
dougb
246662679e Adjust the size passed to readlink so that the null termination
falls within the range of the path variable.

Cribbed from the latest NetBSD source.

Obtained from:	provos@NetBSD.org
2002-10-25 07:26:36 +00:00
jmallett
e615c77210 Fix problem with my ability to tell the difference between 'r' and 'l'... We
want to check var[1], not val[1].

Submitted by:	Mark Valentine <mark@thuvia.demon.co.uk>
Pointed out by:	sam
Pointy hat to:	jmallett
2002-10-24 20:37:58 +00:00
jmallett
4c66803666 When expanding a specific [1-char] variable, only expand said specific
[1-char] variable.  Don't just automatically expand something which
starts with that character.

Obtained from:	OpenBSD [3 years ago!]
2002-10-24 12:57:42 +00:00
jmallett
e5558b972a Duplicate the variable name in the v->name field, as otherwise it points to
data that will be modified.  And do the appropriate thing now and free the
v->name buffer along with other relinquished memory.

XXX There is duplication here of destroying a Var, which is probably bogus,
and probably missed in a few places.
2002-10-24 04:10:55 +00:00
jmallett
b16e89807f Remove efree(), it isn't used consistently enough to even pretend that it
might help on the systems it could possibly be used as a bandaid for.  In
fact, the only thing it's useful for is instrumenting free(3) calls, and in
that capacity, it's better served as a local patch, than a public wrapper.
2002-10-23 23:16:43 +00:00
markm
a34db31767 Change the type of an unused variable to appease a warning. 2002-10-23 19:10:15 +00:00
markm
820235c757 Adjust for getbsize argument type change. 2002-10-23 19:02:17 +00:00
markm
d1625bacf4 Remove unneeded function prototypes. 2002-10-23 16:20:12 +00:00
ru
34a52f8114 Need to run lint1 from ${WORLDTMP}/usr/libexec during buildworld.
Spotted by:	fjoe
2002-10-23 12:05:27 +00:00
rwatson
9c5475732e Add a new '-s' option to su(1): if the flag is present, attempt to
also set the user's MAC label as part of the user credential setup
by setting setusercontext(3)'s SETMAC flag.  By default, change only
traditional process properties.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 03:19:34 +00:00
jmallett
965d783bfd De-obfuscate and correct the include path handling for SysV style includes.
PR:		32759
Submitted by:	Mark Valentine
Reviewed by:	Matthew Emmerton" <matt@gsicomp.on.ca>
MFC after:	15 days
2002-10-23 01:57:33 +00:00
ache
8a29ded141 Use more verbose diagnostics for wrong DIGIT range 2002-10-20 23:09:26 +00:00
ache
38e3e855d7 Add checks for DIGIT set consistency to prevent common misinterpretation
automatically.
Remove output file on error.
Staticize functions declared as static.
2002-10-20 19:56:15 +00:00
fanf
f6211ebd73 Improve the way base64 mode is enabled based on the program name,
so that it works when the path to b64encode is used to run it.
2002-10-20 14:18:25 +00:00
arved
cffe5cc386 Add my birthday.
Approved by: kris (mentor)
2002-10-20 13:33:45 +00:00
grog
fca9353d18 Sort by date. 2002-10-20 02:20:31 +00:00
grog
b1332d700d Clarify holidays which apply only to the USA
Clarify that the USSR no longer exists, but some of the holidays are
celebrated anyway.

Reviewed in part by:	ru

Remove Jewish and most Muslim holidays.  They're all wrong, since they
don't apply to the Western calendar.  The much more complete Jewish
holidays are in calendar.judaic.  The Muslim holidays need to be
collected into a file, but there's not much point in having the wrong
date.

Remove many Fiji holidays.  They change every year by Government
decree, and some were duplicated as a result.

Remove some duplicates.

There's still a lot to be done; in particular, I think the Japanese
and British holidays are very inaccurate.  This file needs checking by
people who know the details.
2002-10-20 02:12:46 +00:00
sobomax
890ee7068b Fix a problem with RTLD_TRACE flag to dlopen(3), which sometimes can return
even if there was no error occured (when trying to dlopen(3) object that
already linked into executable which does dlopen(3) call). This is more
proper fix for `ldd /usr/lib/libc.so' problem, because the new behaviour
conforms to documentation.

Remove workaround from ldd.c (rev.1.32).

PR:		35099
Submitted by:	Nathan Hawkins <utsl@quic.net>
MFC after:	1 week
2002-10-19 10:18:29 +00:00
ru
3528a2ae54 Revert last delta. SGR support in grotty(1) is disabled system-wide
in /usr/share/tmac/troffrc pending the issue resolution on -arch.
2002-10-18 09:14:17 +00:00
markm
eabfb5764c When a user gets refused because the password is wrong, use the
older "BAD SU" syslog message that folks prefer. There is quite
a bit more tweaking that can be done with other similar messages.

Asked for by:	tjr
2002-10-18 08:23:24 +00:00
adamw
c0f75920fb Add myself
Approved by:	pat (mentor)
2002-10-18 07:50:46 +00:00
trhodes
227a22eb85 Everyone else is doing it! (adding their birthdays) 2002-10-18 06:21:09 +00:00
maho
770a2b0ad2 New committer's first commit(birthday). 2002-10-18 05:48:55 +00:00
daichi
69c9bd9d4c New committer first committion.
addition my birthday.
2002-10-18 04:56:03 +00:00
tjr
f2d5dee5e7 Style: use sa_handler instead of __sigaction_u.__sa_handler. 2002-10-17 23:32:44 +00:00
charnier
e0868195fe Use .Fl/Ar for flags and arguments. 2002-10-17 13:04:49 +00:00
charnier
be72d049f1 Introduce option enumeration the standard way. 2002-10-17 12:58:14 +00:00
markm
ec19b8de09 Dekerberise. The corresponding userland stuff has been dekerberised
for ages, and no-one seems to have noticed. Viva PAM!
2002-10-16 16:10:46 +00:00
markm
1d913ae9f1 Dekerberise. The corresponding userland stuff has been dekerberised
for ages, and no-one seems to have noticed. Viva PAM!

Fix some easy/trivial warnings while I'm here.
2002-10-16 16:09:05 +00:00
charnier
483c4159ed Add section number to .Xr directive. 2002-10-16 15:46:43 +00:00
charnier
f8c28d5ae2 The .Nm utility 2002-10-16 15:38:28 +00:00
charnier
f9afb527d0 Introduce enumerate of options using the standard way.
Remove .Pp between items.
2002-10-16 15:32:16 +00:00
charnier
46e9ffcba2 Introduce enumerate of options using the standard way: 2002-10-16 15:28:20 +00:00
charnier
ba4498866b Do not reuse flag name in its definition. Remove inadequate sentence. 2002-10-16 15:17:38 +00:00
charnier
e7388fc0b6 Spelling 2002-10-16 13:58:39 +00:00
charnier
0189f07841 Remove done() which was just exit() so use of warn()/err() can be made. Abort
on allocation failure instead of displaying a warning and deferencing NULL
pointer after. Spelling. Add prototypes. Add list of option in synopsis section
of man page, -d is not referenced because available as a compile option. It
should be made a runtime option btw.
2002-10-16 13:50:09 +00:00
phantom
de59ef3c8f Add locale(1). I have used it for while as useful debugging tool
for locale related things.  So, I think it could be useful for
others.  It's not yet implement (or implement in different manner)
all POSIX things, but I think it's good enough for start.

POSIX conformance related updates and manpage to follow relatively soon.
2002-10-16 13:17:18 +00:00
charnier
c99f71bc3e Normalize FILES section by using .Bl/.El enumerate. 2002-10-16 13:00:42 +00:00
charnier
1b2d41b734 Test getopt() against -1 instead of EOF. 2002-10-16 12:56:22 +00:00
charnier
4d4b2ae2e8 Spelling. 2002-10-16 12:42:15 +00:00
charnier
d0984d649d Do not repeat option name in its definition. Use .Nm. In the sequence ``~.'',
``.'' is not a sentence termination, it must be escaped to be put inside
quotes.
Abort if execv() fails by adding err(). Do not dot terminate error messages.
2002-10-16 12:33:14 +00:00
phk
3a40553fa9 Be consistent about functions being static.
Spotted by:	FlexeLint
2002-10-15 18:24:31 +00:00
joerg
76d184ef30 Add information about the SDLT density codes.
Submitted by:	"Stewart MacLund" <sundie@lunaticfringe.org>
MFC after:	1 week
2002-10-15 12:53:29 +00:00
phk
fa987b12ed Remove an unused variable. 2002-10-14 08:54:08 +00:00
tjr
43632bb4cb Add Big5, MSKanji and UTF-8 to the list of supported encodings.
Mark UTF2 as being deprecated.
2002-10-14 00:45:51 +00:00
grog
6b6fde6d5a Clarify that a number of incidents relate to Germany.
This file contains a number of incidents which do not related to
Germany.  It's not clear whether they should remain or not, so I have
left them.
2002-10-14 00:45:13 +00:00
anders
d8801bd0c9 Add self. 2002-10-12 18:10:13 +00:00
jmallett
2c01af6e91 The -a and -d flags are mutually exclusive, show them as such in usage() and
manual page for showmount(8)

Sponsored by:	Bright Path Solutions
MFC after:	2 weeks
2002-10-12 05:45:01 +00:00
grog
629c305c5f Clarify details of the birth of Richard I of England. 2002-10-12 00:42:34 +00:00
mike
463e5ac71d Change iov_base's type from char *' to the standard void *'. All
uses of iov_base which assume its type is `char *' (in order to do
pointer arithmetic) have been updated to cast iov_base to `char *'.
2002-10-11 14:58:34 +00:00
cognet
c8bc75fdc8 Add myself.
Reviewed by:	mux (mentor)
2002-10-11 13:06:42 +00:00
ru
5bdc86400b Groff 1.18.1 comes in with ANSI color support, enabled by default.
In "nroff" mode, italic font renders as an underlined text, which
makes it indistinguishable from the bold text on color monitors
(cons25 terminal type), yet it requires the less(1)'s -R option.
(Refer to the new grotty(1) manpage for details.)

So turn off the color support for now (when generating catpages),
until we figure out what do we do with this new feature.  I have
a patch for grotty(1) that tells it to use the "reverse video"
attribute to render the italic font.  Once this is accepted, we
can turn color support back on (if there won't be any objections
from the community).
2002-10-11 09:16:24 +00:00
jmallett
f6cab627f9 Move utilitarian routines to util.c, which isn't the same as the old
compatability-geared util.c.  These are things like message printers
and the PrintAddr function for traversing lists.  Other general-purpose
utilities inside make(1) can go here, in time.
2002-10-10 19:27:48 +00:00
jmallett
8c087d1a43 Convert make(1) to use ANSI style function declarations. Variable
documentation already adequatedly existed in the description in most
cases.  Where it did not, it was added.  If no documentation existed
beforehand, then none was added.  Some unused dummies for use in the
traversal functions were marked as __unused during the conversion.
Occasionally, local style fixes were applied to lines already being
modified or influenced.

Now make(1) should always build with WARNS=3.
2002-10-09 03:42:10 +00:00
jmallett
f0494b688f 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
jmallett
f6c23f0be4 Remove extern declarations from functions and source files where they would
happily fit into headers.
2002-10-09 01:56:02 +00:00
jmallett
c864698f75 Remove unused local-locals, where upper-level locals may safely be used. 2002-10-09 01:51:00 +00:00
jmallett
e966ee928a 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
tjr
c097b10b9a 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
tjr
0aba912a90 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
5459fa2cab Use strlcpy() instead of strcpy() to not overflow static buffers. 2002-10-06 23:52:06 +00:00
mike
1043a076ec 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
phk
29388ae75c 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
tjr
d395697e0c 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
6e3f4485a3 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
jmallett
a36c23beb5 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
jhb
b2fafb3737 Catch up to SMTX -> SLOCK changes. 2002-10-02 20:33:52 +00:00
jmallett
a400f07d1b Code that has been #if0'd with the comment "WHY" since revision 1.1 can
disappear.
2002-10-02 16:06:39 +00:00
jmallett
24d2283486 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
roam
ceb8143c50 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
dd
c49f24e40d 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
dd
15d4e62b29 Merge from crypto telnet: permit the argument to -s to be a hostname. 2002-10-02 00:29:34 +00:00
jmallett
48cf66f7d0 Fix spurious three-space indentation in a four-space indentation file. 2002-09-29 00:20:28 +00:00
jmallett
56dbcd9f56 Fix ability to use csh(1) as the make(1) shell.
Sponsored by:	Bright Path Solutions
2002-09-29 00:02:04 +00:00
jmallett
df4a28f2ab 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
jmallett
4d0a0cd6be Fix merge error in previous commit.
Sponsored by:	Bright Path Solutions
2002-09-28 20:04:17 +00:00
jmallett
d6f4ac8034 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
phk
ae12639c2c Rename struct specinfo to the more appropriate struct cdev.
Agreed on:	jake, rwatson, jhb
2002-09-27 18:27:10 +00:00
ru
902a0ccb6a Document the parsing bug. 2002-09-27 09:21:07 +00:00
jmallett
f704a19099 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
jmallett
2e11ae75d3 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
jmallett
49553a8ca0 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
markm
a086edddcf Unifdef(1) the crypto telnet sources. 2002-09-25 07:53:29 +00:00
fanf
d1d3f89b46 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
fanf
c8e0df561d 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
fanf
9c05ffeb99 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
ache
bec6f69a2e Make it work with POSIX sort (POS arg).
All old sorts understand -k too.
2002-09-24 19:05:40 +00:00
ache
3ee5208fd2 Make it work with POSIX sort (POS arg)
All old sorts understand -k too.
2002-09-24 18:16:36 +00:00
jmallett
dc47f10701 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
jmallett
48132a0cb0 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
e86474f4a1 - Add the -i option to read in a saved ktr file output by KTR_ALQ. 2002-09-22 07:21:28 +00:00
grog
3fdc445c38 Update equinoxes and solstices.
PR:	bin/43166
2002-09-22 01:53:18 +00:00
wollman
d8d5a39838 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
346283a0eb Initialize a variable in order to fix when faced with picky compilers.
Sponsored by:	Apple
2002-09-20 19:40:23 +00:00
ru
65635a596b Update for FILE v3.39. 2002-09-19 13:53:17 +00:00
ru
1d89434ff4 Bootstrapping aid for systems without <stdint.h>.
(Needed to build mkmagic in build-tools.)
2002-09-19 12:30:34 +00:00
wollman
29fe18ae8b 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
green
d685a86ad2 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
jmallett
066723b222 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
483003a81f 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
jmallett
3b68a4bdb5 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
wollman
297d5be941 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
jmallett
c308d8b17a 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
jmallett
e89b2a5ee1 #define<space> -> #define<tab> 2002-09-17 21:29:06 +00:00
jmallett
ecfd01bb11 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
3c7c11fd3e 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
bde
e133d10f54 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
obrien
c5ae510542 Update for version 3.39. 2002-09-16 06:31:49 +00:00
obrien
e3a8d0c879 Update for 3.39. 2002-09-16 06:22:04 +00:00
njl
cac9d702dd Userland changes to go with vnode->v_tag change. 2002-09-14 18:51:10 +00:00
peter
f4f01549c4 Promote gcore from i386-specific to the MI section.
Compiled on: alpha, sparc64, ia64
2002-09-13 18:29:08 +00:00
peter
42037c3273 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
87f05db624 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
5059d0a4ee 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
2f59563dde Unbreak world by fixing 4 syntax errors and 1 wrong variable type. 2002-09-11 01:00:56 +00:00
fanf
011b57e5f4 Fix style bugs in macros. 2002-09-10 21:14:14 +00:00
fanf
523285a7fe Tidy up the base64 code and relax the error handling. 2002-09-10 21:10:33 +00:00
fanf
bd7ce9a764 Style: Don't treat pointers as booleans. 2002-09-10 20:53:46 +00:00
fanf
f639cb7efe Fix tilde-expansion of the filename obtained from the "begin" line in -s
mode, and be more accurate about identifying begin lines so that spurious
ones don't have to be manually edited out, and be more forgiving about
errors so that -c mode is more useful.
2002-09-10 20:48:44 +00:00
fanf
3471b380fd Replace a goto with continue. 2002-09-10 20:33:39 +00:00
fanf
7ca327d553 Remove register keyword. 2002-09-10 19:23:44 +00:00
fanf
3b8ca5de67 Style: space after return. 2002-09-10 18:52:03 +00:00
fanf
02d337e568 Make the handling of -i neater. 2002-09-10 18:34:07 +00:00
fanf
c9cd0af10b Only try to chmod the output if it's a regular file, rather than
hard-coding /dev/stdout as a special case.

Suggested by:	jmallett
2002-09-10 18:28:19 +00:00
thomas
4784e02a42 Prevent the wrapper from looping on itself forever, when there
is a symbolic link in the PATH pointing back to /usr/bin/perl.

Change WARNS from 6 to 5 to account for the fact that sys/time.h,
included from sys/stat.h, produces a warning when compiled with
-pedantic.

PR:		bin/42418
Reviewed by:	roberto
2002-09-10 13:56:30 +00:00
grog
2630930ed0 Add the 1109 incident. 2002-09-10 00:07:19 +00:00
nectar
8602bb584a Check for FD_SET overrun. 2002-09-09 16:14:03 +00:00
obrien
cc01e4a5f9 Catch up with the ISO-C++ standard.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2002-09-09 02:58:42 +00:00
sobomax
03e45deff6 Also add #include <netinet/in_systm.h> before <neinet/ip.h> to fix the
world.

Submitted by:	Brooks Davis <brooks@one-eyed-alien.net>
2002-09-07 12:20:47 +00:00
sobomax
fa5ef3b046 Add #include <netinet/ip.h> in attempt to fix the world. 2002-09-07 06:16:22 +00:00
archie
0f6e00212d Make it clear that the ":C" variable modifier expects an extended
regular expression instead of an obsolete regular expression.
Also, cross-reference re_format(7) instead of regex(3).

MFC after:	3 days
2002-09-06 17:33:11 +00:00
dwmalone
37d1e28102 Warns cleanups for netstat:
1) Include arpa/inet.h for ntohs.
2) Constness fixes.
3) Fix shadowing except for "sin" which shouldn't be in scope.
4) Remove register keyword.
5) Add missing initialsers to user defined structs.
5) Make prototype of netname6 globally visable.
6) Use right macros for printing syncache stats (even though entrie isn't
   a word).
2002-09-05 17:06:51 +00:00