From fa07de5eeb36516701b3393f13acc1e1f702c634 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Mon, 26 May 2008 17:00:24 +0000 Subject: MFp4: libarchive 2.5.4b. (Still 'b' until I get a bit more feedback, but the 2.5 branch is shaping up nicely.) In addition to many small bug fixes and code improvements: * Another iteration of versioning; I think I've got it right now. * Portability: A lot of progress on Windows support (though I'm not committing all of the Windows support files to FreeBSD CVS) * Explicit tracking of MBS, WCS, and UTF-8 versions of strings in archive_entry; the archive_entry routines now correctly return NULL only when something is unset, setting NULL properly clears string values. Most charset conversions have been pushed down to archive_string. * Better handling of charset conversion failure when writing or reading UTF-8 headers in pax archives * archive_entry_linkify() provides multiple strategies for hardlink matching to suit different format expectations * More accurate bzip2 format detection * Joerg Sonnenberger's extensive improvements to mtree support * Rough support for self-extracting ZIP archives. Not an ideal approach, but it works for the archives I've tried. * New "sparsify" option in archive_write_disk converts blocks of nulls into seeks. * Better default behavior for the test harness; it now reports all failures by default instead of coredumping at the first one. --- .../archive_read_support_compression_program.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/libarchive/archive_read_support_compression_program.c') diff --git a/lib/libarchive/archive_read_support_compression_program.c b/lib/libarchive/archive_read_support_compression_program.c index dfea568fee205..5f6cb463b21c4 100644 --- a/lib/libarchive/archive_read_support_compression_program.c +++ b/lib/libarchive/archive_read_support_compression_program.c @@ -26,6 +26,24 @@ #include "archive_platform.h" __FBSDID("$FreeBSD$"); + +/* This capability is only available on POSIX systems. */ +#if !defined(HAVE_PIPE) || !defined(HAVE_VFORK) || !defined(HAVE_FCNTL) + +/* + * On non-Posix systems, allow the program to build, but choke if + * this function is actually invoked. + */ +int +archive_read_support_compression_program(struct archive *_a, const char *cmd) +{ + archive_set_error(_a, -1, + "External compression programs not supported on this platform"); + return (ARCHIVE_FATAL); +} + +#else + #ifdef HAVE_SYS_WAIT_H # include #endif @@ -313,3 +331,5 @@ archive_decompressor_program_finish(struct archive_read *a) return (ARCHIVE_OK); } + +#endif /* !defined(HAVE_PIPE) || !defined(HAVE_VFORK) || !defined(HAVE_FCNTL) */ -- cgit v1.3