diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-16 20:46:35 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-16 20:46:35 +0200 |
commit | bcccad35318004922cc04487e1df4eade4545966 (patch) | |
tree | d65ad2822b4baf2b4c8e0c3ac02cf74879b03573 /include | |
parent | c0683acce88efc1fe15d9a4332428b5a9fdc6c2e (diff) | |
download | busybox-w32-bcccad35318004922cc04487e1df4eade4545966.tar.gz busybox-w32-bcccad35318004922cc04487e1df4eade4545966.tar.bz2 busybox-w32-bcccad35318004922cc04487e1df4eade4545966.zip |
md5: code shrink; and use 64-byte temp buf, not 128-byte.
function old new delta
md5_hash 111 108 -3
md5_end 129 125 -4
md5_hash_block 459 454 -5
filter_rename_config 250 244 -6
md5_crypt 587 578 -9
popmaildir_main 828 816 -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-39) Total: -39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 2 | ||||
-rw-r--r-- | include/platform.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index 1031cad8b..f406fc6f1 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1540,7 +1540,7 @@ typedef struct md5_ctx_t { | |||
1540 | uint32_t C; | 1540 | uint32_t C; |
1541 | uint32_t D; | 1541 | uint32_t D; |
1542 | uint64_t total; | 1542 | uint64_t total; |
1543 | char buffer[128]; | 1543 | char buffer[64]; |
1544 | } md5_ctx_t; | 1544 | } md5_ctx_t; |
1545 | #else | 1545 | #else |
1546 | /* libbb/md5prime.c uses a bit different one: */ | 1546 | /* libbb/md5prime.c uses a bit different one: */ |
diff --git a/include/platform.h b/include/platform.h index 85efa53cd..c255a17ce 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -197,6 +197,8 @@ | |||
197 | # define SWAP_LE16(x) bswap_16(x) | 197 | # define SWAP_LE16(x) bswap_16(x) |
198 | # define SWAP_LE32(x) bswap_32(x) | 198 | # define SWAP_LE32(x) bswap_32(x) |
199 | # define SWAP_LE64(x) bswap_64(x) | 199 | # define SWAP_LE64(x) bswap_64(x) |
200 | # define IF_BIG_ENDIAN(...) __VA_ARGS__ | ||
201 | # define IF_LITTLE_ENDIAN(...) | ||
200 | #else | 202 | #else |
201 | # define SWAP_BE16(x) bswap_16(x) | 203 | # define SWAP_BE16(x) bswap_16(x) |
202 | # define SWAP_BE32(x) bswap_32(x) | 204 | # define SWAP_BE32(x) bswap_32(x) |
@@ -204,6 +206,8 @@ | |||
204 | # define SWAP_LE16(x) (x) | 206 | # define SWAP_LE16(x) (x) |
205 | # define SWAP_LE32(x) (x) | 207 | # define SWAP_LE32(x) (x) |
206 | # define SWAP_LE64(x) (x) | 208 | # define SWAP_LE64(x) (x) |
209 | # define IF_BIG_ENDIAN(...) | ||
210 | # define IF_LITTLE_ENDIAN(...) __VA_ARGS__ | ||
207 | #endif | 211 | #endif |
208 | 212 | ||
209 | /* ---- Unaligned access ------------------------------------ */ | 213 | /* ---- Unaligned access ------------------------------------ */ |