include:
* Rework the way that poll() is detected so that it more closely
follows how the rest of the replacement functions are detected.
* Split err*() and warn*() functions into separate err.c and warn.c
files so that we can more finely isolate the objects files pulled
in by the linker. This should fix building textproc/nbsed on Solaris.
* Move more definitions from nbcompat.h into nbcompat/*.h. This makes
it more clear which NetBSD headers are expected to provide which
function declarations and macro definitions.
* Clean out nbconfig.h by moving all of the relevant definitions into
the correct nbcompat/*.h files.
* Update all of the library functions to the latest from src HEAD.
Also change the way that sources are modified when imported -- we
now include <nbcompat.h> before the first system header, include
<nbcompat/*.h> versions of headers instead of system ones where
available, and "#if 0" the sections that make no sense when being
built outside of the NetBSD source tree. This should make future
updates from src HEAD, e.g. for security updates or bug fixes,
easier.
* Move all private headers into a subdirectory and include the headers
from the private directory. This avoids any nameclashes with system
headers with the same name.
include:
* Adding a regex(3) implementation for those platforms that don't
have one, e.g. IRIX 5.3.
* Allow nbcompat.h to be included multiple times in case it's needed
to override values of set by config.h in bootstrap packages. This
should fix problems with building pkg_install and pax on platforms
that have /usr/include/glob.h.
* Remove namespace.h, which should be a no-op since we're building
a userland library separate from the NetBSD sources.
* Remove HAVE_CONFIG_H checks from sources since we're always going
to have and and we're always going to be including it.
* Rename all inclusion guards in nbcompat/*.h to be _NBCOMPAT_*_H_ so
that it won't get triggered by any settings in system headers.
This has been tested on:
FreeBSD-4.8/i386 Debian Linux 3.0 (woody)
IRIX 6.5 MacOS X 10.2.8
MacOS X 10.3.5 NetBSD-1.6.2/i386
NetBSD-2.0_BETA/i386 Red Hat Linux 7.3
Solaris 7/sparc Solaris 8/sparc
Solaris 9/sparc
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.
* 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.
* 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.