The CMake TarTest fails with the error
mbsnrtowcs.c:116: __mbsnrtowcs: Assertion
`status == GCONV_OK || status != GCONV_EMPTY_INPUT ||
status == GCONV_ILLEGAL_INPUT || status == GCONV_INCOMPLETE_INPUT ||
status == GCONV_FULL_OUTPUT' failed.
on very old glibc versions. Work around the problem by pretending that
mbsnrtowcs does not exist. Libarchive will fall back to mbrtowc.
In libarchive/archive_platform.h we should include <stdint.h> or
<inttypes.h> immediately after "config.h" to define integer types
referenced by configuration results. For example, on a non-conformant
platform ssize_t might default to int64_t, so int64_t must be defined
before ssize_t is used (and ssize_t is used in archive_windows.h).
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.