existence and value are machine-dependent, and using KERNBASE
either breaks binary compatibility across the same MACHINE_ARCH
or prevents this program from compiling at all.
some of the symbols can't be found
- Only kvm_nlist() hashnl[] and histnl[] once
- Add a description to struct kernel_hash, and print with -L
- Sort entries in khashes[]
- Don't exit on unknown hashes; just display a warning and move on
isn't generally enabled by default, and i wanted -h for something else.
- implement -h, which displays statistics for various kernel hash tables
- add deref_kptr(), which does the hard work of kvm_read() et al
- various minor cleanups
XXX Note that the overflow code for many cases seems to be buggy. I've
only fixed one bug that was bothering me. A set of regression tests
and extensive testing are needed.
than *'s.
2) On displays that handle color, do a cheesy white-on-blue theme.
As silly as it may seem, many people seem to respond better to color
and nice borders for sysinst.
XXX will rig up a way to do this more cleanly.
a refCount of 1 to indicate its presence on sufflist. Hence suffixes were
being removed by Suff_EndTransform() and being freed before all the
referential links were removed. This resulted in a malloc warning on 1.5.x:
make in free(): warning: chunk is already free.
This could be reproduced with the following simple Makefile passed to
"make -r":
=====
.SUFFIXES: .l .c
.l.c:
foo:
* Provide some GNUisms as extensions.
* Provide dynamically growable string space.
* Make define(defn(foo)) work correctly for builtins.
(The current version is supposed to be capable of satisfying autoconf.)
All still relevant NetBSD changes have been preserved in this version, and
formatting and style fixes have been applied in various places.
Thanks to Masao Uebayashi <uebayasi@soum.co.jp> for pointing this out.
* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.
* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.
* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.
* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).
* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.
* Add src/tools/groff and set up paths to work with this cross groff.
Instead of skipping the PWD check entirely, add a skip of the PWD override
if MAKEOBJDIR is set and contains a variable transform ($). This has
similar problems to what happens if MAKEOBJDIRPREFIX is set.
file will strip any leading path on the filename when searching ${.CURDIR}.
This bug manifested itself more prominently with xsrc/xfree/xc/lib/GL/GL,
since we now always search ${.CURDIR} as an alternative to ${.OBJDIR}
(PR bin/14499).
breaks too many situations, including MAKEOBJDIR with a :C,foo,bar,
transform in many cases. It's ambiguous and unreliable, as the comment
above that code always indicated. In order to have reliable objdirs, they
need to work the same way Every Time.
(Note that taking this out is not a performance hit; we were already doing
the getcwd() call first. So the getenv("PWD") didn't increase performance.)
* 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.
(This splits out the "default system include paths" into its own Lst
variable, and uses it only if sysIncPath is empty. This allows sysIncPath
to be filled in by the Makefile itself.)
aren't going to do anything with the information anyway and there is
error checking later anyway.
We can now succeed in creating symlinks to locations that don't exist,
just as ln -s will let us do, and we can use install instead of ln -s
in several Makefiles. The code was written with the obvious intent to
let you do this but apparently it was never tested.
pull the correct one in based on the MACHINE_CPU variable.
MACHINE_CPU will be set according to the target system we are
building for by <bsd.own.mk>.
One component of addressing bin/14280.
by defining the (newer) CUT_LINE_TO_EOL define in common/cut.h and using it
where due.
Bug reported on current-users by Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
diagnosed by Bang Jun-Young <bjy@mogua.org>,
quick-fixed by Robert Elz <kre@munnari.OZ.AU>.
/etc/passwd and /etc/group (as well as concept of file flags) as the target.
Rather than look up users, groups, or flags with -U, do what the manpage
indicates: don't even try changing them. If -M is specified, use the
strings that are passed in via options with "gname", "uname", and "flags"
in the resultant mtree file, rather than retranslating them back from numbers.
make sure that the dir actually exists. In compat mode the corresponding
chdir simply fails and all is well - the issue only arises when playing
tricky games with the value of .CURDIR.
Reviewed: christos
installed file or directory to `log'. This is primarily designed
to be used in conjunction with -U, but that's not mandatory.
Provide metadata_log() to do the hard work. The log file is opened
for append at the start, and flock(LOCK_EX) is used to prevent
interleaved output (from multiple concurrent install(8) operations).
- Improve parsing of owner and groups (e.g., strtoul() instead of atoi()),
and don't rely upon uid==-1 to indicate "no owner"; use a flag instead.
- Make fileflags a global variable; uid, gid, and mode are, so lets be
consistent...
- Improve -U (unpriv); work on file flags as well, and only try to change
the file flags after the temporary file is renamed (since certain flags
will prevent the rename from working).
stuff up, correct the usage message and update the manpage to match.
Note that the new options aren't wonderfully useful, since cd(4) at least
promptly unlocks the drawer when eject closes the device.
it's not set, default to -Os (so it's not hard coded into the binary.)
Generate a makefile by default that does all object file builds in local
subdirs by binary (i.e. bad144 gets built in $OBJDIR/bad144) via a reach over
make. (Sets .PATH and .CURDIR and does a make for the objects needed in that
dir).
Add a -o option that does the old behavior of searching for obj files by
querying the various object environment vars and searching. Without this
option none of the objdir special options, environment vars, etc will have
effect.
Document all the changes in the man page (and specificly note that without -o
none of the objdir functions take effect).
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).
Improved by comments from enami and christos -- thanks!
Heimdal/krb4/KAME changes already fed back, rest to follow.
Inspired by, but not not based on, OpenBSD.
1) Always do a make clean before building objects in any directory. This
is wasteful, but there's really no other simple way to cope with the
fact that the compilation settings (e.g. CFLAGS) appropriate for the
non-crunched build of a program may not be appropriate for the crunched
build. If the objdir magic in make didn't rely upon the presence of an
"obj" or "obj.${MACHINE}" symlink, we could abuse it to handle this but
unfortunately, it does.
2) Override $DBG to cause object files to be built with -Os. We can't emit
"DBG?=" into the generated makefile because of order-of-inclusion issues
with the system Makefiles; the result would be that the default setting
(currently -O2) would always be used instead of -Os. If you're crunching,
you almost certainly are doing it to get a smaller executable (!) so -Os
is almost certainly appropriate for you.
(and use ENTIRE_LINE instead of 0 where appropriate)
This fixes a bug in the dw command with for example:
<cursor>
a b c
~
~
if you hit dw there, only the empty line would be killed but both the empty
line and the subsequent one would be pasted when asked for with P for example.
- Don't need to include <sys/time.h>, <sys/resource.h> does.
- Include <limits.h> for LONG_MIN/LONG_MAX.
- Be consistant with usage of (void) in front of printf()/fprintf().
- Sort include files.
- ANSIfy.
because of a weird umask for example.
Make it exit instead.
This differs from the OpenBSD behaviour and is believed to be more correct.
Reported by Thomas Klausner in private e-mail, followed by a small discussion in
tech-userlevel a while ago.
- display clean flag
- fix wording of block size and fragment size
- use correct offsets for minfree, rotdelay and rps
(at least, correct for NetBSD and Solaris 2.6/sparc)
per PR 11417 and subsequent discussion with Robert Elz & others.
the length check is still enforced in skeyinit(1), but at least this
change allows older skeykeys to be used. -f is now a no-op.
We now just list the names of such variables in .MAKEOVERRIDES.
When we come to export MAKEFLAGS we quote the value of each exported variable
using :Q, using: ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@}
The :O:u suppresses duplicate names.
Also modifed Parse_DoVar to re-export MAKEFLAGS whenever .MAKEOVERRIDES
is assigned to so .MAKEOVERRIDES+= PATH will export PATH=${PATH:Q}
to the environment, while .MAKEOVERRIDES= will disable export of VAR_CMD's.
From Var_Set: We actually want the equivalent of
.MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val'
clearing the previous value for name is important, since
doing simple duplicate suppression does not handle:
$ make FOO=goo
which then runs a sub-make with FOO=boo
the commands from that sub-make should see just FOO=boo.
via MAKEFLAGS. Instead of appending them directly to .MAKEFLAGS, put
them in .MAKEOVERRIDES (and ensure they are quoted). This is now done
in Var_Set when it exports VAR_CMD's.
Use ExportMAKEFLAGS() to export MAKEFLAGS, using the combined content
of .MAKEFLAGS and .MAKEOVERRIDES (with duplicate supression).
If .MAKEFLAGS is assigned to in a Makefile, ExportMAKEFLAGS is called again.
This allows a line like:
.MAKEOVERRIDES=
to effectively stop the exporting of the command line vars in MAKEFLAGS.
1. make -dx turns on DEBUG_SHELL which causes sh -x to be used where
possible.
2. PrintOnError() is now called when make is stopping due to an error.
This routine reports the curdir and the value of any variables listed
in MAKE_PRINT_VAR_ON_ERROR.
3. Variables set via command line, are propagated to child-makes via
MAKEFLAGS. This behaviour appears to be necessary for POSIX (according
to the GNU folk anyway).
4. Do not reset MAKEFILE when reading ".depend" as this rather eliminates the
usefulness of ${MAKEFILE}.
5. Added ${.newline} as a simple means of being able to include \n in the
result of a :@ loop expansion.
6. Set ${MAKE_VERSION} if defined. Need to come up with a useful value.
Reviewed: christos
- convert to ANSI KNF
- remove trailing whitespace
- translate some comments from german into english
code compiles and runs clean, and tested by running "make lint" against
xlint source using previous and this lint produces same results.
- better error checking for read/write failures
- new install/configure/Makefile and support scripts (we don't use)
- don't allow 0 delay for non-root accounts
XXX: Someone needs to coordinate to feed back our prototype fixes to Jeff!
actually read already. Albeit it's not damaging to copy zero data
for bufend == crec->data case, the buffer end could also be between
memory position 'crec' and 'crec->data'. Thus, we could end up with
negative 'bufend - crec->data' value, and obvious havoc.
This change fixes lib/12673, though the problem was masked and no longer
repeatable with the provided example after the recent buffer size bump.
The change was tested with the buffer size change backed off, and really
fixes the problem in the PR.
if needed and record count is within bounds (<MAXNUM), rather than
sorting the input by 64KB chunks. This cuts the number of needed
temporary files considerably (and improves performance, too).
Slighly adjust some #defines, mostly to power of 2 values.
This addresses bin/12673 and bin/12614, as well as complains from other
people.
Bug reported privately by Nicolas Ollinger <nollinge@ens-lyon.fr>.
You can trigger this bug prior to updating your sources with for example:
% cat > Makefile <<EOF
.DEFAULT:
a
EOF
% make