Tim Kientzle [Fri, 7 Aug 2009 04:01:06 +0000 (00:01 -0400)]
Test whether printf() supports %jd, %ju, %lld, or %llu.
This needs to be implemented in the autoconf machinery
and tar and cpio need to be taught to use it when printing
very large numbers.
Tim Kientzle [Thu, 6 Aug 2009 05:29:00 +0000 (01:29 -0400)]
Fix bsdcpio build on VS9. There's still a minor build issue on MinGW that I need to track down. I think some of the cpio_windows.c shims aren't needed and can be removed.
Tim Kientzle [Sun, 2 Aug 2009 21:41:53 +0000 (17:41 -0400)]
Reduce diffs between tar/test infrastructure and cpio/test infrastructure.
In particular, this makes it possible to use the new platform-independent
assertions for creating dirs, testing file attributes, etc.
Tim Kientzle [Sun, 2 Aug 2009 20:00:46 +0000 (16:00 -0400)]
Rework the style of CHECK_FUNCS() to better match
the style of built-in cmake tests:
* One test per invocation
* macro name is explicit
Convert some of the tests to CHECK_SYMBOL_EXISTS(),
which further reduces some of the magic within the
old CHECK_FUNCS. It is now primarily an extended
version of CHECK_FUNCTION_EXISTS that understands the
glibc __stub_ convention for marking functions that
should be treated as nonexistent even though they
do exist in the local library. I've renamed the
macro to CHECK_FUNCTION_EXISTS_GLIBC to better
reflect this.
Tim Kientzle [Sun, 2 Aug 2009 19:16:28 +0000 (15:16 -0400)]
Revert r1289 and correct some of the *id_t defines:
* uid_t/gid_t/id_t all default to "short" on Win32, "unsigned int" elsewhere
* pid_t doesn't need to be probed so remove it
Tim Kientzle [Mon, 27 Jul 2009 04:27:03 +0000 (00:27 -0400)]
Trim down Windows shims for tar: A lot of this has simply gone away:
* the open/read/write/close emulations were for the test harness, which now uses stdio,
* mkdir() was for the test harness, which has been refactored so it's no longer needed here
* opendir/readdir/closedir are only needed by tree.c and are being pushed down into tree.c
Tim Kientzle [Sun, 26 Jul 2009 04:12:29 +0000 (00:12 -0400)]
Merge various test framework improvements across the various
test harnesses. In particular, there have been a few spot
changes to improve Windows support.
Tim Kientzle [Sun, 26 Jul 2009 02:59:29 +0000 (22:59 -0400)]
Provide assertMakeDir() for tests to use instead of raw mkdir(). In particular, this allows us to hide the difference between POSIX two-argument mkdir() and Windows single-argument version.
Tim Kientzle [Thu, 23 Jul 2009 04:32:07 +0000 (00:32 -0400)]
Fix the test naming. The cmake-based builds assume that
we have exactly one official test case in each source file.
If that's violated, the tests report wrong names for failed tests.
Tim Kientzle [Thu, 23 Jul 2009 04:16:09 +0000 (00:16 -0400)]
Windows and Posix libarchive ports handle errors a little differently for external decompression programs; verify that the responses are reasonable, but don't be too rigid.
Charles Wilson [Wed, 22 Jul 2009 12:01:18 +0000 (08:01 -0400)]
Merge r1167 (part c) from trunk
Fix a bunch of tests on Visual Studio:
* Change off_t to int64_t for a lot of internal vars
to support VS 32-bit off_t; since we can't change
the external client_skip interface until libarchive 3.0,
just limit forward skips until then.
libarchive/archive_private.h
libarchive/archive_read.c
libarchive/archive_read_support_format_tar.c
Charles Wilson [Tue, 21 Jul 2009 04:54:01 +0000 (00:54 -0400)]
Minor MinGW fixes.
* bsdtar_windows.h: ensure struct bsdtar and struct archive are forward
declared before declaring functions that take pointers to those types.
Charles Wilson [Tue, 21 Jul 2009 04:52:25 +0000 (00:52 -0400)]
Minor MinGW fixes.
* bsdtar_windows.h: New MinGW already defines PRId64; guard it.
Ensure we have definition of MAX_PATH in time, by including windows.h.
Charles Wilson [Tue, 21 Jul 2009 04:43:29 +0000 (00:43 -0400)]
[MinGW/MSVC] Use correct types for (replacement) uid_t and git_d
The st_uid and st_gid fields in struct stat are shorts, not unsigned
int nor (regular) int for MinGW (and, AFAICT, for MSVC as well).
However, neither platform defines uid_t or gid_t, but AC_TYPE_UID_T
defaults to "int" in that case, and the current defaults for __LA_UID_T
and __LA_GID_T in archive.h and archive_entry.h are "unsigned int". On
MinGW these ('int' and 'unsigned int') do not match each other, and they
certainly do not match 'short'. Fix it.
* build/autoconf/la_uid_t.m4: New file defines la_TYPE_UID_T replacement
macro for AC_TYPE_UID_T.
* configure.ac: Use it.
* libarchive/archive.h [_WIN32]: Use correct default values for
__LA_GID_T and __LA_GID_T.
* libarchive/archive_entry.h [_WIN32]: Ditto.
* libarchive/archive_write_set_format_pax.c (archive_write_pax_header):
Avoid size-of-comparison warnings when uid_t/gid_t have less than 18 bits.
Charles Wilson [Tue, 21 Jul 2009 04:02:52 +0000 (00:02 -0400)]
Merge r1176 from trunk
Clear any warning/error messages set by archive_read_support_compression_*
functions, since we're ignoring their return codes. This eliminates the
weird behaviour of printing "Using external unxz program for xz
decompression" if an unrelated error occurs when opening an archive (due
to the message lingering in the error message buffer).
------------------------------------------------------------------------
Charles Wilson [Tue, 21 Jul 2009 04:01:57 +0000 (00:01 -0400)]
Merge r1167 (part b) from trunk
Fix a bunch of tests on Visual Studio:
* Now that we have better handling for missing compression,
test_fuzz doesn't need to test whether it can handle
a file before it tries fuzzing it.
libarchive/test/test_fuzz.c
------------------------------------------------------------------------
Charles Wilson [Tue, 21 Jul 2009 03:57:55 +0000 (23:57 -0400)]
Merge r1167 (part a) from trunk
Fix a bunch of tests on Visual Studio:
* detect bzip2 unavailability and skip those tests
libarchive/test/test_read_format_cpio_bin_bz2.c
libarchive/test/test_read_format_pax_bz2.c
libarchive/test/test_read_format_tbz.c
------------------------------------------------------------------------
Charles Wilson [Tue, 21 Jul 2009 03:56:12 +0000 (23:56 -0400)]
Merge r1164 from trunk
Skip this test if libarchive isn't compiled with libbz2.
------------------------------------------------------------------------
Charles Wilson [Sun, 19 Jul 2009 23:20:47 +0000 (19:20 -0400)]
Merge r1220 from trunk:
Testsuite fixes for cygwin-1.5
* configure.ac: Detect cygwin-1.7.
* tar/test/test_copy.c: Better tuning for long filename tests.
Charles Wilson [Sun, 19 Jul 2009 23:10:39 +0000 (19:10 -0400)]
Merge r1084 from trunk:
Add custom _dosmaperr() implementation (copied from
PostgreSQL) and use it instead of the undocumented
Windows CRT function (which isn't available in all versions
of Windows CRT). Rename it to la_dosmaperr() to avoid
any name conflicts with the "standard" one.