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.
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.
Tim Kientzle [Sun, 19 Jul 2009 07:57:34 +0000 (03:57 -0400)]
Sort short option list, fill in missing -I option, update
manpage options to include -0, -J, -j, -lzma, and -h.
Since Windows no longer tries to automatically turn on ownership
restore, we need --preserve-owner to allow users to manually
turn it on.
Tim Kientzle [Sun, 19 Jul 2009 07:20:51 +0000 (03:20 -0400)]
Remove the attempt to determine "root" for Windows.
It's not really feasible and just gets weirder the longer
we look at it. We now assume different defaults only
for the root user on non-Windows systems.
Tim Kientzle [Sat, 18 Jul 2009 05:13:51 +0000 (01:13 -0400)]
More simplification of the seek/truncate logic:
1) We don't actually need to truncate; seek is enough.
2) The Windows code doesn't need to be more paranoid than the Posix code.
Tim Kientzle [Fri, 17 Jul 2009 03:35:08 +0000 (23:35 -0400)]
Rename test_option_T to test_option_T_upper, following a pattern
established by bsdcpio_test for ensuring that test cases don't
cause problems on case-insensitive filesystems.
Tim Kientzle [Fri, 17 Jul 2009 01:21:18 +0000 (21:21 -0400)]
Overhaul the SIGINFO/SIGUSR1 reporting. This is a little
simpler and gives a lot more information. In particular,
it reports total bytes in/out, total files and compression
ratio, in addition to reporting the current file being processed.
Charles Wilson [Fri, 10 Jul 2009 19:45:33 +0000 (15:45 -0400)]
Testsuite fixes for cygwin-1.5
* configure.ac: Detect cygwin-1.7.
* tar/test/test_copy.c: Better tuning for long filename tests.
NOTE: this change causes a new cygwin-1.7 failure, but that is
actually a bug in the current cygwin-1.7 beta:
http://cygwin.com/ml/cygwin/2009-07/msg00386.html
It's assumed this will be fixed in cygwin, soon.
Tim Kientzle [Thu, 2 Jul 2009 04:17:34 +0000 (00:17 -0400)]
Support decimal uid/gid when parsing -R/--owner option.
Extend existing test to cover new functionality.
Rework this test slightly to reduce conditionals for Cygwin.
Tim Kientzle [Sun, 28 Jun 2009 08:08:04 +0000 (04:08 -0400)]
cpio doesn't need set_fmode(O_BINARY) any more so we can remove it.
Also, fix up the uid/gid formatting to work properly on Windows (whose printf() functions don't support ISO C99).
Tim Kientzle [Sat, 27 Jun 2009 03:48:20 +0000 (23:48 -0400)]
On Windows, set _O_BINARY on filehandles passed in from clients.
This should eliminate the need for clients to take special
measures to get correct binary handling.
Colin Percival [Sun, 21 Jun 2009 05:09:55 +0000 (01:09 -0400)]
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).