Tim Kientzle [Sun, 16 Aug 2009 00:21:30 +0000 (20:21 -0400)]
Issue 36: Fix acl probing on Linux.
I used the additional library checks directly from the patch provided.
Probing the functions properly proved a bit more challenging because
the indicated headers aren't the same on all systems. Instead, I
generalized the existing header tests to build up a list ${INCLUDE}
of all headers present on the local system and used that.
Tim Kientzle [Tue, 11 Aug 2009 15:55:52 +0000 (11:55 -0400)]
Probe acl_get_link and acl_get_link_np so that ACLs are properly
read from symlinks. Without this, link-related tests fail for cpio
on FreeBSD. (Same as r1357, but for autoconf-generated builds.)
Tim Kientzle [Tue, 11 Aug 2009 15:14:32 +0000 (11:14 -0400)]
Fix cpio symlink tests on FreeBSD; the link-sensitive ACL routines
weren't being properly configured, which was causing the regular
Posix mode bits to get overwritten.
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.
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.