--- trunk/mkinitrd-magellan/busybox/archival/libunarchive/decompress_unzip.c 2010/04/29 20:38:48 983 +++ trunk/mkinitrd-magellan/busybox/archival/libunarchive/decompress_unzip.c 2010/05/30 11:32:42 984 @@ -503,7 +503,7 @@ md = mask_bits[bd]; } /* called once from inflate_get_next_window */ -static int inflate_codes(STATE_PARAM_ONLY) +static NOINLINE int inflate_codes(STATE_PARAM_ONLY) { unsigned e; /* table entry flag/number of extra bits */ huft_t *t; /* pointer to table entry */ @@ -970,10 +970,10 @@ /* 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 @@ n = -1; goto ret; } - USE_DESKTOP(n += nwrote;) + IF_DESKTOP(n += nwrote;) if (r == 0) break; } @@ -1033,10 +1033,10 @@ /* 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; @@ -1083,8 +1083,7 @@ { uint16_t res; #if BB_LITTLE_ENDIAN - /* gcc 4.2.1 is very clever */ - memcpy(&res, &bytebuffer[bytebuffer_offset], 2); + move_from_unaligned16(res, &bytebuffer[bytebuffer_offset]); #else res = bytebuffer[bytebuffer_offset]; res |= bytebuffer[bytebuffer_offset + 1] << 8; @@ -1097,7 +1096,7 @@ { uint32_t res; #if BB_LITTLE_ENDIAN - memcpy(&res, &bytebuffer[bytebuffer_offset], 4); + move_from_unaligned32(res, &bytebuffer[bytebuffer_offset]); #else res = bytebuffer[bytebuffer_offset]; res |= bytebuffer[bytebuffer_offset + 1] << 8; @@ -1118,7 +1117,7 @@ uint32_t mtime; uint8_t xtra_flags_UNUSED; uint8_t os_flags_UNUSED; - } __attribute__((packed)) formatted; + } PACKED formatted; } header; struct BUG_header { char BUG_header[sizeof(header) == 8 ? 1 : -1]; @@ -1182,11 +1181,11 @@ 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; @@ -1246,7 +1245,7 @@ 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);