diff options
author | Ron Yorston <rmy@pobox.com> | 2015-05-27 15:23:31 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2015-05-27 15:30:36 +0100 |
commit | 316ecf214a051121516730f794721f5e7b3036ac (patch) | |
tree | 3002051097aebc579cfe3a2e008ff43fe100c1c9 /archival/cpio.c | |
parent | 8a61b67d502ed4fbd5f480ca9458884b55ce7a95 (diff) | |
download | busybox-w32-316ecf214a051121516730f794721f5e7b3036ac.tar.gz busybox-w32-316ecf214a051121516730f794721f5e7b3036ac.tar.bz2 busybox-w32-316ecf214a051121516730f794721f5e7b3036ac.zip |
Enable seamless compression for WIN32
In the archival code we pretend that WIN32 is a no-MMU platform and
use the new mingw_popen_fd routine to pipe data to/from commands
to compress/decompress.
The pretence is maintained by redefining MMU macros in bb_archive.h.
This is mostly used in the archival code but there are a handful
of places where it's used to access public interfaces. The symbol
BB_ARCHIVE_PUBLIC is defined in these places.
With these changes:
tar supports seamless compression/decompression
rpm2cpio and dpkg-deb can be enabled
Diffstat (limited to 'archival/cpio.c')
-rw-r--r-- | archival/cpio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/archival/cpio.c b/archival/cpio.c index 454648d68..3cb7fdb35 100644 --- a/archival/cpio.c +++ b/archival/cpio.c | |||
@@ -374,6 +374,10 @@ int cpio_main(int argc UNUSED_PARAM, char **argv) | |||
374 | argv += optind; | 374 | argv += optind; |
375 | if (opt & OPT_FILE) { /* -F */ | 375 | if (opt & OPT_FILE) { /* -F */ |
376 | xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO); | 376 | xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO); |
377 | #if ENABLE_PLATFORM_MINGW32 | ||
378 | /* default is seek_by_read but seek_by_jump is OK for file */ | ||
379 | archive_handle->seek = seek_by_jump; | ||
380 | #endif | ||
377 | } | 381 | } |
378 | #else | 382 | #else |
379 | opt = getopt32(argv, OPTION_STR "oH:" IF_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt); | 383 | opt = getopt32(argv, OPTION_STR "oH:" IF_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt); |