_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
and exponential hashtable growth for tracking previously seen inodes.
This replaces the O(n^2) behavior of linkchk() with an implementation
that should be O(n*logn)
This addresses NetBSD PR bin/25857
on subsequent calls. Newterm() would fail after a few calls, leading to vi
exiting with a "ex/vi: error initializing terminal" message
. if tcsetattr() fails due to EINTR, ignore it
Fixes PR #25849
buffer was a backslash. This closes PR bin/25899.
Patch was borrowed from FreeBSD. Their log says:
Fix a bug in sed(1)'s "s" command wherein if an escape ("\"
character) was initiated at the last character of the line buffer,
the Wrong Thing was done and sed barfed by interpreting the
following NUL byte as a digit. Instead, pull up the next buffer
and record that the "\" was last seen.
OK'ed by jmc@.
clarify the circumstances under which the compiler/linker will
merge strings (identical & read-only; how could it do otherwise?)
This, and the other stuff Christos has done is partly an answer
to PR 25835.
<- and -> move within the field
-> will pull default string into empty buffer
^H (etc) will delete default string from buffer (first press)
Put default string into display buffer if long and input in box.
Scroll input text if longer than space on line.
- fix any decompression on corrupted gzip files. PR#25508
- ask to overwrite files if we have a tty, rather than failing the
operation. PR#25509.
- clean up maybe_err()/maybe_warn(): use maybe_err() only for fatal
errors. maybe_warn() is for processing errors. this allows
"gzip -d file1.gz file2.gz" to decompress file2.gz even if file1.gz
is corrupted, etc.
- change the internal compressor/decompressor API to return "-1" on
failure, not 0. this allows for 0-sized files to be decompressed
correctly.
definitions shadowing other variables.
Pass storage for file names into the file_compress and file_uncompress
functions, so that we don't run the risk of leaking memory. Remove a global
variable that's no longer needed.
name when gunzip'ing via strdup(3). Fixes a bug whereby the new
filename would appear as gibberish when verbosely gunzipping.
Fix an off-by-one error when allocating the filename with added suffix,
and properly NUL-terminate the new filename.
It's NULL, not 0, in char * assignments - there are some still to do here.
target) instead of using home-grown 'distribution' targets or using
FILES with the 'install' target.
Add some etc/ subdir Makefiles where appropriate.
XXX: some of etc/Makefile install-etc-files could be converted to CONFIGFILES.
conflicts.
XXX: Fix the conflicts.
1. chio: change to 'x' from 'c' so that it does not conflict with cdio.
keep the 'c' ioctls in the driver for compat.
2. ppp/slip: change SLCGUNIT to some other number and accept the old number
in the driver.
3. ipf: [3 instances] Have darren fix them.
Its not posix compliant and serves very little purpose.
With this change compat and jobs modes are consistent wrt how
they treat each line of a script.
Add support for the '+' command line prefix as required by posix.
Lines prefixed with '+' are executed even when -n is given.
[Actually posix says they should also be done for -q and -t]
PR:
Reviewed by: jmc
Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().
It's now possible to build make on some hosts with: cc *.c */*.c
We can't keep a reference to data returned by libdb after a subsequent call to
any other libdb function on that DB.
Fixes a bug reported privately by Miho Taniyama (thanks!)... and hopefully
other hard-to-reproduce bugs.
anymore, use the low-level inflate()/deflate() directly. this
allows support file-type detection on stdin; now can decompress
.Z and .bz2 files fed to stdin (fixes PR#25192) additionally it
makes -v work with stdin or stdout (fixes PR#25215.)
(with these changes, we no longer need gzopenfull(3) in libz.)
thanks to martin@ for the code gzip.c:gz_uncompress() is based on.
Notes:
* The immediately previous version of make errored out on --,
which is what needs fixing.
* Historic bsd make silently ate -- and continued to process
options, so this is a behavior change from that, too, but presumably
there is more to gain in fixing it than in being bug-compatible.
* types are added to (rather than overriding) the default list
* Still use "ignorefs none" to clear the list (including the default list)
* Fix argument parsing when using "none"
This makes "ignorefs" much more useful if you just want to add another
fstype to the default list.
Simplify variable assignment.
This makes it possible to use expressions like
${("${LIST:Msomething"}):?present:absent}
it also makes treatment of lhs and rhs more consistent, and
makes CondToken easier to read.
Update unit-test/cond1 to test new features.
until it's writable or it fails with something other than EINTR.
This matches the behaviour in SUSv3, and prevents the problem when
pressing ^T (SIGINFO, which is marked as restartable) during connection
setup would cause ftp to fail with EADDRINUSE or EALREADY when the
second connect(2) was attempted on the same socket.
Problem found and solution provided by Maxime Henrion <mux@freebsd.org>.
which is a more generic "that's not in the tree" response.
ENOPROTOOPT was specific to the net subtree under the old framework,
and didn't add much value (other than letting the caller know they
were looking up something under the net subtree, which they presumably
ought to have known already).
Just continue. This matches the man page, the POSIX standard, and even the
comment above that code!
From OpenBSD, via jmc@openbsd, via wiz@netbsd.
POSIX part confirmed by kleink@netbsd
:-)
- use getprogname everywhere
- fix bug where if no .vacation.db existed, and the first message was not
suitable for reply, vacation would create a 0 length db file, and from
then on it would fail to process.
- handle e-mail address parsing better.
they are indirectly gotten from kernel memory and as such should be read
with KVM_READ.
This fixes fstat core dumps when some process holds a reference in a Linux
ext2fs filesystem.
Thanks to Aleksy Schubert (alx.at.mimuw.dot.edu.dot.pl) for debugging this
with me.
the temporary file even if the test program is executed given its full path.
That is, running /somewhere/test.sh could result in a call to mktemp like
mktemp /tmp//somewhere/test.sh.XXXXX, which fails.
Fixes PR misc/23447 by Piotr Meyer.
- fix bug where if a program appeared in more than one place it would
erroneously exit(2)
- fix error messages to use err and errx as appropriate.
- made sure we don't pick up directories or non executable files.
It was docuemented to work for *csh users only, and all *csh have a builtin
of that name, which works even better. All other shells have similar
builtins, and this led to confusion several times. Fixes PR 13462.