summaryrefslogtreecommitdiff
path: root/archival/libunarchive
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libunarchive')
-rw-r--r--archival/libunarchive/decompress_bunzip2.c10
-rw-r--r--archival/libunarchive/decompress_uncompress.c12
-rw-r--r--archival/libunarchive/decompress_unlzma.c16
-rw-r--r--archival/libunarchive/decompress_unzip.c16
-rw-r--r--archival/libunarchive/get_header_tar.c12
-rw-r--r--archival/libunarchive/open_transformer.c2
6 files changed, 34 insertions, 34 deletions
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c
index b53720f..cd8df08 100644
--- a/archival/libunarchive/decompress_bunzip2.c
+++ b/archival/libunarchive/decompress_bunzip2.c
@@ -648,10 +648,10 @@ void FAST_FUNC dealloc_bunzip(bunzip_data *bd)
/* Decompress src_fd to dst_fd. Stops at end of bzip data, not end of file. */
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_bz2_stream(int src_fd, int dst_fd)
{
- USE_DESKTOP(long long total_written = 0;)
+ IF_DESKTOP(long long total_written = 0;)
char *outbuf;
bunzip_data *bd;
int i;
@@ -666,7 +666,7 @@ unpack_bz2_stream(int src_fd, int dst_fd)
i = RETVAL_SHORT_WRITE;
break;
}
- USE_DESKTOP(total_written += i;)
+ IF_DESKTOP(total_written += i;)
}
}
@@ -686,10 +686,10 @@ unpack_bz2_stream(int src_fd, int dst_fd)
dealloc_bunzip(bd);
free(outbuf);
- return i ? i : USE_DESKTOP(total_written) + 0;
+ return i ? i : IF_DESKTOP(total_written) + 0;
}
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_bz2_stream_prime(int src_fd, int dst_fd)
{
unsigned char magic[2];
diff --git a/archival/libunarchive/decompress_uncompress.c b/archival/libunarchive/decompress_uncompress.c
index fe1491e..2877c89 100644
--- a/archival/libunarchive/decompress_uncompress.c
+++ b/archival/libunarchive/decompress_uncompress.c
@@ -72,11 +72,11 @@
* be stored in the compressed file.
*/
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_Z_stream(int fd_in, int fd_out)
{
- USE_DESKTOP(long long total_written = 0;)
- USE_DESKTOP(long long) int retval = -1;
+ IF_DESKTOP(long long total_written = 0;)
+ IF_DESKTOP(long long) int retval = -1;
unsigned char *stackp;
long code;
int finchar;
@@ -265,7 +265,7 @@ unpack_Z_stream(int fd_in, int fd_out)
if (outpos >= OBUFSIZ) {
full_write(fd_out, outbuf, outpos);
//error check??
- USE_DESKTOP(total_written += outpos;)
+ IF_DESKTOP(total_written += outpos;)
outpos = 0;
}
stackp += i;
@@ -294,10 +294,10 @@ unpack_Z_stream(int fd_in, int fd_out)
if (outpos > 0) {
full_write(fd_out, outbuf, outpos);
//error check??
- USE_DESKTOP(total_written += outpos;)
+ IF_DESKTOP(total_written += outpos;)
}
- retval = USE_DESKTOP(total_written) + 0;
+ retval = IF_DESKTOP(total_written) + 0;
err:
free(inbuf);
free(outbuf);
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c
index 2cfcd9b..33e5cd6 100644
--- a/archival/libunarchive/decompress_unlzma.c
+++ b/archival/libunarchive/decompress_unlzma.c
@@ -228,10 +228,10 @@ enum {
};
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_lzma_stream(int src_fd, int dst_fd)
{
- USE_DESKTOP(long long total_written = 0;)
+ IF_DESKTOP(long long total_written = 0;)
lzma_header_t header;
int lc, pb, lp;
uint32_t pos_state_mask;
@@ -330,7 +330,7 @@ unpack_lzma_stream(int src_fd, int dst_fd)
global_pos += header.dict_size;
if (full_write(dst_fd, buffer, header.dict_size) != (ssize_t)header.dict_size)
goto bad;
- USE_DESKTOP(total_written += header.dict_size;)
+ IF_DESKTOP(total_written += header.dict_size;)
}
#else
len = 1;
@@ -468,20 +468,20 @@ unpack_lzma_stream(int src_fd, int dst_fd)
}
len += LZMA_MATCH_MIN_LEN;
- SKIP_FEATURE_LZMA_FAST(string:)
+ IF_NOT_FEATURE_LZMA_FAST(string:)
do {
pos = buffer_pos - rep0;
while (pos >= header.dict_size)
pos += header.dict_size;
previous_byte = buffer[pos];
- SKIP_FEATURE_LZMA_FAST(one_byte2:)
+ IF_NOT_FEATURE_LZMA_FAST(one_byte2:)
buffer[buffer_pos++] = previous_byte;
if (buffer_pos == header.dict_size) {
buffer_pos = 0;
global_pos += header.dict_size;
if (full_write(dst_fd, buffer, header.dict_size) != (ssize_t)header.dict_size)
goto bad;
- USE_DESKTOP(total_written += header.dict_size;)
+ IF_DESKTOP(total_written += header.dict_size;)
}
len--;
} while (len != 0 && buffer_pos < header.dst_size);
@@ -489,8 +489,8 @@ unpack_lzma_stream(int src_fd, int dst_fd)
}
{
- SKIP_DESKTOP(int total_written = 0; /* success */)
- USE_DESKTOP(total_written += buffer_pos;)
+ IF_NOT_DESKTOP(int total_written = 0; /* success */)
+ IF_DESKTOP(total_written += buffer_pos;)
if (full_write(dst_fd, buffer, buffer_pos) != (ssize_t)buffer_pos) {
bad:
total_written = -1; /* failure */
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index 8696925..b090f26 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -970,10 +970,10 @@ static int inflate_get_next_window(STATE_PARAM_ONLY)
/* Called from unpack_gz_stream() and inflate_unzip() */
-static USE_DESKTOP(long long) int
+static IF_DESKTOP(long long) int
inflate_unzip_internal(STATE_PARAM int in, int out)
{
- USE_DESKTOP(long long) int n = 0;
+ IF_DESKTOP(long long) int n = 0;
ssize_t nwrote;
/* Allocate all global buffers (for DYN_ALLOC option) */
@@ -1008,7 +1008,7 @@ inflate_unzip_internal(STATE_PARAM int in, int out)
n = -1;
goto ret;
}
- USE_DESKTOP(n += nwrote;)
+ IF_DESKTOP(n += nwrote;)
if (r == 0) break;
}
@@ -1033,10 +1033,10 @@ inflate_unzip_internal(STATE_PARAM int in, int out)
/* For unzip */
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
inflate_unzip(inflate_unzip_result *res, off_t compr_size, int in, int out)
{
- USE_DESKTOP(long long) int n;
+ IF_DESKTOP(long long) int n;
DECLARE_STATE;
ALLOC_STATE;
@@ -1181,11 +1181,11 @@ static int check_header_gzip(STATE_PARAM unpack_info_t *info)
return 1;
}
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_gz_stream_with_info(int in, int out, unpack_info_t *info)
{
uint32_t v32;
- USE_DESKTOP(long long) int n;
+ IF_DESKTOP(long long) int n;
DECLARE_STATE;
n = 0;
@@ -1245,7 +1245,7 @@ unpack_gz_stream_with_info(int in, int out, unpack_info_t *info)
return n;
}
-USE_DESKTOP(long long) int FAST_FUNC
+IF_DESKTOP(long long) int FAST_FUNC
unpack_gz_stream(int in, int out)
{
return unpack_gz_stream_with_info(in, out, NULL);
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index 443052f..16e2de4 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -144,8 +144,8 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
// if (!archive_handle->ah_priv_inited) {
// archive_handle->ah_priv_inited = 1;
// p_end = 0;
-// USE_FEATURE_TAR_GNU_EXTENSIONS(p_longname = NULL;)
-// USE_FEATURE_TAR_GNU_EXTENSIONS(p_linkname = NULL;)
+// IF_FEATURE_TAR_GNU_EXTENSIONS(p_longname = NULL;)
+// IF_FEATURE_TAR_GNU_EXTENSIONS(p_linkname = NULL;)
// }
if (sizeof(tar) != 512)
@@ -176,7 +176,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
bb_error_msg_and_die("short read");
}
if (i != 512) {
- USE_FEATURE_TAR_AUTODETECT(goto autodetect;)
+ IF_FEATURE_TAR_AUTODETECT(goto autodetect;)
goto short_read;
}
@@ -265,14 +265,14 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
#if ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY
sum = strtoul(tar.chksum, &cp, 8);
if ((*cp && *cp != ' ')
- || (sum_u != sum USE_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum))
+ || (sum_u != sum IF_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum))
) {
bb_error_msg_and_die("invalid tar header checksum");
}
#else
/* This field does not need special treatment (getOctal) */
sum = xstrtoul(tar.chksum, 8);
- if (sum_u != sum USE_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum)) {
+ if (sum_u != sum IF_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum)) {
bb_error_msg_and_die("invalid tar header checksum");
}
#endif
@@ -356,7 +356,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
file_header->mode |= S_IFBLK;
goto size0;
case '5':
- USE_FEATURE_TAR_OLDGNU_COMPATIBILITY(set_dir:)
+ IF_FEATURE_TAR_OLDGNU_COMPATIBILITY(set_dir:)
file_header->mode |= S_IFDIR;
goto size0;
case '6':
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c
index 42fdd96..fae589e 100644
--- a/archival/libunarchive/open_transformer.c
+++ b/archival/libunarchive/open_transformer.c
@@ -12,7 +12,7 @@
* in include/unarchive.h. On NOMMU, transformer is removed.
*/
void FAST_FUNC open_transformer(int fd,
- USE_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd),
+ IF_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd),
const char *transform_prog)
{
struct fd_pair fd_pipe;