VS 6 warns verbosely when WINVER >= 0x0500. Avoid defining WINVER and
_WIN32_WINNT to higher than 0x0400 on VS 6. Provide missing API
declarations in archive_windows.h when we do not get them from
<windows.h>. Provide GetVolumePathNameW because VS 6 does not declare
it regardless of the API version.
Restore Windows 64-bit lseek removed by upstream svn revision 3826
(Cast away __la_lseek(), use _lseeki64() instead, 2011-11-21). We
need it on Borland.
If neither MAJOR_IN_MKDEV or MAJOR_IN_SYSMACROS is defined then provide
our own implementation of these macros locally. This complements the
change in commit cf5ad183 (Fix major() check for LSB 4.0, 2011-01-12).
This patch is based on upstream libarchive SVN commit 1553 (Shuffle the
major/minor/makedev support a bit; this should work on both Windows and
Haiku, 2009-10-31).
Inspired-by: Tim Kientzle <kientzle@freebsd.org>
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.
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.