Tim Kientzle [Mon, 15 Jun 2009 01:48:29 +0000 (21:48 -0400)]
Fix a bunch of tests on Visual Studio:
* detect bzip2 unavailability and skip those tests
* 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.
* 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.
Tim Kientzle [Sun, 14 Jun 2009 17:46:29 +0000 (13:46 -0400)]
When building out the read filter pipeline, ask each filter
for some data after we initialize it. This catches filter
startup failures (such as errors forking an external program)
at open time. Adjust one test that now sees an error earlier.
Tim Kientzle [Sun, 14 Jun 2009 05:37:44 +0000 (01:37 -0400)]
Switch the tar test suite to use stdio (FILE *, fopen, etc)
instead of Unix I/O calls (open()/read()/write()). This
is partly to address some portability issues---I want to
minimize platform-specific code in the test suites---and
partly because there isn't a compelling argument for using
Unix I/O calls in the test suites (unlike libarchive itself,
which does have specific requirements that require the
use of Unix I/O instead of stdio).
After this is tested on more platforms, I hope to apply similar
changes to the cpio and libarchive test suites.
Tim Kientzle [Mon, 25 May 2009 17:08:00 +0000 (13:08 -0400)]
Update some of the top-level guide files:
* Remove PROJECTS in favor of the WishList in the Wiki
* Clarify INSTALL
* getdate.y no longer exists
* Minor README corrections and edits
Tim Kientzle [Sun, 24 May 2009 23:35:53 +0000 (19:35 -0400)]
Be more careful about text/binary mode.
Libarchive is already pretty careful about using O_BINARY
whenever it opens a file handle internally; this extends
that care to file descriptors that are passed in from clients
by invoking _setmode() explicitly.
The test harness was much less careful about O_BINARY;
this adds those flags to all open() calls and modifies
fopen() calls to use "wb" and "rb" explicitly.
In particular, this should remove the need for clients
to use invoke _set_fmode() at all.
Move hashing function calling into a separate file. Provide the glue
for OpenSSL and libc functions in NetBSD and OpenBSD as well as
simplified configure logic. OpenSSL is now only pulled in if the
platform does not provide all needed hash functions.
Tim Kientzle [Sat, 23 May 2009 17:29:00 +0000 (13:29 -0400)]
Rename a scratch variable. This is used to workaround
a bug with some versions of GCC that don't support
cast-to-void for explicitly ignoring return values.
Tim Kientzle [Fri, 15 May 2009 04:49:23 +0000 (00:49 -0400)]
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.
Tim Kientzle [Thu, 14 May 2009 23:55:24 +0000 (19:55 -0400)]
Avoid problems because of varying ino_t sizes on different platforms. In particular, Windows uses a 16-bit (?!) ino_t, so we can't just cast the constant here to ino_t. The next API changes should avoid ino_t entirely to prevent problems reading cpio archives on platforms where the native ino_t type isn't big enough.
Tim Kientzle [Sat, 9 May 2009 01:15:17 +0000 (21:15 -0400)]
Building on Ubuntu 9 provoked some complaints about return values
not being used. Some of these are good catches, a few are
annoying. Unfortunately, GCC on this system won't just
allow you to cast the result explicitly to (void) to
shut up the error, so I've had to introduce some gratuitous
extra variables. <sigh>
Tim Kientzle [Fri, 8 May 2009 17:32:08 +0000 (13:32 -0400)]
Fix build on platforms without zlib.h. I need to dig out my old
CRC code and drop it in here to correctly break this dependency,
but these tests are so badly broken right now anyway...
Tim Kientzle [Fri, 8 May 2009 16:57:01 +0000 (12:57 -0400)]
Separate the xattr management for archive_entry into a separate
source file. The only linkage between the xattr routines and
the rest of archive_entry is through public API functions, so
this doesn't expose any internal interfaces and will make it
easier to extend and modify the xattr management in the future.
(In particular, we'll need to add support for looking up specific
xattrs by name in the very near future.)
Tim Kientzle [Fri, 8 May 2009 16:50:46 +0000 (12:50 -0400)]
Fix the CMake build on systems that lack a C++ compiler.
libarchive doesn't need C++, so we should be able to build
on systems that don't have a C++ compiler.
Tim Kientzle [Thu, 7 May 2009 22:53:09 +0000 (18:53 -0400)]
The refactoring of r868 changed read_open_filename() to
just use read_open_fd() for the degenerate stdin case.
Unfortunately, there's a critical difference between these
two: read_open_fd() does no special processing on close;
read_open_filename() flushes input pipes on close. As
a result, pipelines such as "gunzip|tar" would cause gunzip
to fail with SIGPIPE. Especially with /bin/csh (which reports
the success of the first program in a pipeline, not the last
as /bin/sh and bash do), this caused some ugly problems.
Thanks to Alexey Shuvaev for reporting this failure and
patiently helping me to track down the cause.
Tim Kientzle [Mon, 27 Apr 2009 18:29:15 +0000 (14:29 -0400)]
Rename test_acl_solaris to test_compat_solaris_tar_acl.
(The former makes it sound like we're testing system-specific
ACL support for Solaris, which isn't implemented yet.)