This can be used in /etc/security to allow special.local to override
types of entries in special (e.g, replacing a dir with a link).
Rename Wflag to mtree_Wflag, to be more "external namespace" friendly.
_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
* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h
* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.
These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
"0700, modified by umask", to "0777, modified by umask".
This matches the behaviour of mkdir(1) and just about every other command...
This change is useful when running with '-W', where the mode of the
new directory won't be changed to what's specified in the specfile.
(I.e, an UNPRIVED build, with a umask of 022).
and then all the other fields. (I.e, like -D except with the name
first instead of last).
Consistenly strsvis(3) encode path names (even for -C and -D).
instead, rely upon libnbcompat to provide a workaround (which returns
an error if the target is a symlink).
Should fix another MacOS X build issue due to missing lchown(2).
that HAVE_STRUCT_STAT_ST_FLAGS implies this.
- Set HAVE_LCHFLAGS for native builds
- Clean up {CLEAR,SET,CHANGE}FLAGS macros, and only provide if
HAVE_STRUCT_STAT_ST_FLAGS is set.
(Fixes compilation as a tool on MacOS X, noted by Allen Briggs.)
the specfile don't confuse things. doesn't affect the default
(physical) operation, and shouldn't affect logical either.
- slightly rework how miss() is implemented so that duplicated code is
reduced and links may optionally have a mode, uname and/or gname.
round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.