joe [Sat, 2 Feb 2002 20:59:43 +0000 (20:59 +0000)]
Sync with NetBSD's version, dropping all the 'ltd', 'corp', etc.
It's more important to keep this file easily syncable across the
BSDs, and NetBSD have stated a preference for not adding them to
theirs.
des [Sat, 2 Feb 2002 17:51:39 +0000 (17:51 +0000)]
Remove an unnecessary #include that trips up OpenPAM. The header in question
is an internal Linux-PAM header which shouldn't be used outside Linux-PAM
itself, and has absolutely zero effect on pam_ftp.
bde [Sat, 2 Feb 2002 09:50:45 +0000 (09:50 +0000)]
Don't declare our own common version of the library variable `ospeed'.
Include <termcap.h> to get its declaration. Our initialization of it
is still dubious, but it agrees with ncurses' documentation of it
(none) and with ncurses' recently fixed internals for it (old speeds
from <sys/ttydev.h>) and with the 4.4Lite documentation for it.
bde [Sat, 2 Feb 2002 09:37:20 +0000 (09:37 +0000)]
Don't declare the library variable `ospeed' without even getting its
type correct. Include <termcap.h> to get its declaration. Our
initialization of it is still dubious, but it agrees with ncurses'
documentation of it (none) and with ncurses' recently fixed internals
for it (old speeds from <sys/ttydev.h>) and with the 4.4Lite
documentation for it.
bde [Sat, 2 Feb 2002 09:32:09 +0000 (09:32 +0000)]
Don't declare our own common version of the library variable `ospeed'
without even getting its type correct. Include <termcap.h> to get its
declaration. Our initialization of it is still dubious, but it agrees
with ncurses' documentation of it (none) and with ncurses' recently
fixed internals for it (old speeds from <sys/ttydev.h>) and with the
4.4Lite documentation for it.
imp [Sat, 2 Feb 2002 06:50:57 +0000 (06:50 +0000)]
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
o Change
int
foo() {
...
to
int
foo(void)
{
...
imp [Sat, 2 Feb 2002 06:48:10 +0000 (06:48 +0000)]
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
imp [Sat, 2 Feb 2002 06:36:49 +0000 (06:36 +0000)]
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
o gc some #ifdef sun ... #endif code
imp [Sat, 2 Feb 2002 06:24:13 +0000 (06:24 +0000)]
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
imp [Sat, 2 Feb 2002 06:15:22 +0000 (06:15 +0000)]
Modernization effort for bin/c*:
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
imp [Sat, 2 Feb 2002 06:10:01 +0000 (06:10 +0000)]
Drag cat(1) kicking and screaming into the late 1980's:
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
rwatson [Sat, 2 Feb 2002 03:39:44 +0000 (03:39 +0000)]
o Add the prototype of cr_cansignal() from an earlier change to
kern_prot.c. This has apparently been sitting in my local tree for
ages, and has been generating a warning during the building of
kern_prot.o.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
mckusick [Sat, 2 Feb 2002 01:49:18 +0000 (01:49 +0000)]
In the routines vrele() and vput(), we must lock the vnode and
call VOP_INACTIVE before placing the vnode back on the free list.
Otherwise there is a race condition on SMP machines between
getnewvnode() locking the vnode to reclaim it and vrele()
locking the vnode to inactivate it. This window of vulnerability
becomes exaggerated in the presence of filesystems that have
been suspended as the inactive routine may need to temporarily
release the lock on the vnode to avoid deadlock with the syncer
process.
mckusick [Sat, 2 Feb 2002 01:42:44 +0000 (01:42 +0000)]
When taking a snapshot, we must check for active files that have
been unlinked (e.g., with a zero link count). We have to expunge
all trace of these files from the snapshot so that they are neither
reclaimed prematurely by fsck nor saved unnecessarily by dump.
bde [Fri, 1 Feb 2002 23:16:39 +0000 (23:16 +0000)]
Fixed syntax error in previous commit. It was non-fatal because it was
in conditional code that happens not to be compiled, and because gcc
doesn't complain garbage after #endif by default.
Fixed some style bugs in previous commit, 1.8 and 1.1.
obrien [Fri, 1 Feb 2002 19:38:44 +0000 (19:38 +0000)]
Use the stock 3.1-snap file now.
Until we can figure out how to reimpliment our custom format warnings
since the FSF developers totally revamped them, and took away the hooks
we were using to accomplish our desires.
alfred [Fri, 1 Feb 2002 19:25:36 +0000 (19:25 +0000)]
Remove bogus assertion in dup2 that can lead to panics when kernel
threads race for a file slot.
dup2(2) incorrectly assumes that if it needs to grow the ofiles
array that it will get what it wants. This assertion was valid
before we allowed shared filedescriptor tables but is now incorrect.
The assertion can trigger superfolous panics if the thread doing a
dup2 looses a race with another thread while possibly blocked in
the MALLOC call in fdalloc. Another thread may grab the slot we
are requesting which makes fdalloc return something other than what
we asked for, this will triggering the bogus assertion.
obrien [Fri, 1 Feb 2002 19:19:08 +0000 (19:19 +0000)]
Merge rev 1.2 (add_bb) into GCC 3.1-snap.
Note that the "NO_PROFILE_DATA"/"NO_PROFILE_COUNTERS" bits were added
to the stock FSF GCC 2.97 (and thus 3.1) source as i386 Linux needed them
also. (amazing what can get committed to the FSF GCC when needed by Linux...)
bde [Fri, 1 Feb 2002 17:27:14 +0000 (17:27 +0000)]
Made osigreturn(2) standard so that SYS_osigreturn can be used in the
signal trampoline for old signals. The arches that support old signals
currently abuse sigreturn(2) instead. This mainly complicates things
and slightly breaks the the new sigreturn(2).
COMPAT is too limited to support the correct configuration of osigreturn,
and this commit doesn't attempt to fix it; it just moves the bogusness:
osigreturn() must now be provided unconditionally even on arches that
don't really need it; previously it had to be provided under the bogus
condition defined(COMPAT_43).
bde [Fri, 1 Feb 2002 15:44:03 +0000 (15:44 +0000)]
Compile osigreturn() unconditionally since it will always be needed on
some arches and the syscall table is machine-independent. It was
(bogusly) conditional on COMPAT_43, so this usually makes no difference.
ia64: in addition:
- replace the bogus cloned comment before osigreturn() by a correct one.
osigreturn() is just a stub fo ia64's.
- fix the formatting of cloned comment before sigreturn().
- fix the return code. use nosys() instead of returning ENOSYS to get
the same semantics as if the syscall is not in the syscall table.
Generating SIGSYS is actually correct here.
- fix style bugs.
powerpc: copy the cleaned up ia64 stub. This mainly fixes a bogus comment.
sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
archie [Fri, 1 Feb 2002 02:21:41 +0000 (02:21 +0000)]
Some netgraph parse types (such as for the 'value' field in ng_ksocket's
'struct ng_ksocket_sockopt') like to peek into the ng_mesg header for
information. Make sure when generating default values that we provide
a valid header to peek into.
obrien [Thu, 31 Jan 2002 17:20:44 +0000 (17:20 +0000)]
MFC: gcc.295/config/alpha/freebsd.h revision 1.12:
Remove our definition for FUNCTION_PROFILER as it is wrong.
Note that "jsr $28,_mcount" is a macro for
ldq $27, _mcount($29) !literal!1
jsr $28, ($27), _mcount !lituse_jsr!1
1. The call to _mcount is added by alpha_expand_prologue after we load the gp.
Our _mcount uses $27 for the incoming address, unlike OSF/1 and Linux,
which use $28. This probably doesn't matter since we probably don't use $27
within _mcount itself.
2. You can't use this insn with _mcount because it uses the PLT, which clobbers
the return address in $28. Note that the prologue_mcount pattern carefully
avoids adding the lituse_jsr relocation so that we call through the GOT
directly.
bde [Thu, 31 Jan 2002 13:49:55 +0000 (13:49 +0000)]
Finish revs.1.23 and 1.24 so that MCOUNT_ENTER really actually compiles
for SMP in the plain profiling case. It seems to work too.
This error was not detected by LINT because LINT only compiles the
GUPROF profiling case, which is is a superset of the plain profiling
case for !SMP but which is so broken for SMP that the buggy code is
not compiled.
sheldonh [Thu, 31 Jan 2002 13:44:36 +0000 (13:44 +0000)]
Add $FreeBSD$ CVS Id tag so that I can merge rev 1.1.1.2 from the
vendor branch. This file was taken off the vendor branch in 1998,
before we started enforcing the presence of CVS Id tags. :-(
bde [Thu, 31 Jan 2002 13:26:29 +0000 (13:26 +0000)]
Modified the rules for vendor ids:
- explictly say not to edit infrastructure for vendor ids (not just the
ids).
- say to enclose vendor ids and their infrastucture in ``#if 0'', and
partly explain why.
- don't set a bad example by mangling the Berkeley id infrastructure from
``static char sccsid[] ...'' to ``__RCSID(...)''.
- show a blank line between the vendor id cruft and the FreeeBSD if cruft
in the example.
- relaxed the rule about adding "From: " to say that "From: " is actually
useful if the file has been renamed.
- minor English improvements.
bde [Thu, 31 Jan 2002 12:58:36 +0000 (12:58 +0000)]
Fixed world breakage due to missing include of <sys/cdefs.h> in previous
commit.
Fixed related style bugs:
basename.c: misplaced '#if 0'
dirname.c: misplaced '#if 0'
getgrent.c: missing '#if 0', and tab lossage in vendor id (the previous
commit fixed the complete corruption of the vendor id but
lost a tab)
getpwent.c: missing '#if 0'
takawata [Thu, 31 Jan 2002 09:18:27 +0000 (09:18 +0000)]
Fix irq/drq handling. IRQ and DRQ resource information can be get
in one object for one resource. Array of values in a object means
possible values for the object.
matusita [Thu, 31 Jan 2002 00:38:09 +0000 (00:38 +0000)]
In revision 1.351, All files/directories in ${CHROOTDIR}/usr/ports/distfiles
are removed, because ports.tgz includes distfiles by accident.
However, removing files/directories is *not* mandatory. The only
requirement is "ports.tgz doesn't include distfiles/* but distfiles
directory itself". If this is correct, the right way is to set an
option to tar(1), not to include these files.
This commit is based on PR: 34194, but a little bit of modification
is made by me (original patch doesn't include 'distfiles' directory).
PR: 34194
Reviewed by: Adrian Steinmann <ast@marabu.ch> (PR submitter)
MFC after: 9 days
rwatson [Wed, 30 Jan 2002 21:37:32 +0000 (21:37 +0000)]
o Reserve two interface ioctl values, 38, and 38, for SIOCGIFMAC and
SIOCSIFMAC, which are for the Mandatory Access Control
implementation. This will prevent collisions on the p4 development
branch.
des [Wed, 30 Jan 2002 19:13:23 +0000 (19:13 +0000)]
Add pam_self(8) so users can login(1) as themselves without authentication,
pam_login_access(8) and pam_securetty(8) to enforce various checks
previously done by login(1) but now handled by PAM, and pam_lastlog(8) to
record login sessions in utmp / wtmp / lastlog.