diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-12 22:17:44 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-12 22:17:44 +0100 |
commit | 3e97eeb408a1107b0ffacc6ba39682428c4598f1 (patch) | |
tree | f6f7df81821d543bef855f961a76b09e79d49855 /include | |
parent | 8cbc300d083001bccac4f33bf61b9dc97f29cb04 (diff) | |
download | busybox-w32-3e97eeb408a1107b0ffacc6ba39682428c4598f1.tar.gz busybox-w32-3e97eeb408a1107b0ffacc6ba39682428c4598f1.tar.bz2 busybox-w32-3e97eeb408a1107b0ffacc6ba39682428c4598f1.zip |
apply post-1.15.2 fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/platform.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h index 7c88d1ba6..b3847f70d 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -174,12 +174,14 @@ char *strchrnul(const char *s, int c); | |||
174 | * a lvalue. This makes it more likely to not swap them by mistake | 174 | * a lvalue. This makes it more likely to not swap them by mistake |
175 | */ | 175 | */ |
176 | #if defined(i386) || defined(__x86_64__) | 176 | #if defined(i386) || defined(__x86_64__) |
177 | # define move_from_unaligned_int(v, intp) ((v) = *(int*)(intp)) | ||
177 | # define move_from_unaligned16(v, u16p) ((v) = *(uint16_t*)(u16p)) | 178 | # define move_from_unaligned16(v, u16p) ((v) = *(uint16_t*)(u16p)) |
178 | # define move_from_unaligned32(v, u32p) ((v) = *(uint32_t*)(u32p)) | 179 | # define move_from_unaligned32(v, u32p) ((v) = *(uint32_t*)(u32p)) |
179 | # define move_to_unaligned32(u32p, v) (*(uint32_t*)(u32p) = (v)) | 180 | # define move_to_unaligned32(u32p, v) (*(uint32_t*)(u32p) = (v)) |
180 | /* #elif ... - add your favorite arch today! */ | 181 | /* #elif ... - add your favorite arch today! */ |
181 | #else | 182 | #else |
182 | /* performs reasonably well (gcc usually inlines memcpy here) */ | 183 | /* performs reasonably well (gcc usually inlines memcpy here) */ |
184 | # define move_from_unaligned_int(v, intp) (memcpy(&(v), (intp), sizeof(int))) | ||
183 | # define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2)) | 185 | # define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2)) |
184 | # define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4)) | 186 | # define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4)) |
185 | # define move_to_unaligned32(u32p, v) do { \ | 187 | # define move_to_unaligned32(u32p, v) do { \ |