diff options
Diffstat (limited to 'archival/libarchive/open_transformer.c')
-rw-r--r-- | archival/libarchive/open_transformer.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c index ac7e5db95..641256787 100644 --- a/archival/libarchive/open_transformer.c +++ b/archival/libarchive/open_transformer.c | |||
@@ -65,6 +65,7 @@ ssize_t FAST_FUNC xtransformer_write(transformer_state_t *xstate, const void *bu | |||
65 | return nwrote; | 65 | return nwrote; |
66 | } | 66 | } |
67 | 67 | ||
68 | #if !ENABLE_PLATFORM_MINGW32 | ||
68 | void check_errors_in_children(int signo) | 69 | void check_errors_in_children(int signo) |
69 | { | 70 | { |
70 | int status; | 71 | int status; |
@@ -151,6 +152,31 @@ void FAST_FUNC fork_transformer(int fd, const char *transform_prog) | |||
151 | close(fd_pipe.wr); /* don't want to write to the child */ | 152 | close(fd_pipe.wr); /* don't want to write to the child */ |
152 | xmove_fd(fd_pipe.rd, fd); | 153 | xmove_fd(fd_pipe.rd, fd); |
153 | } | 154 | } |
155 | #else /* ENABLE_PLATFORM_MINGW */ | ||
156 | void check_errors_in_children(int signo UNUSED_PARAM) | ||
157 | { | ||
158 | bb_got_signal = 0; | ||
159 | } | ||
160 | |||
161 | void FAST_FUNC fork_transformer(int fd, const char *transform_prog) | ||
162 | { | ||
163 | char *cmd; | ||
164 | int fd1; | ||
165 | |||
166 | if (find_applet_by_name(transform_prog) >= 0) { | ||
167 | cmd = xasprintf("%s --busybox %s -cf -", bb_busybox_exec_path, | ||
168 | transform_prog); | ||
169 | } | ||
170 | else { | ||
171 | cmd = xasprintf("%s -cf -", transform_prog); | ||
172 | } | ||
173 | if ( (fd1=mingw_popen_fd(cmd, "r", fd, NULL)) == -1 ) { | ||
174 | bb_perror_msg_and_die("can't execute '%s'", transform_prog); | ||
175 | } | ||
176 | free(cmd); | ||
177 | xmove_fd(fd1, fd); | ||
178 | } | ||
179 | #endif | ||
154 | 180 | ||
155 | 181 | ||
156 | #if SEAMLESS_COMPRESSION | 182 | #if SEAMLESS_COMPRESSION |