]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Remove unnecessary build condition for a use of
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 3 Oct 2012 11:51:07 +0000 (20:51 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 3 Oct 2012 11:51:07 +0000 (20:51 +0900)
__archive_create_child().  It has worked well on both POSIX
system and non-POSIX system since libarchive 2.7.0.

libarchive/archive_read_support_filter_program.c
libarchive/archive_write_add_filter_program.c

index b05eb03424d727a6e0561c3f89f8c555a176347c..fe6048e89eb2acba8d03b4add68dc31f228a763e 100644 (file)
@@ -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) */
index d6ba783f4472bb387b41a807ea1079683a46fd7b..77896700380ee75ed3bbdff65a7eefd5e28a7a3f 100644 (file)
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_compression_program.c
 #include "archive.h"
 #include "archive_private.h"
 #include "archive_write_private.h"
+#include "filter_fork.h"
 
 #if ARCHIVE_VERSION_NUMBER < 4000000
 int
@@ -55,26 +56,6 @@ archive_write_set_compression_program(struct archive *a, const char *cmd)
 }
 #endif
 
-/* 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_write_add_filter_program(struct archive *_a, const char *cmd)
-{
-       archive_set_error(_a, -1,
-           "External compression programs not supported on this platform");
-       return (ARCHIVE_FATAL);
-}
-
-#else
-
-#include "filter_fork.h"
-
 struct private_data {
        char            *cmd;
        char            *description;
@@ -325,5 +306,3 @@ archive_compressor_program_free(struct archive_write_filter *f)
        f->data = NULL;
        return (ARCHIVE_OK);
 }
-
-#endif /* !defined(HAVE_PIPE) || !defined(HAVE_VFORK) || !defined(HAVE_FCNTL) */