diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-10-03 20:51:07 +0900 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-10-03 20:51:07 +0900 |
commit | 36254e173ba8ff3895c4edee036f43fff185e1ea (patch) | |
tree | c4fb5aa6c86cedb1962a9e37799cb725dae92dee /libarchive/archive_read_support_filter_program.c | |
parent | c33eebf8986aee852b1829ed34280e7a0bfedde6 (diff) | |
download | libarchive-36254e173ba8ff3895c4edee036f43fff185e1ea.tar.gz |
Remove unnecessary build condition for a use of
__archive_create_child(). It has worked well on both POSIX
system and non-POSIX system since libarchive 2.7.0.
Diffstat (limited to 'libarchive/archive_read_support_filter_program.c')
-rw-r--r-- | libarchive/archive_read_support_filter_program.c | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/libarchive/archive_read_support_filter_program.c b/libarchive/archive_read_support_filter_program.c index b05eb034..fe6048e8 100644 --- a/libarchive/archive_read_support_filter_program.c +++ b/libarchive/archive_read_support_filter_program.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include "archive.h" #include "archive_private.h" #include "archive_read_private.h" +#include "filter_fork.h" #if ARCHIVE_VERSION_NUMBER < 4000000 @@ -80,43 +81,6 @@ archive_read_support_filter_program(struct archive *a, const char *cmd) } -/* This capability is only available on POSIX systems. */ -#if (!defined(HAVE_PIPE) || !defined(HAVE_FCNTL) || \ - !(defined(HAVE_FORK) || defined(HAVE_VFORK))) && (!defined(_WIN32) || defined(__CYGWIN__)) - -/* - * On non-Posix systems, allow the program to build, but choke if - * this function is actually invoked. - */ -int -archive_read_support_filter_program_signature(struct archive *_a, - const char *cmd, const void *signature, size_t signature_len) -{ - (void)_a; /* UNUSED */ - (void)cmd; /* UNUSED */ - (void)signature; /* UNUSED */ - (void)signature_len; /* UNUSED */ - - archive_set_error(_a, -1, - "External compression programs not supported on this platform"); - return (ARCHIVE_FATAL); -} - -int -__archive_read_program(struct archive_read_filter *self, const char *cmd) -{ - (void)self; /* UNUSED */ - (void)cmd; /* UNUSED */ - - archive_set_error(&self->archive->archive, -1, - "External compression programs not supported on this platform"); - return (ARCHIVE_FATAL); -} - -#else - -#include "filter_fork.h" - /* * The bidder object stores the command and the signature to watch for. * The 'inhibit' entry here is used to ensure that unchecked filters never @@ -472,5 +436,3 @@ program_filter_close(struct archive_read_filter *self) return (e); } - -#endif /* !defined(HAVE_PIPE) || !defined(HAVE_VFORK) || !defined(HAVE_FCNTL) */ |