David E. O'Brien [Fri, 22 Feb 2002 19:05:22 +0000 (19:05 +0000)]
The existing bazaar and site-specific policy in rc.diskless1 is Just Wrong;
and looks like no other Unix diskless configuration I've ever seen.
Thus allow a more traditional /etc.
Note, the use of an MFS /var should also be settable.
Otherwise installing ports(packages) is just a total PITA.
(Belatedly) add the required EXPORT_SYMS. I'm not sure the list is complete,
but at least linprocfs works (I haven't had the opportunity to test other
stuff that depends on the linux module, like aac or tdfx)
Bruce A. Mah [Fri, 22 Feb 2002 16:26:38 +0000 (16:26 +0000)]
Modified release note: Binutils update. While I'm here, fix a minor
grammatical mismatch ("Binutils" is the name of a package and
therefore is singular, not plural).
John Birrell [Fri, 22 Feb 2002 04:26:54 +0000 (04:26 +0000)]
Fix a bug where a short write to a non-blocking socket would
leave the descriptor locked, causing other threads to hang
if they happened to access the socket.
Bill Fumerola [Thu, 21 Feb 2002 18:13:31 +0000 (18:13 +0000)]
staticize functions and variables
change function declarations to ANSI
change a variable that stores sizeof() values to size_t
use return to escape the end of main(), not exit(3)
Bruce Evans [Thu, 21 Feb 2002 12:07:21 +0000 (12:07 +0000)]
Fixed printf format errors. In printgprof.c, also convert the scale
without possibly losing lots of precision, and print the scale using
%g instead of %d in case it is non-integral. %g might not be the best
format for this.
Bruce Evans [Thu, 21 Feb 2002 12:03:06 +0000 (12:03 +0000)]
Added missing copyright. Obtain one and a vendor id from gprof.c. aout.c
was split off from gprof.c in rev.1.7 of the latter. elf.c is mostly new,
but the old copyright sort of applies to it and is better than none.
Ruslan Ermilov [Thu, 21 Feb 2002 10:23:41 +0000 (10:23 +0000)]
Obviate the need to set the COMPILER_PATH and LIBRARY_PATH in Makefile.inc1
to pick up the correct cross-tools (the compiler executables and binutils)
and special linker files (crt*.o). This is now controlled by a single knob,
TOOLS_PREFIX, when building cross-tools.
Fixed regression in Makefile.inc1,v 1.203 (-nostdinc). This clobbered target
architecture's CFLAGS with building host's CPUTYPE setting in /etc/make.conf,
and had a nice but nasty side effect of exposing some (normally hidden) bugs
in system headers.
(Attempt to move the "-nostdinc -I..." part of CFLAGS into the new CINCLUDES
(modeled after a similar CXXINCLUDES) eventually failed because hard-coding
${WORLDTMP}/usr/include to be the first in the include list does not always
work, e.g. lib/libbind.)
Compensate the -nostdinc removal by making cpp(1) built in the cross-tools
stage to not look for <> header files in the building host's /usr/include
(already committed as gnu/usr.bin/cc/cc_tools/freebsd-native.h, revisions
1.10-1.12, STANDARD_INCLUDE_DIR).
(Disabling the use of GCC_INCLUDE_DIR in the FREEBSD_NATIVE case would fix
the duplicate above.)
Get rid of the (now unneeded) -I${DESTDIR}/usr/include magic in bsd.prog.mk
and bsd.lib.mk. Finish the removal of LDDESTDIR in bsd.lib.mk,v 1.55 -- we
no longer have users of it.
The required changes to gcc were already committed as contrib/gcc.295/gcc.c,
revisions 1.23 and 1.24.
Basically, this allows for the changes above plus makes gcc(1) persistent
about path configuration, whether it's configured as a native or a cross
compiler:
Bruce Evans [Thu, 21 Feb 2002 07:12:57 +0000 (07:12 +0000)]
Moved the definition of the machine-independent macro UNITS_TO_CODE
from <number of machines> machine-dependent headers to the one
non-header here it is used so that it is easier to fix. This macro
just divides the machine-dependent offset OFFSET_OF_CODE by the
machine-independent scale factor sizeof(UNIT), as required for bug
for bug compatibility with the scaling of pc's in gprof.c. UNIT is
the type of a profiling counter, and its size has nothing to do with
the correct scale factor except both are usually 2.
Bruce Evans [Thu, 21 Feb 2002 05:52:49 +0000 (05:52 +0000)]
Reserved one of the spare fields in struct gmon to record the history
counter type, as threatened in rev.1.8 (the density doesn't need to
be recorded since it can be derived from other fields). This doesn't
affect binary compatibility, but new utilities won't be able to depend
on the contents of this field because libc/gmon/gmon.c was broken --
it wrote garbage to the spare fields.
Added a history counter type field to struct gmonparam. This breaks
binary compatibility a little, since kgmon wanted to read the whole
struct. Fixed kgmon to only depend on reading the critical earlier
parts of the struct. This should also fix 6+ year old breakage of
binary compatibility when the profrate field was added.
Only initialize the new field in struct gmon for now, so that the
compatibility code for this (in kgmon) gets tested. The compatibility
code has to guesstimate the value. The new field in struct gmonparam
is for the kernel to initialize so that kgmon doesn't have to guess.
Bruce Evans [Thu, 21 Feb 2002 04:37:55 +0000 (04:37 +0000)]
Recover bits that were lost in transition in rev.1.76:
- P_INMEM checks in all the functions. P_INMEM must be checked because
PHOLD() is broken. The old bits had bogus locking (using sched_lock)
to lock P_INMEM. After removing the P_INMEM checks, we were left with
just the bogus locking.
- large comments. They were too large, but better than nothing.
Remove obfuscations that were gained in transition in rev.1.76:
- PROC_REG_ACTION() is even more of an obfuscation than PROC_ACTION().
The change copies procfs_machdep.c rev.1.22 of i386/procfs_machdep.c
verbatim except for "fixing" the old-style function headers and adjusting
function names and comments. It doesn't remove the bogus locking.
Matt Jacob [Thu, 21 Feb 2002 01:56:08 +0000 (01:56 +0000)]
Fix a problem where a local loop disk logs out- and we get a PORT LOGGED
OUT status. We are, apparently, required to force the f/w to log back in
if we want to try and talk to that disk again. This means either issuing
a LOGIN LOCAL LOOP PORT mailbox command, or by issuing a LIP. I've elected
to issue a LIP because this has a better chance of waking up the disk which
clearly just crashed and burned.
These should not occur at all. If they do, they should be darned rare.
Peter Wemm [Wed, 20 Feb 2002 23:35:56 +0000 (23:35 +0000)]
Commit some infrastructure for turning on -Werror for kernel compiles.
It doesn't actually do it yet though. This adds a flag to config so
that we can exclude certain vendor files from this even when the rest
of the kernel has it on. make -DNO_WERROR would also bypass all of it.
Peter Wemm [Wed, 20 Feb 2002 22:25:54 +0000 (22:25 +0000)]
Pass me the pointy hat please. Be sure to return a value in a non-void
function. I've been running with this buried in the mountains of compiler
output for about a month on my desktop.
David E. O'Brien [Wed, 20 Feb 2002 19:41:54 +0000 (19:41 +0000)]
Allow for better control over the GCC front-end when building a cross
compiler.
* Undo the diking out of cross compiler logic from gcc.c rev 1.16.
* Add the `CROSS_STARTFILE_PREFIX' knob.
* Add our own definition of `STANDARD_INCLUDE_DIR'. This should have been
included in freebsd-native.h rev 1.5.
* Minimize a little bit more, things we dike out in the FREEBSD_NATIVE case.
Luigi Rizzo [Wed, 20 Feb 2002 17:15:57 +0000 (17:15 +0000)]
BUGFIX: make use of the pointer to the target of skipto rules,
so that after the first time we can follow the pointer instead
of having to scan the list.
This was the intended behaviour from day one.
Jonathan Lemon [Wed, 20 Feb 2002 16:47:11 +0000 (16:47 +0000)]
When expanding a syncache entry into a socket, inherit the socket options
from the current listen socket instead of the cached (and possibly stale)
TCB pointer.
Warner Losh [Wed, 20 Feb 2002 16:20:27 +0000 (16:20 +0000)]
Check the status of the card bridge first thing, rather than last in
the loop. This fixes the "my card is in the laptop on boot, but
doesn't attach" problem.
Add u_int16 prodext value in CISTPL_MANF_ID. This gets a fifth byte
when manufacturer id tuple length is 5. This change is for xe driver.
This is a dirty hack. But there is no better idea.
Andrew R. Reiter [Wed, 20 Feb 2002 14:30:02 +0000 (14:30 +0000)]
- Style.9 formatting fix; this commit is mostly white space related with
the next commit actually doing the:
return val; -> return (val);
changes. This commit was done in preparation for getting ``struct
modules'' locked down.
Crist J. Clark [Wed, 20 Feb 2002 10:31:01 +0000 (10:31 +0000)]
There is no reason to demand the administrator set 'natd_interface'
when running natd(8) out of the rc-files. It is perfectly valid for
the interface or alias address to be set in a natd(8) configuration
file, not on the command line. Also, loosen up the restrictions on
identifying an IP address argument in 'natd_interface.'
Fix the documentation, rc.conf(5), to reflect this change.
Take the bogus default for 'natd_interface' out of /etc/defaults/rc.conf.
David E. O'Brien [Wed, 20 Feb 2002 03:10:54 +0000 (03:10 +0000)]
Do not define a 'MD_EXEC_PREFIX'. It is not needed, not used in the
cross case, and just ends up causing "/usr/libexec" being added to the
library search path.
Also remove misleading comment about 'STANDARD_EXEC_PREFIX'. It is needed
if one does not set 'MD_EXEC_PREFIX'.