The commit "Fixed a few of the SunOS build errors in libarchive" changed
the call to these functions to use the old signatures. Instead we now
define _XOPEN_SOURCE to get the improved modern signatures.
Most of the integer type defaults needed for MSVC and Borland actually
work with all Windows compilers. This commit generalizes the defaults
to avoid compiler-specific tests.
The commit "libarchive: Fix Borland integer constants" introduced use of
HAVE_* configured macros into archive.h and archive_entry.h where they
are not allowed. This commit replaces the logic with something that
does not depend on the configured macros.
The VS 6 version of wincrypt.h only works if _WIN32_WINNT >= 0x0400.
We block its inclusion through windows.h by defining NOCRYPT, and then
define _WIN32_WINNT and include it only when necessary.
Some versions of Borland provide <stdint.h>, so we use it when possible.
However, the 64-bit signed and unsigned integer min/max constants cause
overflow warnings from Borland itself! For these constants we fall back
on our default definitions.
This allows for a built in bzip and zip capability, so external tools
will not be needed for these packagers. The cmake -E tar xf should be
able to handle all compression types now as well.