until the problem gets addressed properly. The following fix
is a stopgap measure to stop the leaking :-(
I fixed the t_getstr() memory leak problem, but that instantly
revealed a problem in t_agetstr() which is an extremely broken
interface. It realloc's memory, potentially moving the area where
it returned pointers into in previous calls. This function needs
to be removed and or changed. I added a horrible work-around for
now, but I will revisit the problem shortly. In the meantime nobody
should be using the t_agetstr() API, and I'll be fixing the rest
of the programs and or the API when I figure out the best solution...
This is t_agetstr() is used by:
games/hack/hack.termcap.c
games/larn/io.c
games/tetris/screen.c
lib/libterm/termcap.c
lib/libterm/termcap.h
libexec/getty/main.c
usr.bin/top/screen.c
usr.bin/ul/ul.c
a non-_STANDALONE environment (e.g. installboot(8)): internalize and
externalize the exec, program, and section headers as necessary.
Reviewed and OK'd by Christos.
* Allow MACHINE to be set automatically on NetBSD native builds.
Require -m only if the host is not NetBSD.
* Fail if DESTDIR is set to root (/) and the build is not NetBSD native,
or the build is attempting a "make release" (option -R).
* Warn the user if DESTDIR is set to root (/) that the kernel must be up
to date, or else the build might hose the system. Also, do not remove
DESTDIR on -r if it is set to root.
* Fail if TOOLDIR is set to / or empty after checking with nbmake.
* Allow DESTDIR and TOOLDIR to be set in mk.conf and/or by the new default
from <bsd.own.mk>. Note that if -T is not used to set TOOLDIR, and
TOOLDIR is not set in the environment, then nbmake will always be
bootstrapped (rather than looking at nbmake's timestamp). This is
because /bin/sh doesn't know how to get TOOLDIR from mk.conf without
first having nbmake (...which lives in TOOLDIR).
* Do a pass of "make obj" through src/tools before installing nbmake (so
long as -o/MKOBJDIRS=no is not specified). This ensures that objdirs
exist if they are desired, and paves the way for using build.sh to
build all the src/tools without building everything else.
* Add "-w" option, which allows the builder to specify where the nbmake
wrapper shell script should be created. If not specified,
$TOOLDIR/bin/nbmake-$MACHINE is still created as a default.
* Print the values of DESTDIR and TOOLDIR after bootstrapping nbmake,
for informational purposes.
It should now be possible to type just "./build.sh" on a NetBSD-current
host and get a new build in / for the appropriate architecture.
However, building in-place like this has *not* been extensively tested
yet, so be careful.
('Does i386 support NTFS5 now?'):
add a note both NTFS4 and NTFS5 are supported
reformat the Limitations a bit
assert the write support is not really useful, and should not be used
add a BUGS section, note missing stuff for the write support to be useful,
and the disk label thing spotted by Christos Zoulas
unset on unload), similarily to what i386/machdep.c does #ifdef
COMPAT_SVR4. This makes the svr4 LKM actually work on i386.
XXX kind of ugly, but doing this more generic way would be overkill
restore %fs/%gs appropriately.
Fixes kern/14275 - compat svr4 works on i386 again :)
Thanks to MOCHIDA Shuji for initial investigation on the issue, that helped
to find the bug a lot.
and non-standard inttype-like types, pull in <sys/types.h> if
_KERNEL or _STANDALONE and <inttypes.h> otherwise, and use standard
inttype types.
Discussed with and OK'd by Christos.
using `uname -s`-`uname -r`-`uname -p || uname -m`. This can be overridden
in mk.conf or the environment, and is used by host tools to ensure that
build hosts do not clobber each other.
* Now that there's an objdir in src/tools, make a default TOOLDIR by creating
"tools.${HOST_OSTYPE}" in the objdir (if it exists) of src/tools. This
means that TOOLDIR is no longer required to be set in a build, though it
still may be set manually if desired.
* Set MKTOOLS to "yes" by default, since the default TOOLDIR is now located
in a known mutable location. This may still be set manually if desired.
defined, as <bsd.own.mk> always sets it; also, compare only against "yes"
(not "no") for a yes/no check, as there are two negative states ("no" and
"never").
* Don't return if wait()ing for the child is interrupted.
* Fix a race condition for the parent's SIG{INT,QUIT} disposition.
* While we're here, convert from using signal(3) to sigaction(2).
* Replace chdir_verify_path() with Main_SetObjdir(), which can be called
externally, and can take a "const char *". (There's a lot of non-const
"char *" passing around in var.c of what should be const strings....)
* Rewrite the initial "find my .OBJDIR" code to make use of the new
function. This still functions as it had in the past, but the comment
above this block was changed to reflect reality: if MAKEOBJDIRPREFIX
or MAKEOBJDIR are set in the environment, then *only that value* is
tried; make does not fall back to obj.MACHINE, obj, and /usr/obj/`pwd`
as it would without these env vars set.
* Add a new special target, .OBJDIR:, which when parsed will cause make to
change to a new object directory and reset .OBJDIR, and PWD in the
environment. This will allow some makefiles (mainly, src/tools)
to override the default objdir semantics in order to add custom logic.
quoting, so the commands were thought to be one big word with embedded
whitespace)
* New options:
-O obj Set root of an obj tree; sets MAKEOBJDIR to an appropriate
substitution pattern.
-o Sets MKOBJDIRS=no (otherwise sets MKOBJDIRS=yes)
-u Sets UPDATE