systems which have both statfs() and statvfs().
while it would be nice to have an OS-independent way of testing
whether to use our statfs() implementation, in reality it is much more
reliable to only use it where required.
using statvfs() on systems that provide it. I'm assuming that the
SVR4 statvfs() is a standardized call across systems that have it.
This should allow IRIX to build the statfs call into libnbcompat.
getopt.h implies having getopt_long. Also Fix checks for setmode, pwcache,
and vis so that if any of a list of functions is missing, then use the
nbcompat versions.
version are removing sha2* object files from libnbcompat.a. It turns
out that the functions defined there aren't provided by NetBSD, so it
makes no sense for libnbcompat to define them, and none of the
utilities in pkgsrc that link against libnbcompat actually use these
functions anyway.
include:
* Move headers out of the global namespace and into the nbcompat
directory. Since there are no headers other than nbcompat.h in
${PREFIX}/include/libnbcompat, just install it directly in
${PREFIX}/include. Using libnbcompat is now a matter of including
nbcompat.h at the top of *.c files and linking against -lnbcompat.
* Only build functions into libnbcompat.a if they aren't already in
the system libraries.
* Move several *.[ch] files that are pax- or mtree-specific out
of libnbcompat (they should belong with those packages).
On NetBSD 1.6 systems, libnbcompat.a now contains just the bare minimum:
the sha2 routines.
symbol and comment in nbconfig.h.in for us in the correct place. The
previous way of using AH_BOTTOM also worked but separated the symbol
definition from the accompanying C comment text, which was a little harder
to maintain.
* Properly declare statfs() and fstatfs() if we use the libnbcompat
versions.
* Move some headers into a private directory in the installed
location so that they don't override headers of the same name
on the system.
* Define TAILQ_HEAD_INITIALIZER if it doesn't exist.
* Add a poll() implementation using select() for poll()-less systems.
Thanks for Charles Blundell for the implementation!
* Fix the vis.h check for systems whose vis() is not as featureful
as NetBSD's.
are moving the definitions of the TAILQ accessor methods into the top level
of nbcompat.h. This should fix using nbcompat.h to replace sys/queue.h
on Linux systems.
* Don't install namespace.h, extern.h and stat_flags.h, which are
only used internally.
* Clean up util.h by using '#if !HAVE_xxx' instead of
'#ifndef !HAVE_xxx', removing some LIST_* definitions that are
defined by <nbcompat.h>, and removing static declarations.
* If fparseln is in libutil (as it is in NetBSD), then don't build
it into libnbcompat.a.
* Add mkdtemp, TAILQ_*, and statfs.
* Install a nbconfig.h file containing the discovered system information
and include it directly in nbcompat.h. Make all files use nbconfig.h
instead of config.h. Ensure that all installed headers don't include
any local header files. This makes libnbcompat more self-contained.
* Consistently use "#if HAVE_HEADER_H" instead of "#ifdef HAVE_HEADER_H"
since sometimes people put -DHAVE_HEADER_H=0 on their command lines.
don't need a GNU compatible malloc() here.
a GNU compatible malloc() is still used in libnbcompat.a if it is
required.
fixes build on (at least) Tru64.