diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-05 22:15:03 +0200 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-20 19:14:08 +0200 |
commit | d239ce34ceb287a8e3c8c405282e3ddac9a034b5 (patch) | |
tree | 5c65047964139b76f973d5751cc84729e5fa9332 | |
parent | e2d49ee805ab0e6db6f6c787e9c8d31123b7ee65 (diff) | |
download | busybox-w32-d239ce34ceb287a8e3c8c405282e3ddac9a034b5.tar.gz busybox-w32-d239ce34ceb287a8e3c8c405282e3ddac9a034b5.tar.bz2 busybox-w32-d239ce34ceb287a8e3c8c405282e3ddac9a034b5.zip |
gzip: rename eof due to symbol conflict on Windows
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
-rw-r--r-- | archival/gzip.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/archival/gzip.c b/archival/gzip.c index a327d5435..958336303 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -1577,7 +1577,7 @@ static void compress_block(ct_data * ltree, ct_data * dtree) | |||
1577 | * trees or store, and output the encoded block to the zip file. This function | 1577 | * trees or store, and output the encoded block to the zip file. This function |
1578 | * returns the total compressed length for the file so far. | 1578 | * returns the total compressed length for the file so far. |
1579 | */ | 1579 | */ |
1580 | static ulg flush_block(char *buf, ulg stored_len, int eof) | 1580 | static ulg flush_block(char *buf, ulg stored_len, int eof_) |
1581 | { | 1581 | { |
1582 | ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ | 1582 | ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ |
1583 | int max_blindex; /* index of last bit length code of non zero freq */ | 1583 | int max_blindex; /* index of last bit length code of non zero freq */ |
@@ -1615,7 +1615,7 @@ static ulg flush_block(char *buf, ulg stored_len, int eof) | |||
1615 | * and if the zip file can be seeked (to rewrite the local header), | 1615 | * and if the zip file can be seeked (to rewrite the local header), |
1616 | * the whole file is transformed into a stored file: | 1616 | * the whole file is transformed into a stored file: |
1617 | */ | 1617 | */ |
1618 | if (stored_len <= opt_lenb && eof && G2.compressed_len == 0L && seekable()) { | 1618 | if (stored_len <= opt_lenb && eof_ && G2.compressed_len == 0L && seekable()) { |
1619 | /* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */ | 1619 | /* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */ |
1620 | if (buf == NULL) | 1620 | if (buf == NULL) |
1621 | bb_error_msg("block vanished"); | 1621 | bb_error_msg("block vanished"); |
@@ -1631,18 +1631,18 @@ static ulg flush_block(char *buf, ulg stored_len, int eof) | |||
1631 | * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to | 1631 | * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to |
1632 | * transform a block into a stored block. | 1632 | * transform a block into a stored block. |
1633 | */ | 1633 | */ |
1634 | send_bits((STORED_BLOCK << 1) + eof, 3); /* send block type */ | 1634 | send_bits((STORED_BLOCK << 1) + eof_, 3); /* send block type */ |
1635 | G2.compressed_len = (G2.compressed_len + 3 + 7) & ~7L; | 1635 | G2.compressed_len = (G2.compressed_len + 3 + 7) & ~7L; |
1636 | G2.compressed_len += (stored_len + 4) << 3; | 1636 | G2.compressed_len += (stored_len + 4) << 3; |
1637 | 1637 | ||
1638 | copy_block(buf, (unsigned) stored_len, 1); /* with header */ | 1638 | copy_block(buf, (unsigned) stored_len, 1); /* with header */ |
1639 | 1639 | ||
1640 | } else if (static_lenb == opt_lenb) { | 1640 | } else if (static_lenb == opt_lenb) { |
1641 | send_bits((STATIC_TREES << 1) + eof, 3); | 1641 | send_bits((STATIC_TREES << 1) + eof_, 3); |
1642 | compress_block((ct_data *) G2.static_ltree, (ct_data *) G2.static_dtree); | 1642 | compress_block((ct_data *) G2.static_ltree, (ct_data *) G2.static_dtree); |
1643 | G2.compressed_len += 3 + G2.static_len; | 1643 | G2.compressed_len += 3 + G2.static_len; |
1644 | } else { | 1644 | } else { |
1645 | send_bits((DYN_TREES << 1) + eof, 3); | 1645 | send_bits((DYN_TREES << 1) + eof_, 3); |
1646 | send_all_trees(G2.l_desc.max_code + 1, G2.d_desc.max_code + 1, | 1646 | send_all_trees(G2.l_desc.max_code + 1, G2.d_desc.max_code + 1, |
1647 | max_blindex + 1); | 1647 | max_blindex + 1); |
1648 | compress_block((ct_data *) G2.dyn_ltree, (ct_data *) G2.dyn_dtree); | 1648 | compress_block((ct_data *) G2.dyn_ltree, (ct_data *) G2.dyn_dtree); |
@@ -1651,12 +1651,12 @@ static ulg flush_block(char *buf, ulg stored_len, int eof) | |||
1651 | Assert(G2.compressed_len == G1.bits_sent, "bad compressed size"); | 1651 | Assert(G2.compressed_len == G1.bits_sent, "bad compressed size"); |
1652 | init_block(); | 1652 | init_block(); |
1653 | 1653 | ||
1654 | if (eof) { | 1654 | if (eof_) { |
1655 | bi_windup(); | 1655 | bi_windup(); |
1656 | G2.compressed_len += 7; /* align on byte boundary */ | 1656 | G2.compressed_len += 7; /* align on byte boundary */ |
1657 | } | 1657 | } |
1658 | Tracev((stderr, "\ncomprlen %lu(%lu) ", G2.compressed_len >> 3, | 1658 | Tracev((stderr, "\ncomprlen %lu(%lu) ", G2.compressed_len >> 3, |
1659 | G2.compressed_len - 7 * eof)); | 1659 | G2.compressed_len - 7 * eof_)); |
1660 | 1660 | ||
1661 | return G2.compressed_len >> 3; | 1661 | return G2.compressed_len >> 3; |
1662 | } | 1662 | } |